Handle Poetry Optional Dependency Quirks #388
Merged
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.
Fixes #385. This is a compilation of some unusual behavior I noticed when
conda-lock
parses some dependencies inpyproject.toml
files with conflicting attributes:There are all things that Poetry seems to handle quietly in its own way (see the related issue). To minimize the number of parsing changes, I did not change how
conda-lock
treats the resulting categories of dependencies.conda-lock
will print a warning but still treat it as part of the extra as it always has.conda-lock
will print a warning but just presume that it is optional if not in the main category, required if in main.Essentially, this PR ensures that we maintain the invariant that an optional source dependency is a dependency not part of the main category. This is important for future PRs implementing multiple category support.