Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tox -e picking up 2.7 instead of PyPy3.8 on macOS #2566

Closed
hugovk opened this issue Nov 30, 2022 · 1 comment · Fixed by pypa/virtualenv#2460
Closed

tox -e picking up 2.7 instead of PyPy3.8 on macOS #2566

hugovk opened this issue Nov 30, 2022 · 1 comment · Fixed by pypa/virtualenv#2460
Milestone

Comments

@hugovk
Copy link
Contributor

hugovk commented Nov 30, 2022

Issue

Test using tox 4.0.0rc1 on a GitHub Actions CI matrix of CPython 3.7-3.12 and PyPy3.8 on Windows, macOS and Ubuntu:

hugovk/pepotron@ea20958

Set up the Python version using actions/setup-python@v4, install tox using python -m pip install -U tox --pre and run with tox -e py

All pass with tox3:

All pass with tox4 except for PyPy3.8 on macOS:

It looks like it sees PyPy3.8:

py: 1008 I proposed PythonInfo(spec=PyPy3.8.[13](https://github.com/hugovk/pepotron/actions/runs/3583220509/jobs/6028393027#step:6:14).final.0-64, exe=/Users/runner/hostedtoolcache/PyPy/3.8.13/x64/bin/python, platform=darwin, version='3.8.13 (4b1398fe9d76ad762155d03684c2a153d230b2ef, Mar 29 2022, 08:30:05)\n[PyPy 7.3.9 with GCC Apple LLVM 13.0.0 (clang-1300.0.29.30)]', encoding_fs_io=utf-8-UTF-8) [virtualenv/discovery/builtin.py:63]

But then also 2.7?

py: 2142 I proposed PathPythonInfo(spec=CPython2.7.18.final.0-64, system=/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python, exe=/usr/local/bin/python, platform=darwin, version='2.7.18 (v2.7.18:8d21aa21f2, Apr 19 2020, 20:48:48) \n[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.57)]', encoding_fs_io=utf-8-None) [virtualenv/discovery/builtin.py:63]

And then deprecation warnings and erros like:

.pkg: 13976 I exit None (0.78 seconds) /Users/runner/work/pepotron/pepotron> python /Users/runner/hostedtoolcache/PyPy/3.8.13/x64/lib/pypy3.8/site-packages/pyproject_api/_backend.py True hatchling.build pid=2096 [tox/execute/api.py:282]
py: 13980 W install_package_deps> python -E -m pip install freezegun 'httpx>=0.22' 'importlib-metadata; python_version < "3.8"' platformdirs pytest pytest-cov python-slugify thefuzz [tox/tox_env/api.py:398]
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality.
Collecting freezegun
  Downloading freezegun-0.3.15-py2.py3-none-any.whl (14 kB)
ERROR: Could not find a version that satisfies the requirement httpx>=0.22 (from versions: none)
ERROR: No matching distribution found for httpx>=0.22
py: 16805 C exit 1 (2.81 seconds) /Users/runner/work/pepotron/pepotron> python -E -m pip install freezegun 'httpx>=0.22' 'importlib-metadata; python_version < "3.8"' platformdirs pytest pytest-cov python-slugify thefuzz pid=2113 [tox/execute/api.py:282]

Environment

Provide at least:

  • OS: macOS
  • pip list of the host python where virtualenv is installed:
Package       Version
------------- --------
cachetools    5.2.0
cffi          1.15.0
chardet       5.0.0
colorama      0.4.6
distlib       0.3.6
filelock      3.8.0
greenlet      0.4.[13](https://github.com/hugovk/pepotron/actions/runs/3583220509/jobs/6028393027#step:5:14)
hpy           0.0.3
packaging     21.3
pip           22.3.1
platformdirs  2.5.4
pluggy        1.0.0
pyparsing     3.0.9
pyproject_api 1.1.2
readline      6.2.4.1
setuptools    58.1.0
tomli         2.0.1
tox           4.0.0rc1
virtualenv    20.[17](https://github.com/hugovk/pepotron/actions/runs/3583220509/jobs/6028393027#step:5:18).0
wheel         0.38.4

Output of the virtual environment creation

Make sure to run the creation with -vvv --with-traceback:

4.0.0rc1 from /Users/runner/hostedtoolcache/PyPy/3.8.13/x64/lib/pypy3.8/site-packages/tox/__init__.py
ROOT: 633 D setup logging to NOTSET on pid 1952 [tox/report.py:241]
py: 978 D created app data folder /Users/runner/Library/Application Support/virtualenv [virtualenv/app_data/__init__.py:40]
py: 1007 I find interpreter for spec PythonSpec(implementation=CPython) [virtualenv/discovery/builtin.py:56]
py: 1008 I proposed PythonInfo(spec=PyPy3.8.[13](https://github.com/hugovk/pepotron/actions/runs/3583220509/jobs/6028393027#step:6:14).final.0-64, exe=/Users/runner/hostedtoolcache/PyPy/3.8.13/x64/bin/python, platform=darwin, version='3.8.13 (4b1398fe9d76ad762155d03684c2a153d230b2ef, Mar 29 2022, 08:30:05)\n[PyPy 7.3.9 with GCC Apple LLVM 13.0.0 (clang-1300.0.29.30)]', encoding_fs_io=utf-8-UTF-8) [virtualenv/discovery/builtin.py:63]
py: 1010 D discover PATH[0]=/Users/runner/hostedtoolcache/PyPy/3.8.13/x64/bin [virtualenv/discovery/builtin.py:108]
py: 1012 D filesystem is not case-sensitive [virtualenv/info.py:24]
py: 1012 D discover PATH[1]=/usr/local/lib/ruby/gems/3.0.0/bin [virtualenv/discovery/builtin.py:108]
py: 1013 D discover PATH[2]=/usr/local/opt/ruby@3.0/bin [virtualenv/discovery/builtin.py:108]
py: 1013 D discover PATH[3]=/usr/local/opt/pipx_bin [virtualenv/discovery/builtin.py:108]
py: 10[14](https://github.com/hugovk/pepotron/actions/runs/3583220509/jobs/6028393027#step:6:15) D discover PATH[4]=/Users/runner/.cargo/bin [virtualenv/discovery/builtin.py:108]
py: 1014 D discover PATH[5]=/usr/local/opt/curl/bin [virtualenv/discovery/builtin.py:108]
py: 10[15](https://github.com/hugovk/pepotron/actions/runs/3583220509/jobs/6028393027#step:6:16) D discover PATH[6]=/usr/local/bin [virtualenv/discovery/builtin.py:108]
py: 1017 D Attempting to acquire lock 140248935481824 on /Users/runner/Library/Application Support/virtualenv/py_info/1/4cd7ab41f5fca4b9b44701077e38c5ffd31fe66a6cab21e0214b68d958d0e462.lock [filelock/_api.py:172]
py: 1017 D Lock 140248935481824 acquired on /Users/runner/Library/Application Support/virtualenv/py_info/1/4cd7ab41f5fca4b9b44701077e38c5ffd31fe66a6cab21e0214b68d958d0e462.lock [filelock/_api.py:176]
py: 1018 D get interpreter info via cmd: /usr/local/bin/python /Users/runner/hostedtoolcache/PyPy/3.8.13/x64/lib/pypy3.8/site-packages/virtualenv/discovery/py_info.py JJq6fRQNQ7hXHU7EnpT6jGeSm27yGakS OALjNMWWS4NL0vYtZE0cd2HjpQc0BTVV [virtualenv/discovery/cached_py_info.py:108]
py: 2057 D wrote python info of /usr/local/bin/python at /Users/runner/Library/Application Support/virtualenv/py_info/1/4cd7ab41f5fca4b9b44701077e38c5ffd31fe66a6cab21e0214b68d958d0e462.json [virtualenv/app_data/via_disk_folder.py:155]
py: 2057 D Attempting to release lock 140248935481824 on /Users/runner/Library/Application Support/virtualenv/py_info/1/4cd7ab41f5fca4b9b44701077e38c5ffd31fe66a6cab21e0214b68d958d0e462.lock [filelock/_api.py:209]
py: 2058 D Lock 140248935481824 released on /Users/runner/Library/Application Support/virtualenv/py_info/1/4cd7ab41f5fca4b9b44701077e38c5ffd31fe66a6cab21e0214b68d958d0e462.lock [filelock/_api.py:212]
py: 2060 D Attempting to acquire lock 140248935614688 on /Users/runner/Library/Application Support/virtualenv/py_info/1/0ef3be7f0c0b8459529ee79533840b5b73ae5f82458da6e33134bc1d9f61d8b6.lock [filelock/_api.py:172]
py: 2060 D Lock 140248935614688 acquired on /Users/runner/Library/Application Support/virtualenv/py_info/1/0ef3be7f0c0b8459529ee79533840b5b73ae5f82458da6e33134bc1d9f61d8b6.lock [filelock/_api.py:176]
py: 2062 D get interpreter info via cmd: /Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python /Users/runner/hostedtoolcache/PyPy/3.8.13/x64/lib/pypy3.8/site-packages/virtualenv/discovery/py_info.py HJDcjKDwH0jZ3c6uEAWXRN0zF2W2fDNw m7pzZtQdyfQZ63sRe43LxDc6WKrBDwQm [virtualenv/discovery/cached_py_info.py:108]
py: 2141 D wrote python info of /Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python at /Users/runner/Library/Application Support/virtualenv/py_info/1/0ef3be7f0c0b8459529ee79533840b5b73ae5f82458da6e33134bc1d9f61d8b6.json [virtualenv/app_data/via_disk_folder.py:155]
py: 2141 D Attempting to release lock 140248935614688 on /Users/runner/Library/Application Support/virtualenv/py_info/1/0ef3be7f0c0b8459529ee79533840b5b73ae5f82458da6e33134bc1d9f61d8b6.lock [filelock/_api.py:209]
py: 2141 D Lock 140248935614688 released on /Users/runner/Library/Application Support/virtualenv/py_info/1/0ef3be7f0c0b8459529ee79533840b5b73ae5f82458da6e33134bc1d9f61d8b6.lock [filelock/_api.py:212]
py: 2142 I proposed PathPythonInfo(spec=CPython2.7.18.final.0-64, system=/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python, exe=/usr/local/bin/python, platform=darwin, version='2.7.18 (v2.7.18:8d21aa21f2, Apr 19 2020, 20:48:48) \n[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.57)]', encoding_fs_io=utf-8-None) [virtualenv/discovery/builtin.py:63]
py: 2143 D accepted PathPythonInfo(spec=CPython2.7.18.final.0-64, system=/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python, exe=/usr/local/bin/python, platform=darwin, version='2.7.18 (v2.7.18:8d21aa21f2, Apr 19 2020, 20:48:48) \n[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.57)]', encoding_fs_io=utf-8-None) [virtualenv/discovery/builtin.py:65]
py: 2290 I create virtual environment via CPython2macOsFramework(dest=/Users/runner/work/pepotron/pepotron/.tox/py, clear=False, no_vcs_ignore=False, global=False) [virtualenv/run/session.py:48]
py: 2292 D create folder /Users/runner/work/pepotron/pepotron/.tox/py/bin [virtualenv/util/path/_sync.py:9]
py: 2293 D create folder /Users/runner/work/pepotron/pepotron/.tox/py/include [virtualenv/util/path/_sync.py:9]
py: 2293 D create folder /Users/runner/work/pepotron/pepotron/.tox/py/lib/python2.7/site-packages [virtualenv/util/path/_sync.py:9]
py: 2294 D write /Users/runner/work/pepotron/pepotron/.tox/py/pyvenv.cfg [virtualenv/create/pyenv_cfg.py:30]
py: 2295 D 	home = /Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS [virtualenv/create/pyenv_cfg.py:34]
py: 2295 D 	implementation = CPython [virtualenv/create/pyenv_cfg.py:34]
py: 2295 D 	version_info = 2.7.18.final.0 [virtualenv/create/pyenv_cfg.py:34]
py: 2295 D 	virtualenv = 20.17.0 [virtualenv/create/pyenv_cfg.py:34]
py: 2295 D 	include-system-site-packages = false [virtualenv/create/pyenv_cfg.py:34]
py: 2295 D 	base-prefix = /Library/Frameworks/Python.framework/Versions/2.7 [virtualenv/create/pyenv_cfg.py:34]
  Using cached pluggy-1.0.0-py2.py3-none-any.whl (13 kB)
Collecting tomli>=1.2.2
  Using cached tomli-2.0.1-py3-none-any.whl (12 kB)
Collecting pyparsing!=3.0.5,>=2.0.2
  Using cached pyparsing-3.0.9-py3-none-any.whl (98 kB)
Requirement already satisfied: setuptools in ./.tox/.pkg/lib/pypy3.8/site-packages (from setuptools-scm>=6.4.0->hatch-vcs) (65.6.3)
Collecting typing-extensions
  Downloading typing_extensions-4.4.0-py3-none-any.whl (26 kB)
Installing collected packages: typing-extensions, tomli, pyparsing, pluggy, pathspec, editables, packaging, setuptools-scm, hatchling, hatch-vcs
Successfully installed editables-0.3 hatch-vcs-0.2.0 hatchling-1.11.1 packaging-21.3 pathspec-0.10.2 pluggy-1.0.0 pyparsing-3.0.9 setuptools-scm-7.0.5 tomli-2.0.1 typing-extensions-4.4.0
.pkg: 12806 I exit 0 (6.42 seconds) /Users/runner/work/pepotron/pepotron> python -I -m pip install hatch-vcs hatchling pid=2012 [tox/execute/api.py:282]
.pkg: 12808 W get_requires_for_build_sdist> python /Users/runner/hostedtoolcache/PyPy/3.8.13/x64/lib/pypy3.8/site-packages/pyproject_api/_backend.py True hatchling.build [tox/tox_env/api.py:398]
Backend: run command get_requires_for_build_sdist with args {'config_settings': None}
Backend: Wrote response {'return': []} to /var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/pep517_get_requires_for_build_sdist-i76zpogp.json
.pkg: 13100 I exit None (0.29 seconds) /Users/runner/work/pepotron/pepotron> python /Users/runner/hostedtoolcache/PyPy/3.8.13/x64/lib/pypy3.8/site-packages/pyproject_api/_backend.py True hatchling.build pid=2096 [tox/execute/api.py:282]
.pkg: 13106 W build_sdist> python /Users/runner/hostedtoolcache/PyPy/3.8.13/x64/lib/pypy3.8/site-packages/pyproject_api/_backend.py True hatchling.build [tox/tox_env/api.py:398]
/Users/runner/work/pepotron/pepotron/.tox/.pkg/lib/pypy3.8/site-packages/setuptools_scm/git.py:135: UserWarning: "/Users/runner/work/pepotron/pepotron" is shallow and may cause errors
  warnings.warn(f'"{wd.path}" is shallow and may cause errors')
Backend: run command build_sdist with args {'sdist_directory': '/Users/runner/work/pepotron/pepotron/.tox/.pkg/dist', 'config_settings': None}
Backend: Wrote response {'return': 'pepotron-0.1.dev1.tar.gz'} to /var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/pep517_build_sdist-hxn5ynoj.json
.pkg: 13976 I exit None (0.78 seconds) /Users/runner/work/pepotron/pepotron> python /Users/runner/hostedtoolcache/PyPy/3.8.13/x64/lib/pypy3.8/site-packages/pyproject_api/_backend.py True hatchling.build pid=2096 [tox/execute/api.py:282]
py: 13980 W install_package_deps> python -E -m pip install freezegun 'httpx>=0.22' 'importlib-metadata; python_version < "3.8"' platformdirs pytest pytest-cov python-slugify thefuzz [tox/tox_env/api.py:398]
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality.
Collecting freezegun
  Downloading freezegun-0.3.15-py2.py3-none-any.whl (14 kB)
ERROR: Could not find a version that satisfies the requirement httpx>=0.22 (from versions: none)
ERROR: No matching distribution found for httpx>=0.22
py: [16](https://github.com/hugovk/pepotron/actions/runs/3583220509/jobs/6028393027#step:6:17)805 C exit 1 (2.81 seconds) /Users/runner/work/pepotron/pepotron> python -E -m pip install freezegun 'httpx>=0.22' 'importlib-metadata; python_version < "3.8"' platformdirs pytest pytest-cov python-slugify thefuzz pid=2113 [tox/execute/api.py:282]
.pkg: 16809 W _exit> python /Users/runner/hostedtoolcache/PyPy/3.8.13/x64/lib/pypy3.8/site-packages/pyproject_api/_backend.py True hatchling.build [tox/tox_env/api.py:398]
Backend: run command _exit with args {}
Backend: Wrote response {'return': 0} to /var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/pep5[17](https://github.com/hugovk/pepotron/actions/runs/3583220509/jobs/6028393027#step:6:18)__exit-en457j74.json
.pkg: 16817 I exit None (0.00 seconds) /Users/runner/work/pepotron/pepotron> python /Users/runner/hostedtoolcache/PyPy/3.8.13/x64/lib/pypy3.8/site-packages/pyproject_api/_backend.py True hatchling.build pid=2096 [tox/execute/api.py:282]
  py: FAIL code 1 (15.88 seconds)
  evaluation failed :( (16.[20](https://github.com/hugovk/pepotron/actions/runs/3583220509/jobs/6028393027#step:6:21) seconds)

Error: Process completed with exit code 1.
@gaborbernat gaborbernat added this to the 4.0 milestone Nov 30, 2022
@gaborbernat
Copy link
Member

gaborbernat commented Nov 30, 2022

This is a virtualenv bug rather than tox 👍 in version 4 we delegate this job to virtualenv, so someone should fill in a PR to virtualenv to address this.

@gaborbernat gaborbernat changed the title tox4: tox -e picking up 2.7 instead of PyPy3.8 on macOS tox -e picking up 2.7 instead of PyPy3.8 on macOS Dec 2, 2022
gaborbernat added a commit to pypa/virtualenv that referenced this issue Dec 5, 2022
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 a pull request may close this issue.

2 participants