Thanks to visit codestin.com
Credit goes to github.com

Skip to content

add 3.16 to embedded wheel versions#3140

Merged
gaborbernat merged 2 commits into
pypa:mainfrom
asottile:patch-1
May 11, 2026
Merged

add 3.16 to embedded wheel versions#3140
gaborbernat merged 2 commits into
pypa:mainfrom
asottile:patch-1

Conversation

@asottile
Copy link
Copy Markdown
Contributor

No description provided.

@asottile
Copy link
Copy Markdown
Contributor Author

without this virtualenv.pyz produces a broken virtualenv in python 3.16:

+ python3.16 virtualenv.pyz venv
created virtual environment CPython3.16.0.alpha.0-64-x86_64 in 291ms
  creator CPython3Posix(dest=/tmp/venv, clear=False, no_vcs_ignore=False, global=False)
  seeder FromAppData(download=False, pip=bundle, via=copy, app_data_dir=/root/.cache/virtualenv)
    added seed packages: pip==25.0.1
  activators BashActivator,CShellActivator,FishActivator,NushellActivator,PowerShellActivator,PythonActivator,XonshActivator
+ test -x venv/bin/pip
+ test -d venv/lib/python3.16/site-packages
+ venv/bin/pip install astpretty
Traceback (most recent call last):
  File "/tmp/venv/bin/pip", line 6, in <module>
    from pip._internal.cli.main import main
  File "/tmp/venv/lib/python3.16/site-packages/pip/_internal/cli/main.py", line 11, in <module>
    from pip._internal.cli.autocompletion import autocomplete
  File "/tmp/venv/lib/python3.16/site-packages/pip/_internal/cli/autocompletion.py", line 10, in <module>
    from pip._internal.cli.main_parser import create_main_parser
  File "/tmp/venv/lib/python3.16/site-packages/pip/_internal/cli/main_parser.py", line 9, in <module>
    from pip._internal.build_env import get_runnable_pip
  File "/tmp/venv/lib/python3.16/site-packages/pip/_internal/build_env.py", line 17, in <module>
    from pip._internal.cli.spinners import open_spinner
  File "/tmp/venv/lib/python3.16/site-packages/pip/_internal/cli/spinners.py", line 9, in <module>
    from pip._internal.utils.logging import get_indentation
  File "/tmp/venv/lib/python3.16/site-packages/pip/_internal/utils/logging.py", line 29, in <module>
    from pip._internal.utils.misc import ensure_dir
  File "/tmp/venv/lib/python3.16/site-packages/pip/_internal/utils/misc.py", line 44, in <module>
    from pip._internal.utils.retry import retry
  File "/tmp/venv/lib/python3.16/site-packages/pip/_internal/utils/retry.py", line 5, in <module>
    from pip._vendor.typing_extensions import ParamSpec
  File "/tmp/venv/lib/python3.16/site-packages/pip/_vendor/typing_extensions.py", line 3641, in <module>
    no_type_check_decorator = typing.no_type_check_decorator
                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.16/typing.py", line 3928, in __getattr__
    raise AttributeError(f"module {__name__!r} has no attribute {attr!r}")
AttributeError: module 'typing' has no attribute 'no_type_check_decorator'

alternatively -- and perhaps a better change -- I think the MAX = ... should actually point to the maximum python version rather than the minimum one ?

@asottile
Copy link
Copy Markdown
Contributor Author

my chatters pointed out that this potentially was a mistake in 04af502#diff-a532364d3821049224ee1eacaf7664a3488002bc40fe7d68f849a000c4dc257bR40

@gaborbernat
Copy link
Copy Markdown
Contributor

my chatters pointed out that this potentially was a mistake in 04af502#diff-a532364d3821049224ee1eacaf7664a3488002bc40fe7d68f849a000c4dc257bR40

Let's fix that now.

this makes it more likely to be successful when a new python version is released
@gaborbernat gaborbernat merged commit 214934c into pypa:main May 11, 2026
58 checks passed
gaborbernat added a commit that referenced this pull request May 12, 2026
The daily `Upgrade embedded dependencies` workflow keeps regenerating
`src/virtualenv/seed/wheels/embed/__init__.py` with `MAX = "3.8"` and
dropping the `3.16` entry β€” both of which had to be hand-patched in
#3140 on top of the auto-PR. The script is the source of the regression,
so patching the generated file alone leaves the next cron run free to
undo the fix again. πŸ”

The `MAX` substitution in `render_init` was reading the first key of the
ordered support table, which is always the lowest Python version, so it
baked `MAX = '3.8'` into the rendered module on every regen. Emit the
runtime expression `next(reversed(BUNDLE_SUPPORT))` as literal text in
the template instead, so the rendered module evaluates it at import time
and always points at the highest supported version regardless of what
the table contains.

The `SUPPORT` range stopped at `3.15`, which is why each regen also
dropped the `3.16` entry. Extend the range through `3.16` so the
generated table covers the versions we already ship wheels for.

No runtime behavior changes for users β€” this only affects what the regen
task writes, so no changelog fragment is needed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants