Repository navigation
Fix optional file dependencies - #982
Open
harbinresearcher wants to merge 1 commit into
Open
harbinresearcher wants to merge 1 commit into
harbinresearcher wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Hey - I've reviewed your changes and they look great!
Sourcery assessment
Needs a human reviewer. This changes whether file and path dependencies are marked optional, which can alter dependency resolution and whether those packages are installed or activated. Reverting restores the previous behavior, but lockfiles or already-installed dependency state may need to be regenerated or cleaned up.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves: python-poetry/poetry#10426
Factory.create_dependency()readsoptionalfrom a dependency table but does not pass it toFileDependencyin thefilebranch. The equivalentpathbranch already passes it. This leaves an explicitly optional file dependency required and activated.Pass the existing flag through in the
filebranch. The parameterized regression coversfileandpathwith the flag omitted, false, and true, including the resulting activation state. No changes to lock-file format or extras handling.Validation:
file/optional=trueregression fails; five controls pass.optional=falsebefore the fix andoptional=trueafter it;install --dry-runwithout the extra skips the dependency.The unmodified full-suite baseline had one unrelated
test_path_to_url_winfailure when run from a non-ASCII working directory. Running the final suite from an ASCII temporary working directory avoids that environment-dependent assertion; no test was disabled or changed for it.Developed with Codex assistance; the regression, full suite, integration suite, and CLI smoke checks were run locally.