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 is too cowardly to handle PyPy on Windows #1850

Closed
Tracked by #314
altendky opened this issue Jan 17, 2021 · 23 comments
Closed
Tracked by #314

tox is too cowardly to handle PyPy on Windows #1850

altendky opened this issue Jan 17, 2021 · 23 comments
Labels
bug:normal affects many people or has quite an impact

Comments

@altendky
Copy link

While working on twisted/towncrier#314 I started getting the cowardly refusing to delete `envdir` error.

https://github.com/twisted/towncrier/pull/314/checks?check_run_id=1715424156

I just recreated it locally as well. Note that the pep517 branch is over at https://github.com/altendky/towncrier/tree/ba56cc52d99810f93cfa3a2667025a06e7eda7e8.

In GitHub Actions:

ERROR: cowardly refusing to delete `envdir` (it does not look like a virtualenv): D:\a\towncrier\towncrier\.tox\pypy37-tests

Locally:

ERROR: cowardly refusing to delete `envdir` (it does not look like a virtualenv): C:\epc\towncrier\.tox\pypy37
.tox finish: provision  after 1.49 seconds
tox run
PS C:\epc\towncrier> venv/scripts/tox -rvve pypy37
using tox.ini: C:\epc\towncrier\tox.ini (pid 1876)
  removing C:\epc\towncrier\.tox\log
could not satisfy requires PackageNotFoundError('tox-wheel')
c:\epc\towncrier\venv\scripts\python.exe (c:\epc\towncrier\venv\scripts\python.exe) is {'executable': 'c:\\epc\\towncrier\\venv\\scripts\\python.exe', 'implementation': 'CPython', 'ver
sion_info': [3, 8, 3, 'final', 0], 'version': '3.8.3 (tags/v3.8.3:6f8c832, May 13 2020, 22:37:02) [MSC v.1924 64 bit (AMD64)]', 'is_64': True, 'sysplatform': 'win32', 'extra_version_in
fo': None}
.tox uses c:\epc\towncrier\venv\scripts\python.exe
using tox-3.21.1 from c:\epc\towncrier\venv\lib\site-packages\tox\__init__.py (pid 1876)
.tox start: getenv C:\epc\towncrier\.tox\.tox
.tox cannot reuse: -r flag
.tox recreate: C:\epc\towncrier\.tox\.tox
  removing C:\epc\towncrier\.tox\.tox
setting PATH=C:\epc\towncrier\.tox\.tox\Scripts;C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\Python36-32\Scripts\;C:\Program Files (x86)\Python36-32\;C:\Program Files (x8
6)\Python37-32\Scripts\;C:\Program Files (x86)\Python37-32\;bC:\Program Files (x86)\Python36-32\Scripts\;bC:\Program Files (x86)\Python36-32\;bC:\Program Files (x86)\Python35-32\Script
s\;bC:\Program Files (x86)\Python35-32\;bC:\Python27\;bC:\Python27\Scripts;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Progra
m Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\;C:\Program Files\TortoiseGit\bin;C:\ProgramData\chocolatey\bin;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\PuTTY\;C:\Progr
am Files\Git\cmd;C:\epc\pypy\pypy2.7-v7.3.3-win32;C:\epc\pypy\pypy3.6-v7.3.3-win32;C:\epc\pypy\pypy3.7-v7.3.3-win32;C:\Users\sda\AppData\Local\Microsoft\WindowsApps;C:\Program Files\Me
rcurial;C:\Program Files (x86)\Graphviz2.38\bin;C:\Program Files\Python36\Scripts;C:\Program Files\Python36;C:/msys2;;C:\Program Files\JetBrains\PyCharm Community Edition 2019.3.3\bin;

[5600] C:\epc\towncrier\.tox$ 'c:\epc\towncrier\venv\scripts\python.exe' -m virtualenv --no-download --python 'c:\epc\towncrier\venv\scripts\python.exe' .tox
created virtual environment CPython3.8.3.final.0-64 in 699ms
  creator CPython3Windows(dest=C:\epc\towncrier\.tox\.tox, clear=False, no_vcs_ignore=False, global=False)
  seeder FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=C:\Users\sda\AppData\Local\pypa\virtualenv)
    added seed packages: pip==20.3.3, setuptools==51.1.2, wheel==0.36.2
  activators BashActivator,BatchActivator,FishActivator,PowerShellActivator,PythonActivator,XonshActivator
.tox installdeps: virtualenv>=20.0.35, tox-wheel>=0.5.0, tox >= 3.21.1
setting PATH=C:\epc\towncrier\.tox\.tox\Scripts;C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\Python36-32\Scripts\;C:\Program Files (x86)\Python36-32\;C:\Program Files (x8
6)\Python37-32\Scripts\;C:\Program Files (x86)\Python37-32\;bC:\Program Files (x86)\Python36-32\Scripts\;bC:\Program Files (x86)\Python36-32\;bC:\Program Files (x86)\Python35-32\Script
s\;bC:\Program Files (x86)\Python35-32\;bC:\Python27\;bC:\Python27\Scripts;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Progra
m Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\;C:\Program Files\TortoiseGit\bin;C:\ProgramData\chocolatey\bin;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\PuTTY\;C:\Progr
am Files\Git\cmd;C:\epc\pypy\pypy2.7-v7.3.3-win32;C:\epc\pypy\pypy3.6-v7.3.3-win32;C:\epc\pypy\pypy3.7-v7.3.3-win32;C:\Users\sda\AppData\Local\Microsoft\WindowsApps;C:\Program Files\Me
rcurial;C:\Program Files (x86)\Graphviz2.38\bin;C:\Program Files\Python36\Scripts;C:\Program Files\Python36;C:/msys2;;C:\Program Files\JetBrains\PyCharm Community Edition 2019.3.3\bin;

