tox-dev / tox

Command line driven CI frontend and development task automation tool.
https://tox.wiki
MIT License
3.68k stars 522 forks source link

Wheel installation failure on 3.13t #3314

Open nedbat opened 3 months ago

nedbat commented 3 months ago

Issue

I used pyenv to build 3.13t-dev, then run the coverage.py test suite with it.

% COVERAGE_ANYPY=/usr/local/pyenv/pyenv/versions/3.13t-dev/bin/python3 tox -re anypy
anypy: remove tox env folder .tox/anypy
.pkg: remove tox env folder .tox/.pkg
anypy: pip-24.2-py3-none-any.whl already present in /Users/ned/Library/Application Support/virtualenv/wheel/3.13/embed/3/pip.json
anypy: install_deps> python -m pip install -U -r requirements/pip.pip -r requirements/pytest.pip
.pkg-cpython313: remove tox env folder .tox/.pkg-cpython313
.pkg-cpython313: install_requires> python -I -m pip install setuptools
.pkg-cpython313: _optional_hooks> python /usr/local/virtualenvs/coverage/lib/python3.8/site-packages/pyproject_api/_backend.py True setuptools.build_meta
.pkg-cpython313: get_requires_for_build_editable> python /usr/local/virtualenvs/coverage/lib/python3.8/site-packages/pyproject_api/_backend.py True setuptools.build_meta
.pkg-cpython313: build_editable> python /usr/local/virtualenvs/coverage/lib/python3.8/site-packages/pyproject_api/_backend.py True setuptools.build_meta
anypy: install_package_deps> python -m pip install -U 'tomli; python_full_version <= "3.11.0a6"'
anypy: install_package> python -m pip install -U --force-reinstall --no-deps .tox/.tmp/package/3/coverage-7.6.1a0.dev1-0.editable-cp313-cp313-macosx_14_0_arm64.whl
ERROR: coverage-7.6.1a0.dev1-0.editable-cp313-cp313-macosx_14_0_arm64.whl is not a supported wheel on this platform.

anypy: exit 1 (0.35 seconds) /Users/ned/coverage/trunk> python -m pip install -U --force-reinstall --no-deps .tox/.tmp/package/3/coverage-7.6.1a0.dev1-0.editable-cp313-cp313-macosx_14_0_arm64.whl pid=97510
  anypy: FAIL code 1 (9.99 seconds)
  evaluation failed :( (10.41 seconds)

The wheel is cp313, but I think it needs to be cp313t. I don't know if this is a tox issue or something else.

Environment

Provide at least:

Output of pip list of the host Python, where tox is installed ```console % pip list Package Version ------------------- -------- astroid 3.2.4 attrs 23.2.0 backports.tarfile 1.2.0 build 1.2.1 cachetools 5.4.0 certifi 2024.7.4 chardet 5.2.0 charset-normalizer 3.3.2 check-manifest 0.49 cogapp 3.4.1 colorama 0.4.6 dill 0.3.8 distlib 0.3.8 docutils 0.20.1 exceptiongroup 1.2.2 execnet 2.1.1 filelock 3.15.4 flaky 3.8.1 greenlet 3.0.3 hypothesis 6.108.5 idna 3.7 importlib_metadata 8.2.0 importlib_resources 6.4.0 iniconfig 2.0.0 isort 5.13.2 jaraco.classes 3.4.0 jaraco.context 5.3.0 jaraco.functools 4.0.2 jedi 0.19.1 keyring 25.2.1 libsass 0.23.0 markdown-it-py 3.0.0 mccabe 0.7.0 mdurl 0.1.2 more-itertools 10.3.0 nh3 0.2.18 packaging 24.1 parso 0.8.4 pip 24.2 pkginfo 1.10.0 platformdirs 4.2.2 pluggy 1.5.0 pudb 2024.1.2 Pygments 2.18.0 pylint 3.2.6 pyproject-api 1.7.1 pyproject_hooks 1.1.0 pytest 8.3.2 pytest-xdist 3.6.1 readme_renderer 43.0 requests 2.32.3 requests-toolbelt 1.0.0 rfc3986 2.0.0 rich 13.7.1 setuptools 72.1.0 sortedcontainers 2.4.0 tabulate 0.9.0 tomli 2.0.1 tomlkit 0.13.0 tox 4.16.0 tox-gh 1.3.2 twine 5.1.1 typing_extensions 4.12.2 urllib3 2.2.2 urwid 2.6.15 urwid_readline 0.14 virtualenv 20.26.3 wcwidth 0.2.13 wheel 0.43.0 zipp 3.19.2 ```

Output of running tox

Output of tox -rvv Too large for an issue, the output is in this gist: https://gist.github.com/nedbat/26d0f5c302bbb4e13f7ee72460284bf2
mikeshardmind commented 3 months ago

This appears to be coming from pip, I haven't isolated why pip is rejecting this wheel tag or why the invocation through tox to pip to setuptools is causing it not to be tagged as a 3.13t wheel yet.

gaborbernat commented 3 months ago

There is nothing on our site that should be blocking

pradyunsg commented 3 months ago

FWIW, the wheel is being built by setuptools that tox is invoking via pyproject-api. pip isn't involved in the creation of the problematic wheel here.

nedbat commented 3 months ago

In a 3.13t virtualenv this is an editable install (correct tag):

% pip install -e .
Obtaining file:///Users/ned/coverage/trunk
  Installing build dependencies ... done
  Checking if build backend supports build_editable ... done
  Getting requirements to build editable ... done
  Preparing editable metadata (pyproject.toml) ... done
Building wheels for collected packages: coverage
  Building editable for coverage (pyproject.toml) ... done
  Created wheel for coverage: filename=coverage-7.6.1a0.dev1-0.editable-cp313-cp313t-macosx_14_0_arm64.whl size=9437 sha256=0cd67dc40d39e2c39c11836f4a4c0213ab20980d526c01fde6120304d8a605a6
  Stored in directory: /private/var/folders/6j/khn0mcrj35d1k3yylpl8zl080000gn/T/pip-ephem-wheel-cache-fo6c8crt/wheels/3a/6d/ea/66d4b328dc1a5be5c68cf7d8639e26777023337692e0d3579a
Successfully built coverage
Installing collected packages: coverage
Successfully installed coverage-7.6.1a0.dev1

Using build directly gets the correct tag:

python -m build
...
Successfully built coverage-7.6.1a0.dev1.tar.gz and coverage-7.6.1a0.dev1-cp313-cp313t-macosx_14_0_arm64.whl
nedbat commented 3 months ago

@gaborbernat Can we re-open this issue while working through it?

On line 275 of my gist is:

find interpreter for spec PythonSpec(implementation=cpython, major=3, minor=13)

That seems to be finding the python3.13 on my path rather than the 3.13t from basepython, which could be leading to the problem.

pradyunsg commented 3 months ago

From @hugovk on a Discord chat where we were discussing this:

fwiw I can also repro the error using the official macOS installer, and running COVERAGE_ANYPY=/usr/local/bin/python3.13t tox -re anypy

gaborbernat commented 3 months ago

99% this is a problem for the virtual environment creator. That never got support for this.