Skip plugin loading for version output - #10992
Open
pratyushsinghal7 wants to merge 2 commits into
Open
Conversation
pratyushsinghal7
marked this pull request as ready for review
July 24, 2026 05:16
Sanjays2402
reviewed
Jul 24, 2026
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request Check List
Resolves: #10625
Summary
Skip application plugin discovery when Poetry is invoked with the global
--versionor-Vflag. Plugins cannot change Poetry's version output, and loading their entry points adds avoidable startup latency.The check lives in
_load_plugins()alongside the existing--no-pluginsfast path. It uses Cleo's parameter boundary handling so version arguments forwarded to subprocesses, such aspoetry run -- python -V, continue to load Poetry plugins normally.Testing
.venv/bin/pytest tests/console/test_application.py -q— 22 passedPATH="/tmp/poetry-test-bin:$PATH" .venv/bin/pytest tests/console -q— 958 passed, 6 skippedPATH="/tmp/poetry-test-bin:$PATH" .venv/bin/pytest -q— 3176 passed, 27 skipped.venv/bin/mypy— success across 374 source files.venv/bin/pre-commit run --files src/poetry/console/application.py tests/console/test_application.py— passed