[9208] C:\epc\towncrier$ 'C:\epc\towncrier\.tox\.tox\Scripts\python.EXE' -m pip install 'virtualenv>=20.0.35' 'tox-wheel>=0.5.0' 'tox >= 3.21.1'
Collecting tox>=3.21.1
  Using cached tox-3.21.1-py2.py3-none-any.whl (84 kB)
Collecting tox-wheel>=0.5.0
  Using cached tox_wheel-0.6.0-py2.py3-none-any.whl (6.2 kB)
Requirement already satisfied: wheel>=0.33.1 in c:\epc\towncrier\.tox\.tox\lib\site-packages (from tox-wheel>=0.5.0) (0.36.2)
Collecting virtualenv>=20.0.35
  Using cached virtualenv-20.3.1-py2.py3-none-any.whl (5.7 MB)
Collecting appdirs<2,>=1.4.3
  Using cached appdirs-1.4.4-py2.py3-none-any.whl (9.6 kB)
Collecting colorama>=0.4.1
  Using cached colorama-0.4.4-py2.py3-none-any.whl (16 kB)
Collecting distlib<1,>=0.3.1
  Using cached distlib-0.3.1-py2.py3-none-any.whl (335 kB)
Collecting filelock>=3.0.0
  Using cached filelock-3.0.12-py3-none-any.whl (7.6 kB)
Collecting packaging>=14
  Using cached packaging-20.8-py2.py3-none-any.whl (39 kB)
Collecting pluggy>=0.12.0
  Using cached pluggy-0.13.1-py2.py3-none-any.whl (18 kB)
Collecting py>=1.4.17
  Using cached py-1.10.0-py2.py3-none-any.whl (97 kB)
Collecting pyparsing>=2.0.2
  Using cached pyparsing-2.4.7-py2.py3-none-any.whl (67 kB)
Collecting six>=1.14.0
  Using cached six-1.15.0-py2.py3-none-any.whl (10 kB)
Collecting toml>=0.9.4
  Using cached toml-0.10.2-py2.py3-none-any.whl (16 kB)
