Skip to content

deprecate "installer.modern-installation false"#8988

Merged
radoering merged 2 commits intopython-poetry:masterfrom
dimbleby:deprecate-non-modern-installation
Feb 20, 2024
Merged

deprecate "installer.modern-installation false"#8988
radoering merged 2 commits intopython-poetry:masterfrom
dimbleby:deprecate-non-modern-installation

Conversation

@dimbleby
Copy link
Copy Markdown
Contributor

As proposed at #8987

I started with warnings.warn but something about all the cleo io cleverness results in those messages disappearing. Anyway this deprecation is more user-facing than developer-facing, so regular warning output is probably fine.

I'd be happy to see this deprecation in the upcoming release, might as well get it out there and see who squeals. But no big deal if it misses the cut.

@dimbleby dimbleby force-pushed the deprecate-non-modern-installation branch from 0bcbcd9 to 3d794ce Compare February 18, 2024 18:27
@dimbleby dimbleby force-pushed the deprecate-non-modern-installation branch from 3d794ce to 1deba97 Compare February 18, 2024 18:33
radoering
radoering previously approved these changes Feb 19, 2024
"installer.modern-installation", True
)
if not self._use_modern_installation:
self._io.write_line(
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One thing: Shouldn't we use write_error_line() for warnings?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some do, some don't: if there is a rule then it is not consistently followed. The stdout from these commands is not really suitable for parsing anyway so I don't suppose it much matters.

I'm not at the right computer to do anything about this now, feel free do any of tweak it yourself / ask me to do it later / not bother.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are probably right that it is inconsistent and does not matter.

Interestingly enough, I see random test failures on Windows if I write the warning to error out. It's always a PermissionError in

shutil.rmtree(venv.path)

but in different tests, for example one or two of

tests/console/commands/self/test_add_plugins.py::test_add_with_constraint
tests/console/commands/self/test_add_plugins.py::test_add_with_git_constraint_with_extras
tests/console/commands/self/test_remove_plugins.py::test_remove_installed_package
tests/console/commands/self/test_remove_plugins.py::test_remove_installed_package_dry_run
tests/installation/test_executor.py::test_executor_should_write_pep610_url_references_for_editable_git

Maybe, a reason to just keep it as is, even if this is a bit unsettling...

@radoering radoering merged commit b49d2dd into python-poetry:master Feb 20, 2024
@dimbleby dimbleby deleted the deprecate-non-modern-installation branch February 20, 2024 15:56
@github-actions
Copy link
Copy Markdown

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Mar 22, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants