tox: PyPy 3 on Windows fails with "The parameter is incorrect"
Unfortunately I don’t have a Windows machine easily available, so I can’t manually reproduce this, but on Github Actions it seems like python -m tox consistently fails on PyPy on Windows. Here is a failing job.
Details, in case the GHA link ever dies:
Run python -m tox
python -m tox
shell: C:\Program Files\PowerShell\7\pwsh.EXE -command ". '{0}'"
env:
TOXENV: py
TEST_EXTRAS_TOX:
CODECOV_TOKEN: ***
pythonLocation: C:\hostedtoolcache\windows\PyPy\3.6.9\x86
Traceback (most recent call last):
File "C:\hostedtoolcache\windows\PyPy\3.6.9\x86\site-packages\tox\interpreters\__init__.py", line 25, in get_executable
return self.name2executable[envconfig.envname]
KeyError: '.package'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\hostedtoolcache\windows\PyPy\3.6.9\x86\lib-python\3\runpy.py", line 196, in _run_module_as_main
"__main__", mod_spec)
File "C:\hostedtoolcache\windows\PyPy\3.6.9\x86\lib-python\3\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\hostedtoolcache\windows\PyPy\3.6.9\x86\site-packages\tox\__main__.py", line 4, in <module>
tox.cmdline()
File "C:\hostedtoolcache\windows\PyPy\3.6.9\x86\site-packages\tox\session\__init__.py", line 44, in cmdline
main(args)
File "C:\hostedtoolcache\windows\PyPy\3.6.9\x86\site-packages\tox\session\__init__.py", line 69, in main
exit_code = session.runcommand()
File "C:\hostedtoolcache\windows\PyPy\3.6.9\x86\site-packages\tox\session\__init__.py", line 197, in runcommand
return self.subcommand_test()
File "C:\hostedtoolcache\windows\PyPy\3.6.9\x86\site-packages\tox\session\__init__.py", line 213, in subcommand_test
venv.package = self.hook.tox_package(session=self, venv=venv)
File "C:\hostedtoolcache\windows\PyPy\3.6.9\x86\site-packages\pluggy\hooks.py", line 286, in __call__
return self._hookexec(self, self.get_hookimpls(), kwargs)
File "C:\hostedtoolcache\windows\PyPy\3.6.9\x86\site-packages\pluggy\manager.py", line 93, in _hookexec
return self._inner_hookexec(hook, methods, kwargs)
File "C:\hostedtoolcache\windows\PyPy\3.6.9\x86\site-packages\pluggy\manager.py", line 87, in <lambda>
firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
File "C:\hostedtoolcache\windows\PyPy\3.6.9\x86\site-packages\pluggy\callers.py", line 208, in _multicall
return outcome.get_result()
File "C:\hostedtoolcache\windows\PyPy\3.6.9\x86\site-packages\pluggy\callers.py", line 80, in get_result
raise ex[1].with_traceback(ex[2])
File "C:\hostedtoolcache\windows\PyPy\3.6.9\x86\site-packages\pluggy\callers.py", line 187, in _multicall
res = hook_impl.function(*args)
File "C:\hostedtoolcache\windows\PyPy\3.6.9\x86\site-packages\tox\package\__init__.py", line 16, in tox_package
session.package, session.dist = get_package(session)
File "C:\hostedtoolcache\windows\PyPy\3.6.9\x86\site-packages\tox\package\__init__.py", line 29, in get_package
package = acquire_package(config, session)
File "C:\hostedtoolcache\windows\PyPy\3.6.9\x86\site-packages\tox\package\__init__.py", line 40, in acquire_package
path = build_package(config, session)
File "C:\hostedtoolcache\windows\PyPy\3.6.9\x86\site-packages\tox\package\builder\__init__.py", line 9, in build_package
return build(config, session)
File "C:\hostedtoolcache\windows\PyPy\3.6.9\x86\site-packages\tox\package\builder\isolated.py", line 32, in build
if package_venv.setupenv():
File "C:\hostedtoolcache\windows\PyPy\3.6.9\x86\site-packages\tox\venv.py", line 615, in setupenv
with self.new_action("getenv", self.envconfig.envdir) as action:
File "C:\hostedtoolcache\windows\PyPy\3.6.9\x86\site-packages\tox\venv.py", line 135, in new_action
self.envconfig.envpython,
File "C:\hostedtoolcache\windows\PyPy\3.6.9\x86\site-packages\tox\config\__init__.py", line 1032, in envpython
return self.get_envpython()
File "C:\hostedtoolcache\windows\PyPy\3.6.9\x86\site-packages\tox\config\__init__.py", line 1040, in get_envpython
return self.envbindir.join(name)
File "C:\hostedtoolcache\windows\PyPy\3.6.9\x86\site-packages\tox\config\__init__.py", line 1027, in envbindir
return self.get_envbindir()
File "C:\hostedtoolcache\windows\PyPy\3.6.9\x86\site-packages\tox\config\__init__.py", line 1014, in get_envbindir
isinstance(self.python_info, NoInterpreterInfo)
File "C:\hostedtoolcache\windows\PyPy\3.6.9\x86\site-packages\tox\config\__init__.py", line 1053, in python_info
return self.config.interpreters.get_info(envconfig=self)
File "C:\hostedtoolcache\windows\PyPy\3.6.9\x86\site-packages\tox\interpreters\__init__.py", line 33, in get_info
executable = self.get_executable(envconfig)
File "C:\hostedtoolcache\windows\PyPy\3.6.9\x86\site-packages\tox\interpreters\__init__.py", line 27, in get_executable
exe = self.hook.tox_get_python_executable(envconfig=envconfig)
File "C:\hostedtoolcache\windows\PyPy\3.6.9\x86\site-packages\pluggy\hooks.py", line 286, in __call__
return self._hookexec(self, self.get_hookimpls(), kwargs)
File "C:\hostedtoolcache\windows\PyPy\3.6.9\x86\site-packages\pluggy\manager.py", line 93, in _hookexec
return self._inner_hookexec(hook, methods, kwargs)
File "C:\hostedtoolcache\windows\PyPy\3.6.9\x86\site-packages\pluggy\manager.py", line 87, in <lambda>
firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
File "C:\hostedtoolcache\windows\PyPy\3.6.9\x86\site-packages\pluggy\callers.py", line 208, in _multicall
return outcome.get_result()
File "C:\hostedtoolcache\windows\PyPy\3.6.9\x86\site-packages\pluggy\callers.py", line 80, in get_result
raise ex[1].with_traceback(ex[2])
File "C:\hostedtoolcache\windows\PyPy\3.6.9\x86\site-packages\pluggy\callers.py", line 187, in _multicall
res = hook_impl.function(*args)
File "C:\hostedtoolcache\windows\PyPy\3.6.9\x86\site-packages\tox\interpreters\windows\__init__.py", line 14, in tox_get_python_executable
spec, path = base_discover(envconfig)
File "C:\hostedtoolcache\windows\PyPy\3.6.9\x86\site-packages\tox\interpreters\common.py", line 17, in base_discover
cur_spec = exe_spec(discover, envconfig.basepython)
File "C:\hostedtoolcache\windows\PyPy\3.6.9\x86\site-packages\tox\interpreters\via_path.py", line 38, in exe_spec
info = get_python_info(python_exe)
File "C:\hostedtoolcache\windows\PyPy\3.6.9\x86\site-packages\tox\interpreters\via_path.py", line 66, in get_python_info
universal_newlines=True,
File "C:\hostedtoolcache\windows\PyPy\3.6.9\x86\lib-python\3\subprocess.py", line 744, in __init__
restore_signals, start_new_session)
File "C:\hostedtoolcache\windows\PyPy\3.6.9\x86\lib-python\3\subprocess.py", line 1045, in _execute_child
startupinfo)
File "C:\hostedtoolcache\windows\PyPy\3.6.9\x86\lib_pypy\_winapi.py", line 321, in CreateProcess
raise _WinError()
File "C:\hostedtoolcache\windows\PyPy\3.6.9\x86\lib_pypy\_winapi.py", line 30, in _WinError
raise excep
OSError: [WinError 87] The parameter is incorrect
Error: Process completed with exit code 1.
Not sure if this is due to my use of python -m tox and whether this has changed because of a more recent version of tox or because of a recent change in PyPy.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 2
- Comments: 16 (7 by maintainers)
Commits related to this issue
- Use PyPy v7.3.1 for CI on Windows Until https://github.com/tox-dev/tox/issues/1704 is resolved. Disable on GitHub, since it's not possible to install old versions of pypy with actions/setup-python. ... — committed to kevinoid/python-project-template by kevinoid 4 years ago
- Temporarily exclude Windows/PyPy check Due to a bug in PyPy 3.6.9 on Windows, tox is not able to start up and run. See tox-dev/tox#1704 for details. Revert this when PyPy is updated to the next relea... — committed to mkdocs/mkdocs by waylan 4 years ago
- Temporarily exclude Windows/PyPy check Due to a bug in PyPy 3.6.9 on Windows, tox is not able to start up and run. See tox-dev/tox#1704 for details. Revert this when PyPy is updated to the next relea... — committed to mkdocs/mkdocs by waylan 4 years ago
- Temporarily exclude Windows/PyPy check Due to a bug in PyPy 3.6.9 on Windows, tox is not able to start up and run. See tox-dev/tox#1704 for details. Revert this when PyPy is updated to the next relea... — committed to mkdocs/mkdocs by waylan 4 years ago
- Specialcase the TOXENV for pypy in GHA Ref: https://github.com/tox-dev/tox/issues/1704 — committed to cherrypy/cheroot by webknjaz 4 years ago
- Specialcase the TOXENV for pypy in GHA Ref: https://github.com/tox-dev/tox/issues/1704 — committed to cherrypy/cheroot by webknjaz 4 years ago
- Specialcase the TOXENV for pypy in GHA Ref: https://github.com/tox-dev/tox/issues/1704 — committed to cherrypy/cheroot by webknjaz 4 years ago
- Specialcase the TOXENV for pypy in GHA Ref: https://github.com/tox-dev/tox/issues/1704 — committed to cherrypy/cheroot by webknjaz 4 years ago
- Specialcase the TOXENV for pypy in GHA Ref: https://github.com/tox-dev/tox/issues/1704 — committed to cherrypy/cheroot by webknjaz 4 years ago
- Specialcase the TOXENV for pypy in GHA Ref: https://github.com/tox-dev/tox/issues/1704 — committed to cherrypy/cheroot by webknjaz 4 years ago
- Exclude Windows PyPy jobs from GHA Ref: https://github.com/tox-dev/tox/issues/1704 — committed to cherrypy/cheroot by webknjaz 4 years ago
- Merge branch 'testing/gha-pypy' This change moves the PyPy jobs from Travis CI to GitHub Actions CI/CD workflows. It only runs them under GNU/Linux workers but in the future, it'd be great to include... — committed to cherrypy/cheroot by webknjaz 4 years ago
PyPy 7.3.3 has now been released with a fix.
https://github.com/actions/setup-python/issues/163 is a request to add it to GHA.
GHA now has PyPy 7.3.3, so tox+PyPy+Windows works now: https://github.com/actions/setup-python/issues/163#issuecomment-739907048
e.g. https://github.com/jmoiron/humanize/pull/185
Thanks everyone!
Created an issue for this upstream: https://foss.heptapod.net/pypy/pypy/-/issues/3331
Would be interested to know if someone comes up with a better workaround than “skip PyPy3 on Windows”, though.
Upstream bug is fixed. We just have to wait for the next pypy release 😃