Skip to content

Commit

Permalink
deprecate "installer.modern-installation false"
Browse files Browse the repository at this point in the history
  • Loading branch information
dimbleby committed Feb 18, 2024
1 parent 0eedea4 commit 1deba97
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/poetry/installation/executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,17 @@ def __init__(
self._use_modern_installation = config.get(
"installer.modern-installation", True
)
if not self._use_modern_installation:
self._io.write_line(
"<warning>Setting `installer.modern-installation` to `false` "
"is deprecated.</>"
)
self._io.write_line(
"<warning>The pip-based installer will be removed in a future release.</>"
)
self._io.write_line(
"<warning>See https://github.com/python-poetry/poetry/issues/8987.</>"
)

if parallel is None:
parallel = config.get("installer.parallel", True)
Expand Down
6 changes: 6 additions & 0 deletions tests/installation/test_executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -1169,6 +1169,12 @@ def test_executor_fallback_on_poetry_create_error_without_wheel_installer(
})

executor = Executor(env, pool, config, io)
warning_lines = io.fetch_output().splitlines()
assert warning_lines == [
"Setting `installer.modern-installation` to `false` is deprecated.",
"The pip-based installer will be removed in a future release.",
"See https://github.com/python-poetry/poetry/issues/8987.",
]

directory_package = Package(
"simple-project",
Expand Down

0 comments on commit 1deba97

Please sign in to comment.