Skip to content

✨ feat(python): require Python 3.10 - #3789

Merged
gaborbernat merged 3 commits into
pypa:mainfrom
gaborbernat:policy
Dec 5, 2026
Merged

gaborbernat merged 3 commits into
pypa:mainfrom
gaborbernat:policy

Conversation

@gaborbernat

Copy link
Copy Markdown
Contributor

virtualenv now requires Python 3.10 or later to run and to create environments, matching pip 26.3. Use an older virtualenv release if you still use Python 3.9. pip 26.3 metadata

Installers read the host minimum from package metadata, and the zipapp checks it at startup. Creator selection enforces the target minimum before writing the environment, even on a supported host with --no-seed. Dropping Python 3.9 lets virtualenv remove its 3.9-only seed wheels and distutils hook. Distutils hook discussion

Future CPython removals follow upstream end of life, with extensions at the maintainers' discretion. pip's Python support policy

Run this with virtualenv installed under Python 3.10 or later and python3.9 on PATH.

$ cd "$(mktemp -d)"
$ target=$(command -v python3.9)
$ python -m virtualenv -q --python "$target" --no-seed --activators '' env && env/bin/python -c 'import sys; print(sys.version.split()[0])'

Before

3.9.25

After

RuntimeError: virtualenv requires Python 3.10 or later to create environments, got Python 3.9

Match the minimum version supported by pip 26.3. Dropping Python 3.9
lets virtualenv retire its old seed wheels and distutils startup hook.

BREAKING CHANGE: Use an older virtualenv release to run under Python
3.9 or to create Python 3.9 environments.

Refs pypa#3181
@gaborbernat
gaborbernat marked this pull request as ready for review December 5, 2026 01:19
@gaborbernat
gaborbernat enabled auto-merge (squash) December 5, 2026 01:20
@gaborbernat
gaborbernat merged commit 937e545 into pypa:main Dec 5, 2026
70 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant