diff --git a/news/8600.feature b/news/8600.feature new file mode 100644 index 00000000000..3e56c66ab1b --- /dev/null +++ b/news/8600.feature @@ -0,0 +1 @@ +Support ``--use-feature`` in requirements files diff --git a/src/pip/_internal/req/req_file.py b/src/pip/_internal/req/req_file.py index e120ad91b0f..f991cd32d92 100644 --- a/src/pip/_internal/req/req_file.py +++ b/src/pip/_internal/req/req_file.py @@ -62,6 +62,7 @@ cmdoptions.require_hashes, cmdoptions.pre, cmdoptions.trusted_host, + cmdoptions.use_new_feature, ] # type: List[Callable[..., optparse.Option]] # options to be passed to requirements diff --git a/tests/unit/test_req_file.py b/tests/unit/test_req_file.py index b22ce20138e..b7c3218510c 100644 --- a/tests/unit/test_req_file.py +++ b/tests/unit/test_req_file.py @@ -382,6 +382,10 @@ def test_set_finder_allow_all_prereleases(self, line_processor, finder): line_processor("--pre", "file", 1, finder=finder) assert finder.allow_all_prereleases + def test_use_feature(self, line_processor): + """--use-feature can be set in requirements files.""" + line_processor("--use-feature=2020-resolver", "filename", 1) + def test_relative_local_find_links( self, line_processor, finder, monkeypatch, tmpdir ):