Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add --only-extra option to pip-compile #1960

Closed
wants to merge 1 commit into from

Conversation

atugushev
Copy link
Member

@atugushev atugushev commented Aug 9, 2023

Resolves #1959.
Refs #1957.

Contributor checklist
  • Included tests for the changes.
  • PR title is short, clear, and ready to be included in the user-facing changelog.
Maintainer checklist
  • Verified one of these labels is present: backwards incompatible, feature, enhancement, deprecation, bug, dependency, docs or skip-changelog as they determine changelog listing.
  • Assign the PR to an existing or new milestone for the target version (following Semantic Versioning).

@atugushev atugushev added the feature Request for a new feature label Aug 9, 2023
@atugushev atugushev changed the title Add --only-extra option to pip-compile Add --only-extra option to pip-compile Aug 9, 2023
@webknjaz
Copy link
Member

webknjaz commented Aug 9, 2023

I'm not sure if it is reasonable to support this. It's out of standard and encourages people to misuse Provides-Extra by exposing them to their end-users.

Extras are a public API for installing additional runtime dependencies together with the mandatory ones. All the installers, like pip, always include normal deps. Advertising this to people would cause confusion, especially, when used with pip install thing[extra] -c constraints.txt and --generate-hashes.

This PR should at least have a huge disclaimer explaining #1681 (comment) bundled in the docs and maybe the help string. And maybe don't call it --only-extra — having something more explicit like --only-extract-extra to signify that it's extracted as a standalone dependency source.

@webknjaz
Copy link
Member

webknjaz commented Aug 9, 2023

Oh, and maybe hold this until #1681 is merged? I don't want to keep introducing conflicts for the contributor all the time…

@atugushev
Copy link
Member Author

I don't want to encourage bad practices, so I'll close this. If someone finds this feature sensible, please feel free to reopen the issue. Thanks for the feedback!

@webknjaz
Copy link
Member

webknjaz commented Apr 4, 2024

The dependency groups PEP is going to be the correct solution so it should be implemented instead. I think it'd okay to do this even before it's fully accepted.

See #2062.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Request for a new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for --only-extra
2 participants