diff options
author | Stéphane Bidoul <stephane.bidoul@gmail.com> | 2023-04-02 18:49:34 +0200 |
---|---|---|
committer | Stéphane Bidoul <stephane.bidoul@gmail.com> | 2023-04-02 18:56:47 +0200 |
commit | 2ff2d0e375e163792e5dec8ef48481074c86e90a (patch) | |
tree | 67bf9231b2c1649531624c2f9ff828a10b1ec1a6 | |
parent | 5ae08663dbc88d5372880c1c04b7cc7d196adfa6 (diff) | |
download | pip-2ff2d0e375e163792e5dec8ef48481074c86e90a.tar.gz |
Deprecate legacy projects ignoring config settings
In the future the presence of config settings will
auto enable pep517.
-rw-r--r-- | news/11915.removal.rst | 3 | ||||
-rw-r--r-- | src/pip/_internal/req/req_install.py | 9 |
2 files changed, 12 insertions, 0 deletions
diff --git a/news/11915.removal.rst b/news/11915.removal.rst new file mode 100644 index 000000000..e54b5d574 --- /dev/null +++ b/news/11915.removal.rst @@ -0,0 +1,3 @@ +Using ``--config-settings`` with projects that don't have a ``pyproject.toml`` now print +a deprecation warning. In the future the presence of config settings will automatically +enable the default build backend for legacy projects and pass the setttings to it. diff --git a/src/pip/_internal/req/req_install.py b/src/pip/_internal/req/req_install.py index f0b7c5bcb..2c628d36e 100644 --- a/src/pip/_internal/req/req_install.py +++ b/src/pip/_internal/req/req_install.py @@ -477,6 +477,15 @@ class InstallRequirement: ) if pyproject_toml_data is None: + if self.config_settings: + deprecated( + reason=f"Config settings are ignored for project {self}.", + replacement=( + "to use --use-pep517 or add a " + "pyproject.toml file to the project" + ), + gone_in="23.3", + ) self.use_pep517 = False return |