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

Support '--unstable-feature' in requirements files #8293

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions news/8293.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Support ``--unstable-feature`` in requirements files
1 change: 1 addition & 0 deletions src/pip/_internal/req/req_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
cmdoptions.require_hashes,
cmdoptions.pre,
cmdoptions.trusted_host,
cmdoptions.unstable_feature,
cmdoptions.always_unzip, # Deprecated
] # type: List[Callable[..., optparse.Option]]

Expand Down
4 changes: 4 additions & 0 deletions tests/unit/test_req_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -382,6 +382,10 @@ def test_noop_always_unzip(self, line_processor, finder):
# noop, but confirm it can be set
line_processor("--always-unzip", "file", 1, finder=finder)

def test_unstable_feature(self, line_processor):
"""--unstable-feature can be set in requirements files."""
line_processor("--unstable-feature=resolver", "filename", 1)

def test_set_finder_allow_all_prereleases(self, line_processor, finder):
line_processor("--pre", "file", 1, finder=finder)
assert finder.allow_all_prereleases
Expand Down