Installing collected packages: six, pyparsing, filelock, distlib, appdirs, virtualenv, toml, py, pluggy, packaging, colorama, tox, tox-wheel
Successfully installed appdirs-1.4.4 colorama-0.4.4 distlib-0.3.1 filelock-3.0.12 packaging-20.8 pluggy-0.13.1 py-1.10.0 pyparsing-2.4.7 six-1.15.0 toml-0.10.2 tox-3.21.1 tox-wheel-0.6
.0 virtualenv-20.3.1
.tox finish: getenv C:\epc\towncrier\.tox\.tox after 9.69 seconds
.tox start: finishvenv
write config to C:\epc\towncrier\.tox\.tox\.tox-config1 as '816ef0f857cb2f72728ddf61395329dd26c0f9a88df46df2d43d775f24215a49 c:\\epc\\towncrier\\venv\\scripts\\python.exe\n3.21.1 0 0 0
\n00000000000000000000000000000000 virtualenv>=20.0.35\n00000000000000000000000000000000 tox-wheel>=0.5.0\n00000000000000000000000000000000 tox >= 3.21.1'
.tox finish: finishvenv  after 0.01 seconds
.tox start: provision
[10116] C:\epc\towncrier$ 'C:\epc\towncrier\.tox\.tox\Scripts\python' -m tox -rvve pypy37
using tox.ini: C:\epc\towncrier\tox.ini (pid 4808)
py27-tests uses C:\users\sda\desktop\install\python27\python.exe
py27-flake8 uses C:\users\sda\desktop\install\python27\python.exe
py27-check-manifest uses C:\users\sda\desktop\install\python27\python.exe
py27-check-newsfragment uses C:\users\sda\desktop\install\python27\python.exe
py35-tests uses C:\users\sda\desktop\install\python\python.exe
py35-check-manifest uses C:\users\sda\desktop\install\python\python.exe
py36-tests uses C:\Program Files\Python36\python.exe
py35-flake8 uses C:\users\sda\desktop\install\python\python.exe
py35-check-newsfragment uses C:\users\sda\desktop\install\python\python.exe
py37-check-newsfragment uses C:\Program Files\Python37\python.exe
py36-check-newsfragment uses C:\Program Files\Python36\python.exe
py36-flake8 uses C:\Program Files\Python36\python.exe
py37-flake8 uses C:\Program Files\Python37\python.exe
py37-check-manifest uses C:\Program Files\Python37\python.exe
py37-tests uses C:\Program Files\Python37\python.exe
py36-check-manifest uses C:\Program Files\Python36\python.exe
pypy3.7 (C:\epc\pypy\pypy3.7-v7.3.3-win32\pypy3.7.EXE) is {'executable': 'C:\\epc\\pypy\\pypy3.7-v7.3.3-win32\\pypy3.7.EXE', 'implementation': 'PyPy', 'version_info': [3, 7, 9, 'final'
, 0], 'version': '3.7.9 (7e6e2bb30ac5, Nov 18 2020, 12:05:16)\n[PyPy 7.3.3-beta0 with MSC v.1927 32 bit]', 'is_64': False, 'sysplatform': 'win32', 'extra_version_info': [7, 3, 3, 'beta
', 0]}
pypy37-flake8 uses C:\epc\pypy\pypy3.7-v7.3.3-win32\pypy3.7.EXE
pypy37-tests uses C:\epc\pypy\pypy3.7-v7.3.3-win32\pypy3.7.EXE
pypy37-check-newsfragment uses C:\epc\pypy\pypy3.7-v7.3.3-win32\pypy3.7.EXE
pypy37 uses C:\epc\pypy\pypy3.7-v7.3.3-win32\pypy3.7.EXE
pypy37-check-manifest uses C:\epc\pypy\pypy3.7-v7.3.3-win32\pypy3.7.EXE
pypy36-check-manifest uses None
pypy27-check-newsfragment uses None
pypy27-tests uses None
pypy36-check-newsfragment uses None
pypy36-flake8 uses None
pypy36-tests uses None
pypy27-flake8 uses None
pypy27-check-manifest uses None
using tox-3.21.1 from C:\epc\towncrier\.tox\.tox\lib\site-packages\tox\__init__.py (pid 4808)
pypy37 start: packaging
pypy37 cannot reuse: -r flag
pypy37 create: C:\epc\towncrier\.tox\pypy37
ERROR: cowardly refusing to delete `envdir` (it does not look like a virtualenv): C:\epc\towncrier\.tox\pypy37
.tox finish: provision  after 1.49 seconds
tree of .tox
PS C:\epc\towncrier> tree .tox
Folder PATH listing
Volume serial number is EE1D-B508
C:\EPC\TOWNCRIER\.TOX
├───.tmp
│   └───package
├───.tox
│   ├───Lib
│   │   └───site-packages
│   │       ├───appdirs-1.4.4.dist-info
│   │       ├───colorama
│   │       │   └───__pycache__
│   │       ├───colorama-0.4.4.dist-info
│   │       ├───distlib
│   │       │   ├───_backport
│   │       │   │   └───__pycache__
│   │       │   └───__pycache__
│   │       ├───distlib-0.3.1.dist-info
│   │       ├───filelock-3.0.12.dist-info
│   │       ├───packaging
│   │       │   └───__pycache__
│   │       ├───packaging-20.8.dist-info
│   │       ├───pip
│   │       │   ├───_internal
│   │       │   │   ├───cli
│   │       │   │   │   └───__pycache__
│   │       │   │   ├───commands
│   │       │   │   │   └───__pycache__
│   │       │   │   ├───distributions
│   │       │   │   │   └───__pycache__
│   │       │   │   ├───index
│   │       │   │   │   └───__pycache__
│   │       │   │   ├───models
│   │       │   │   │   └───__pycache__
│   │       │   │   ├───network
│   │       │   │   │   └───__pycache__
│   │       │   │   ├───operations
│   │       │   │   │   ├───build
│   │       │   │   │   │   └───__pycache__
│   │       │   │   │   ├───install
│   │       │   │   │   │   └───__pycache__
│   │       │   │   │   └───__pycache__
│   │       │   │   ├───req
│   │       │   │   │   └───__pycache__
│   │       │   │   ├───resolution
│   │       │   │   │   ├───legacy
│   │       │   │   │   ├───resolvelib
│   │       │   │   │   │   └───__pycache__
│   │       │   │   │   └───__pycache__
│   │       │   │   ├───utils
│   │       │   │   │   └───__pycache__
│   │       │   │   ├───vcs
│   │       │   │   │   └───__pycache__
│   │       │   │   └───__pycache__
│   │       │   ├───_vendor
│   │       │   │   ├───cachecontrol
│   │       │   │   │   ├───caches
│   │       │   │   │   │   └───__pycache__
│   │       │   │   │   └───__pycache__
│   │       │   │   ├───certifi
│   │       │   │   │   └───__pycache__
│   │       │   │   ├───chardet
│   │       │   │   │   ├───cli
│   │       │   │   │   └───__pycache__
│   │       │   │   ├───colorama
│   │       │   │   │   └───__pycache__
│   │       │   │   ├───distlib
│   │       │   │   │   ├───_backport
│   │       │   │   │   └───__pycache__
│   │       │   │   ├───html5lib
│   │       │   │   │   ├───filters
│   │       │   │   │   ├───treeadapters
│   │       │   │   │   ├───treebuilders
│   │       │   │   │   │   └───__pycache__
│   │       │   │   │   ├───treewalkers
│   │       │   │   │   │   └───__pycache__
│   │       │   │   │   ├───_trie
│   │       │   │   │   │   └───__pycache__
│   │       │   │   │   └───__pycache__
│   │       │   │   ├───idna
│   │       │   │   │   └───__pycache__
│   │       │   │   ├───msgpack
│   │       │   │   │   └───__pycache__
│   │       │   │   ├───packaging
│   │       │   │   │   └───__pycache__
│   │       │   │   ├───pep517
│   │       │   │   │   └───__pycache__
│   │       │   │   ├───pkg_resources
│   │       │   │   │   └───__pycache__
│   │       │   │   ├───progress
│   │       │   │   │   └───__pycache__
│   │       │   │   ├───requests
│   │       │   │   │   └───__pycache__
│   │       │   │   ├───resolvelib
│   │       │   │   │   ├───compat
│   │       │   │   │   │   └───__pycache__
│   │       │   │   │   └───__pycache__
│   │       │   │   ├───toml
│   │       │   │   │   └───__pycache__
│   │       │   │   ├───urllib3
│   │       │   │   │   ├───contrib
│   │       │   │   │   │   ├───_securetransport
│   │       │   │   │   │   └───__pycache__
│   │       │   │   │   ├───packages
│   │       │   │   │   │   ├───backports
│   │       │   │   │   │   ├───ssl_match_hostname
│   │       │   │   │   │   │   └───__pycache__
│   │       │   │   │   │   └───__pycache__
│   │       │   │   │   ├───util
│   │       │   │   │   │   └───__pycache__
│   │       │   │   │   └───__pycache__
│   │       │   │   ├───webencodings
│   │       │   │   │   └───__pycache__
│   │       │   │   └───__pycache__
│   │       │   └───__pycache__
│   │       ├───pip-20.3.3.dist-info
│   │       ├───pkg_resources
│   │       │   ├───extern
│   │       │   └───_vendor
│   │       │       └───packaging
│   │       ├───pluggy
│   │       │   └───__pycache__
│   │       ├───pluggy-0.13.1.dist-info
│   │       ├───py
│   │       │   ├───_code
│   │       │   │   └───__pycache__
│   │       │   ├───_io
│   │       │   │   └───__pycache__
│   │       │   ├───_log
│   │       │   │   └───__pycache__
│   │       │   ├───_path
│   │       │   │   └───__pycache__
│   │       │   ├───_process
│   │       │   │   └───__pycache__
│   │       │   ├───_vendored_packages
│   │       │   │   ├───apipkg
│   │       │   │   │   └───__pycache__
│   │       │   │   ├───apipkg-1.5.dist-info
│   │       │   │   ├───iniconfig
│   │       │   │   │   └───__pycache__
│   │       │   │   ├───iniconfig-1.1.1.dist-info
│   │       │   │   └───__pycache__
│   │       │   └───__pycache__
│   │       ├───py-1.10.0.dist-info
│   │       ├───pyparsing-2.4.7.dist-info
│   │       ├───setuptools
│   │       │   ├───command
│   │       │   ├───extern
│   │       │   ├───_distutils
│   │       │   │   └───command
│   │       │   └───_vendor
│   │       │       └───packaging
│   │       ├───setuptools-51.1.2.dist-info
│   │       ├───six-1.15.0.dist-info
│   │       ├───toml
│   │       │   └───__pycache__
│   │       ├───toml-0.10.2.dist-info
│   │       ├───tox
│   │       │   ├───config
│   │       │   │   └───__pycache__
│   │       │   ├───helper
│   │       │   │   └───__pycache__
│   │       │   ├───interpreters
│   │       │   │   ├───windows
│   │       │   │   │   └───__pycache__
│   │       │   │   └───__pycache__
│   │       │   ├───logs
│   │       │   │   └───__pycache__
│   │       │   ├───package
│   │       │   │   ├───builder
│   │       │   │   │   └───__pycache__
│   │       │   │   └───__pycache__
│   │       │   ├───session
│   │       │   │   ├───commands
│   │       │   │   │   ├───run
│   │       │   │   │   │   └───__pycache__
│   │       │   │   │   └───__pycache__
│   │       │   │   └───__pycache__
│   │       │   ├───util
│   │       │   │   └───__pycache__
│   │       │   └───__pycache__
│   │       ├───tox-3.21.1.dist-info
│   │       ├───tox_wheel
│   │       │   └───__pycache__
│   │       ├───tox_wheel-0.6.0.dist-info
│   │       ├───virtualenv
│   │       │   ├───activation
│   │       │   │   ├───bash
│   │       │   │   │   └───__pycache__
│   │       │   │   ├───batch
│   │       │   │   │   └───__pycache__
│   │       │   │   ├───cshell
│   │       │   │   │   └───__pycache__
│   │       │   │   ├───fish
│   │       │   │   │   └───__pycache__
│   │       │   │   ├───powershell
│   │       │   │   │   └───__pycache__
│   │       │   │   ├───python
│   │       │   │   │   └───__pycache__
│   │       │   │   ├───xonsh
│   │       │   │   │   └───__pycache__
│   │       │   │   └───__pycache__
│   │       │   ├───app_data
│   │       │   │   └───__pycache__
│   │       │   ├───config
│   │       │   │   ├───cli
│   │       │   │   │   └───__pycache__
│   │       │   │   └───__pycache__
│   │       │   ├───create
│   │       │   │   ├───via_global_ref
│   │       │   │   │   ├───builtin
│   │       │   │   │   │   ├───cpython
│   │       │   │   │   │   │   └───__pycache__
│   │       │   │   │   │   ├───pypy
│   │       │   │   │   │   │   └───__pycache__
│   │       │   │   │   │   ├───python2
│   │       │   │   │   │   │   └───__pycache__
│   │       │   │   │   │   └───__pycache__
│   │       │   │   │   └───__pycache__
│   │       │   │   └───__pycache__
│   │       │   ├───discovery
│   │       │   │   ├───windows
│   │       │   │   │   └───__pycache__
│   │       │   │   └───__pycache__
│   │       │   ├───run
│   │       │   │   ├───plugin
│   │       │   │   │   └───__pycache__
│   │       │   │   └───__pycache__
│   │       │   ├───seed
│   │       │   │   ├───embed
│   │       │   │   │   ├───via_app_data
│   │       │   │   │   │   ├───pip_install
│   │       │   │   │   │   │   └───__pycache__
│   │       │   │   │   │   └───__pycache__
│   │       │   │   │   └───__pycache__
│   │       │   │   ├───wheels
│   │       │   │   │   ├───embed
│   │       │   │   │   │   └───__pycache__
│   │       │   │   │   └───__pycache__
│   │       │   │   └───__pycache__
│   │       │   ├───util
│   │       │   │   ├───path
│   │       │   │   │   ├───_pathlib
│   │       │   │   │   │   └───__pycache__
│   │       │   │   │   └───__pycache__
│   │       │   │   ├───subprocess
│   │       │   │   │   └───__pycache__
│   │       │   │   └───__pycache__
│   │       │   └───__pycache__
│   │       ├───virtualenv-20.3.1.dist-info
│   │       ├───wheel
│   │       │   ├───cli
│   │       │   └───vendored
│   │       │       └───packaging
│   │       ├───wheel-0.36.2.dist-info
│   │       ├───_distutils_hack
│   │       └───__pycache__
│   └───Scripts
├───dist
├───log
└───pypy37
    ├───lib
    │   └───python3.7
    │       └───site-packages
    ├───Scripts
    └───site-packages
        ├───attr
        │   └───__pycache__
        ├───attrs-20.3.0.dist-info
        ├───automat
        │   ├───_test
        │   │   └───__pycache__
        │   └───__pycache__
        ├───Automat-20.2.0.dist-info
        ├───constantly
        │   └───__pycache__
        ├───constantly-15.1.0.dist-info
        ├───coverage
        │   ├───fullcoverage
        │   │   └───__pycache__
        │   ├───htmlfiles
        │   └───__pycache__
        ├───coverage-5.3.1.dist-info
        ├───exampleproj
        │   └───__pycache__
        ├───hamcrest
        │   ├───core
        │   │   ├───core
        │   │   │   └───__pycache__
        │   │   ├───helpers
        │   │   │   └───__pycache__
        │   │   └───__pycache__
        │   ├───library
        │   │   ├───collection
        │   │   │   └───__pycache__
        │   │   ├───integration
        │   │   │   └───__pycache__
        │   │   ├───number
        │   │   │   └───__pycache__
        │   │   ├───object
        │   │   │   └───__pycache__
        │   │   ├───text
        │   │   │   └───__pycache__
        │   │   └───__pycache__
        │   └───__pycache__
        ├───hyperlink
        │   ├───test
        │   │   └───__pycache__
        │   └───__pycache__
        ├───hyperlink-21.0.0.dist-info
        ├───idna
        │   └───__pycache__
        ├───idna-3.1.dist-info
        ├───incremental
        │   ├───tests
        │   │   └───__pycache__
        │   └───__pycache__
        ├───incremental-17.5.0.dist-info
        ├───mock
        │   └───__pycache__
        ├───mock-4.0.3.dist-info
        ├───pip
        │   ├───_internal
        │   │   ├───cli
        │   │   │   └───__pycache__
        │   │   ├───commands
        │   │   │   └───__pycache__
        │   │   ├───distributions
        │   │   │   └───__pycache__
        │   │   ├───index
        │   │   │   └───__pycache__
        │   │   ├───models
        │   │   │   └───__pycache__
        │   │   ├───network
        │   │   │   └───__pycache__
        │   │   ├───operations
        │   │   │   ├───build
        │   │   │   │   └───__pycache__
        │   │   │   ├───install
        │   │   │   │   └───__pycache__
        │   │   │   └───__pycache__
        │   │   ├───req
        │   │   │   └───__pycache__
        │   │   ├───resolution
        │   │   │   ├───legacy
        │   │   │   ├───resolvelib
        │   │   │   │   └───__pycache__
        │   │   │   └───__pycache__
        │   │   ├───utils
        │   │   │   └───__pycache__
        │   │   ├───vcs
        │   │   │   └───__pycache__
        │   │   └───__pycache__
        │   ├───_vendor
        │   │   ├───cachecontrol
        │   │   │   ├───caches
        │   │   │   │   └───__pycache__
        │   │   │   └───__pycache__
        │   │   ├───certifi
        │   │   │   └───__pycache__
        │   │   ├───chardet
        │   │   │   ├───cli
        │   │   │   └───__pycache__
        │   │   ├───colorama
        │   │   │   └───__pycache__
        │   │   ├───distlib
        │   │   │   ├───_backport
        │   │   │   └───__pycache__
        │   │   ├───html5lib
        │   │   │   ├───filters
        │   │   │   ├───treeadapters
        │   │   │   ├───treebuilders
        │   │   │   │   └───__pycache__
        │   │   │   ├───treewalkers
        │   │   │   │   └───__pycache__
        │   │   │   ├───_trie
        │   │   │   │   └───__pycache__
        │   │   │   └───__pycache__
        │   │   ├───idna
        │   │   │   └───__pycache__
        │   │   ├───msgpack
        │   │   │   └───__pycache__
        │   │   ├───packaging
        │   │   │   └───__pycache__
        │   │   ├───pep517
        │   │   │   └───__pycache__
        │   │   ├───pkg_resources
        │   │   │   └───__pycache__
        │   │   ├───progress
        │   │   │   └───__pycache__
        │   │   ├───requests
        │   │   │   └───__pycache__
        │   │   ├───resolvelib
        │   │   │   ├───compat
        │   │   │   │   └───__pycache__
        │   │   │   └───__pycache__
        │   │   ├───toml
        │   │   │   └───__pycache__
        │   │   ├───urllib3
        │   │   │   ├───contrib
        │   │   │   │   ├───_securetransport
        │   │   │   │   └───__pycache__
        │   │   │   ├───packages
        │   │   │   │   ├───backports
        │   │   │   │   ├───ssl_match_hostname
        │   │   │   │   │   └───__pycache__
        │   │   │   │   └───__pycache__
        │   │   │   ├───util
        │   │   │   │   └───__pycache__
        │   │   │   └───__pycache__
        │   │   ├───webencodings
        │   │   │   └───__pycache__
        │   │   └───__pycache__
        │   └───__pycache__
        ├───pip-20.3.1.dist-info
        ├───pkg_resources
        │   ├───extern
        │   │   └───__pycache__
        │   ├───_vendor
        │   │   ├───packaging
        │   │   │   └───__pycache__
        │   │   └───__pycache__
        │   └───__pycache__
        ├───PyHamcrest-2.0.2.dist-info
        ├───setuptools
        │   ├───command
        │   │   └───__pycache__
        │   ├───extern
        │   │   └───__pycache__
        │   ├───_distutils
        │   │   └───command
        │   ├───_vendor
        │   │   ├───packaging
        │   │   │   └───__pycache__
        │   │   └───__pycache__
        │   └───__pycache__
        ├───setuptools-50.3.2.dist-info
        ├───six-1.15.0.dist-info
        ├───twisted
        │   ├───application
        │   │   ├───runner
        │   │   │   ├───test
        │   │   │   │   └───__pycache__
        │   │   │   └───__pycache__
        │   │   ├───test
        │   │   │   └───__pycache__
        │   │   ├───twist
        │   │   │   ├───test
        │   │   │   │   └───__pycache__
        │   │   │   └───__pycache__
        │   │   └───__pycache__
        │   ├───conch
        │   │   ├───client
        │   │   │   └───__pycache__
        │   │   ├───insults
        │   │   │   └───__pycache__
        │   │   ├───openssh_compat
        │   │   │   └───__pycache__
        │   │   ├───scripts
        │   │   │   └───__pycache__
        │   │   ├───ssh
        │   │   │   └───__pycache__
        │   │   ├───test
        │   │   │   └───__pycache__
        │   │   ├───ui
        │   │   │   └───__pycache__
        │   │   └───__pycache__
        │   ├───cred
        │   │   ├───test
        │   │   │   └───__pycache__
        │   │   └───__pycache__
        │   ├───enterprise
        │   │   └───__pycache__
        │   ├───internet
        │   │   ├───iocpreactor
        │   │   │   └───__pycache__
        │   │   ├───test
        │   │   │   ├───fake_CAs
        │   │   │   └───__pycache__
        │   │   └───__pycache__
        │   ├───logger
        │   │   ├───test
        │   │   │   └───__pycache__
        │   │   └───__pycache__
        │   ├───mail
        │   │   ├───scripts
        │   │   │   └───__pycache__
        │   │   ├───test
        │   │   │   └───__pycache__
        │   │   └───__pycache__
        │   ├───names
        │   │   ├───test
        │   │   │   └───__pycache__
        │   │   └───__pycache__
        │   ├───pair
        │   │   ├───test
        │   │   │   └───__pycache__
        │   │   └───__pycache__
        │   ├───persisted
        │   │   ├───test
        │   │   │   └───__pycache__
        │   │   └───__pycache__
        │   ├───plugins
        │   │   └───__pycache__
        │   ├───positioning
        │   │   ├───test
        │   │   │   └───__pycache__
        │   │   └───__pycache__
        │   ├───protocols
        │   │   ├───haproxy
        │   │   │   ├───test
        │   │   │   │   └───__pycache__
        │   │   │   └───__pycache__
        │   │   ├───test
        │   │   │   └───__pycache__
        │   │   └───__pycache__
        │   ├───python
        │   │   ├───test
        │   │   │   └───__pycache__
        │   │   ├───_pydoctortemplates
        │   │   └───__pycache__
        │   ├───runner
        │   │   ├───test
        │   │   │   └───__pycache__
        │   │   └───__pycache__
        │   ├───scripts
        │   │   ├───test
        │   │   │   └───__pycache__
        │   │   └───__pycache__
        │   ├───spread
        │   │   ├───test
        │   │   │   └───__pycache__
        │   │   └───__pycache__
        │   ├───tap
        │   │   └───__pycache__
        │   ├───test
        │   │   └───__pycache__
        │   ├───trial
        │   │   ├───test
        │   │   │   └───__pycache__
        │   │   ├───_dist
        │   │   │   ├───test
        │   │   │   │   └───__pycache__
        │   │   │   └───__pycache__
        │   │   └───__pycache__
        │   ├───web
        │   │   ├───test
        │   │   │   └───__pycache__
        │   │   ├───_auth
        │   │   │   └───__pycache__
        │   │   └───__pycache__
        │   ├───words
        │   │   ├───im
        │   │   │   └───__pycache__
        │   │   ├───protocols
        │   │   │   ├───jabber
        │   │   │   │   └───__pycache__
        │   │   │   └───__pycache__
        │   │   ├───test
        │   │   │   └───__pycache__
        │   │   ├───xish
        │   │   │   └───__pycache__
        │   │   └───__pycache__
        │   ├───_threads
        │   │   ├───test
        │   │   │   └───__pycache__
        │   │   └───__pycache__
        │   └───__pycache__
        ├───Twisted-20.3.0.dist-info
        ├───wheel
        │   ├───cli
        │   │   └───__pycache__
        │   ├───vendored
        │   │   ├───packaging
        │   │   │   └───__pycache__
        │   │   └───__pycache__
        │   └───__pycache__
        ├───wheel-0.36.0.dist-info
        ├───zope
        │   └───interface
        │       ├───common
        │       │   ├───tests
        │       │   │   └───__pycache__
        │       │   └───__pycache__
        │       ├───tests
        │       │   └───__pycache__
        │       └───__pycache__
        ├───zope.interface-5.2.0.dist-info
        ├───_distutils_hack
        │   └───__pycache__
        └───__pycache__
@altendky altendky added the bug:normal affects many people or has quite an impact label Jan 17, 2021
@asottile
Copy link
Contributor

looks like pypy chose lib and Scripts instead of Lib and Scripts for some reason -- I wonder if this is something pypy should change to be more like cpython:

or (INFO.IS_WIN and dir_items > {"Scripts", "Lib"})

@gaborbernat
Copy link
Member

I disagree. IMHO here the issue is we're not interrogating the target environment about its sysconfig, but assuming hardcoded paths. 🤷🏻 Python distributions are free to change their directory layout as they wish and there's no PEP to restrict them in any way...

@asottile
Copy link
Contributor

asottile commented Feb 1, 2021

@gaborbernat why didn't tox write its .tox-config1 into this environment?

@gaborbernat
Copy link
Member

I'm not sure from the top of my head 🤔

@asottile
Copy link
Contributor

asottile commented Feb 1, 2021

the directory interrogation is really only meant for the situation where tox is replacing a --devenv -- so something must've changed that prevented it from writing the .tox-config correctly

@gaborbernat
Copy link
Member

Closing this as seems is a transient state.

@altendky
Copy link
Author

Transient? It happens every time I run the CI on that PR.

@altendky
Copy link
Author

I also didn't add PyPy testing on Windows for Twisted due to this.

twisted/twisted#1516 (comment)

@asottile
Copy link
Contributor

I can't reproduce, so it's something you're not showing I assume:

(venv) C:\Users\asott\AppData\Local\Temp\x\astpretty>pip freeze --all
appdirs==1.4.4
cffi==1.14.3
colorama==0.4.4
distlib==0.3.1
filelock==3.0.12
greenlet==0.4.13
importlib-metadata==3.7.0
packaging==20.9
pip==20.1.1
pluggy==0.13.1
py==1.10.0
pyparsing==2.4.7
readline==6.2.4.1
setuptools==47.1.0
six==1.15.0
toml==0.10.2
tox==3.22.0
typing-extensions==3.7.4.3
virtualenv==20.4.2
zipp==3.4.0

(venv) C:\Users\asott\AppData\Local\Temp\x\astpretty>tox -e pypy37
GLOB sdist-make: C:\Users\asott\AppData\Local\Temp\x\astpretty\setup.py
pypy37 create: C:\Users\asott\AppData\Local\Temp\x\astpretty\.tox\pypy37
pypy37 installdeps: -rrequirements-dev.txt
pypy37 inst: C:\Users\asott\AppData\Local\Temp\x\astpretty\.tox\.tmp\package\1\astpretty-2.1.0.zip
pypy37 installed: astpretty @ file:///C:/Users/asott/AppData/Local/Temp/x/astpretty/.tox/.tmp/package/1/astpretty-2.1.0.zip,atomicwrites==1.4.0,attrs==20.3.0,cffi==1.14.3,colorama==0.4.4,covdefaults==1.2.0,coverage==5.4,greenlet==0.4.13,importlib-metadata==3.7.0,iniconfig==1.1.1,packaging==20.9,pluggy==0.13.1,py==1.10.0,pyparsing==2.4.7,pytest==6.2.2,readline==6.2.4.1,toml==0.10.2,typing-extensions==3.7.4.3,zipp==3.4.0
pypy37 run-test-pre: PYTHONHASHSEED='198'
pypy37 run-test: commands[0] | coverage erase
pypy37 run-test: commands[1] | coverage run -m pytest tests
================================================= test session starts =================================================
platform win32 -- Python 3.7.9[pypy-7.3.3-beta], pytest-6.2.2, py-1.10.0, pluggy-0.13.1
cachedir: .tox\pypy37\.pytest_cache
rootdir: C:\Users\asott\AppData\Local\Temp\x\astpretty
collected 28 items

tests\astpretty_test.py ......................xxxxxx                                                             [100%]

============================================ 22 passed, 6 xfailed in 3.34s ============================================
pypy37 run-test: commands[2] | coverage report --fail-under 100
Name    Stmts   Miss Branch BrPart  Cover   Missing
---------------------------------------------------
---------------------------------------------------
TOTAL     193      0     36      0   100%

3 files skipped due to complete coverage.
_______________________________________________________ summary _______________________________________________________
  pypy37: commands succeeded
  congratulations :)

@altendky
Copy link
Author

I'm not sure what I could be not showing in my public repositories and CI runs... :] With a tool that tox uses, no less.

Did you try reproducing using the PR that was shared as exposing the issue? I'm not surprised that an unrelated project doesn't have a problem. But sure, it doesn't happen everywhere.

Anyways, I'll try to break down the change to get to something more specific since complete build records apparently aren't sufficient.

Sorry there's some snark here, but suggesting I am keeping secrets doesn't really seem fair given everything noted above.

@asottile
Copy link
Contributor

my guess is you're using some plugin which is monkeypatching tox internals in a broken way and that's what's causing your problem

I've demonstrated it's not an issue with tox

note also that we're doing this for free and we're not your personal debugging service, so please have some empathy

@altendky
Copy link
Author

altendky commented Feb 27, 2021

I'm trying to get the next version of a tool you use released... so likewise. I didn't complain about it not getting fixed quickly. I didn't complain about the closure, just tried to clarify. Being told I'm not sharing things when the complete code and build log are available is not reasonable. And you know perfectly well that a single case (that is not the reported one) working is not remotely close to evidence it isn't an issue with tox. But sure, there is a whole project involved here.

@tox-dev tox-dev locked as resolved and limited conversation to collaborators Feb 27, 2021
@gaborbernat gaborbernat reopened this Feb 27, 2021
@tox-dev tox-dev unlocked this conversation Feb 27, 2021
@altendky
Copy link
Author

It seems that PyPy 3.7 itself is unable to create a venv. Further it fails without a failure exit code from what I can tell. I noticed this locally first but recreated in CI for sharing. I'll try to dig into this in the PyPy direction. PyPy 3.6 does successfully create an env directly in CI and exhibits the same issue reported above when used via tox.

The fact that 3.6 and 3.7 both have the same issue via tox but different issues when calling its venv directly leaves me thinking there is a PyPI issue and also another issue still that may be in tox. But sure, when there's an issue this flagrant in a relevant bit of the underlying tooling (PyPy venv), I understand that being a thing that should perhaps be explored first.

PyPy 3.6:
https://github.com/twisted/towncrier/pull/321/checks?check_run_id=1995458131

I noticed that the tree I provided in the initial report lacks the actual files, instead only listing the directories. Apparently tree in Windows required /f to show files... My apologies for that error.

Note that this exploration was added in the separate PR https://github.com/twisted/towncrier/pull/321/files.

https://github.com/twisted/towncrier/pull/321/checks?check_run_id=1995458141

    - name: Try creating an env
      if: matrix.python.major == 3
      run: |
        python -m venv a_unique_env_directory
        tree /f a_unique_env_directory
2021-02-27T21:01:27.3134872Z �[36;1mpython -m venv a_unique_env_directory�[0m
2021-02-27T21:01:27.3135441Z �[36;1mtree /f a_unique_env_directory�[0m
2021-02-27T21:01:27.3200612Z shell: C:\Program Files\PowerShell\7\pwsh.EXE -command ". '{0}'"
2021-02-27T21:01:27.3201167Z env:
2021-02-27T21:01:27.3201713Z   pythonLocation: C:\hostedtoolcache\windows\PyPy\3.7.9\x86
2021-02-27T21:01:27.3202321Z ##[endgroup]
2021-02-27T21:01:28.0784308Z Unable to copy 'C:\\hostedtoolcache\\windows\\PyPy\\3.7.9\\x86\\venvlauncher.exe'
2021-02-27T21:01:28.2212747Z Error: [WinError 2] The system cannot find the file specified
2021-02-27T21:01:28.2590284Z Folder PATH listing for volume Temporary Storage
2021-02-27T21:01:28.2591041Z Volume serial number is 3672-F364
2021-02-27T21:01:28.2591678Z D:\A\TOWNCRIER\TOWNCRIER\A_UNIQUE_ENV_DIRECTORY
2021-02-27T21:01:28.2594289Z �   pyvenv.cfg
2021-02-27T21:01:28.2594893Z �   
2021-02-27T21:01:28.2595728Z ����Include
2021-02-27T21:01:28.2596391Z ����Lib
2021-02-27T21:01:28.2596961Z �   ����site-packages
2021-02-27T21:01:28.2598233Z ����Scripts
2021-02-27T21:01:28.2599258Z         libpypy3-c.dll
2021-02-27T21:01:28.2600784Z         pypy3.exe

image

@gaborbernat
Copy link
Member

I'm 99% sure this will end up being a pypy bug and we can't do much here.

@gaborbernat gaborbernat changed the title Tox is too cowardly to handle PyPy on Windows tox is too cowardly to handle PyPy on Windows Feb 28, 2021
@gaborbernat
Copy link
Member

PyPy3 on Windows uses lowercase lib instead of uppercase Lib and this breaks our assumptions in tox 3 - see

or (INFO.IS_WIN and dir_items > {"Scripts", "Lib"})

@gaborbernat
Copy link
Member

gaborbernat commented Mar 1, 2021

The underlying issue here is that newer pypy patches the path for venv at https://foss.heptapod.net/pypy/pypy/-/blob/branch/py3.7/lib-python/3/venv/__init__.py#L128-137, rather than use sysconfig.purelib/sysconfig.platlib as one would expect 🤔 and virtualenv patches for an old behaviour of pypy... Which is inline with what CPython does https://github.com/python/cpython/blob/master/Lib/venv/__init__.py#L122-L131, https://github.com/pypa/virtualenv/blob/main/src/virtualenv/create/via_global_ref/builtin/pypy/pypy3.py#L26

@gaborbernat
Copy link
Member

The issue here is pypa/virtualenv#2071

@altendky
Copy link
Author

altendky commented Mar 1, 2021

@gaborbernat, thank you for your time digging into this. You are certainly more familiar with these mechanisms including how they should be the same and who should accommodate which variations.

@asottile
Copy link
Contributor

asottile commented Mar 1, 2021

@gaborbernat actually, tox-wheel is what's breaking this -- they're monkeypatching tox's venv setup so it doesn't write the config out

@gaborbernat
Copy link
Member

That's not a problem (though admittedly unfortunate behavior). Would you remove tox-wheel, It still fails due to the above. I've tested it.

@asottile
Copy link
Contributor

asottile commented Mar 1, 2021

it doesn't for me, though one run of tox-wheel poisons the .tox cache

@gaborbernat
Copy link
Member

Do you have pypy3.7-7.3.3 on Windows? For me, that does replicate it (and remove tox-wheel).

@asottile
Copy link
Contributor

asottile commented Mar 1, 2021

yep

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug:normal affects many people or has quite an impact
Projects
None yet
Development

No branches or pull requests

3 participants