Skip to content

Commit 2ff2d0e

Browse files
committed
Deprecate legacy projects ignoring config settings
In the future the presence of config settings will auto enable pep517.
1 parent 5ae0866 commit 2ff2d0e

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

news/11915.removal.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Using ``--config-settings`` with projects that don't have a ``pyproject.toml`` now print
2+
a deprecation warning. In the future the presence of config settings will automatically
3+
enable the default build backend for legacy projects and pass the setttings to it.

src/pip/_internal/req/req_install.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -477,6 +477,15 @@ def load_pyproject_toml(self) -> None:
477477
)
478478

479479
if pyproject_toml_data is None:
480+
if self.config_settings:
481+
deprecated(
482+
reason=f"Config settings are ignored for project {self}.",
483+
replacement=(
484+
"to use --use-pep517 or add a "
485+
"pyproject.toml file to the project"
486+
),
487+
gone_in="23.3",
488+
)
480489
self.use_pep517 = False
481490
return
482491

0 commit comments

Comments
 (0)