Repository navigation
🐛 fix(create): let creator plugins handle Python older than 3.10 - #3792
Draft
Daemonratte wants to merge 1 commit into
Draft
Daemonratte wants to merge 1 commit into
Daemonratte wants to merge 1 commit into
Conversation
21.16.0 raises for a target older than Python 3.10 before it asks the creator plugins, so a plugin that creates environments for an interpreter virtualenv's own creators do not support stopped working, without a deprecation. Up to 21.15 the plugins were asked, and the seeder's error pointed to a seeder that ships wheels for the target. Skip virtualenv's own creators for such a target instead, recognized by their module as the plugin loader does, and raise the same error when no creator plugin accepts it. Without such a plugin nothing changes.
This branch has not been deployed
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.
virtualenv 21.16.0 raises for a target older than Python 3.10 before it asks the creator plugins (#3789). Up to 21.15 the plugins were asked, and the bundled seeder's error pointed to "a seeder that provides Python X wheels" for such a target. So a creator plugin that, together with its own seeder, creates environments for an interpreter virtualenv's own creators do not support stopped working with 21.16.0, without a deprecation.
This keeps the 3.10 floor for virtualenv's own creators. For an older target, the selection skips the creators that live in virtualenv, recognized by their module as the plugin loader already does for name collisions, and raises the same error when no creator plugin accepts the target. Without such a plugin, behavior and message are unchanged.
Tested:
test_creator_plugin_handles_python_39_targetfails without the change;test_rejects_python_39_targetstill passes.The unit suite passes on CPython 3.10, 3.13 and 3.15 on Linux, except for tests that fail on
mainhere as well (test_copied_seed_is_writable_from_read_only_imagewith umask 002, and on 3.10test_discovery_fallback_okandtest_absolute_path_does_not_exist).With a real CPython 3.9, virtualenv still refuses, with and without
--no-seed, and leaves no directory behind.A third-party creator and seeder plugin for an older interpreter creates environments again, also through tox.
ran the linter to address style issues (the pre-commit hooks on the changed files)
wrote descriptive pull request text
ensured there are test(s) validating the fix
added a
docs/changelog/+short-description.<type>.rstfragment for each user-facing change, or appliedskip newsupdated/extended the documentation
for changes to activation scripts,
pyvenv.cfg, wheel downloads, app-data or release workflows: not applicableran tests on Python 3.10 and 3.15
linked upstream issues beside any temporary interpreter overrides: not applicable
kept the PR in draft until CI passes