Please support Python 3.9
See original GitHub issueWhen I run pytest . --workers auto
with Python 3.9, this error occur.
INTERNALERROR> Traceback (most recent call last):
INTERNALERROR> File "/.../venv/lib/python3.9/site-packages/_pytest/main.py", line 255, in wrap_session
INTERNALERROR> config.hook.pytest_sessionstart(session=session)
INTERNALERROR> File "/.../venv/lib/python3.9/site-packages/pluggy/hooks.py", line 286, in __call__
INTERNALERROR> return self._hookexec(self, self.get_hookimpls(), kwargs)
INTERNALERROR> File "/.../venv/lib/python3.9/site-packages/pluggy/manager.py", line 93, in _hookexec
INTERNALERROR> return self._inner_hookexec(hook, methods, kwargs)
INTERNALERROR> File "/.../venv/lib/python3.9/site-packages/pluggy/manager.py", line 84, in <lambda>
INTERNALERROR> self._inner_hookexec = lambda hook, methods, kwargs: hook.multicall(
INTERNALERROR> File "/.../venv/lib/python3.9/site-packages/pluggy/callers.py", line 208, in _multicall
INTERNALERROR> return outcome.get_result()
INTERNALERROR> File "/.../venv/lib/python3.9/site-packages/pluggy/callers.py", line 80, in get_result
INTERNALERROR> raise ex[1].with_traceback(ex[2])
INTERNALERROR> File "/.../venv/lib/python3.9/site-packages/pluggy/callers.py", line 187, in _multicall
INTERNALERROR> res = hook_impl.function(*args)
INTERNALERROR> File "/.../venv/lib/python3.9/site-packages/pytest_parallel/__init__.py", line 219, in pytest_sessionstart
INTERNALERROR> os.environ = ThreadLocalEnviron(os.environ)
INTERNALERROR> File "/.../venv/lib/python3.9/site-packages/pytest_parallel/__init__.py", line 122, in __init__
INTERNALERROR> env.putenv,
INTERNALERROR> AttributeError: '_Environ' object has no attribute 'putenv'
So I check the code, it uses os.environ.putenv
but Python doesn’t have the API. Then only have os.putenv
.
On Python 3.8 they are exists.
Python 3.8.6 (default, Dec 11 2020, 14:45:03)
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> e = os.environ
>>> e.putenv
<built-in function putenv>
>>> os.putenv == e.putenv
True
But 3.9 does not
Python 3.9.0 (default, Oct 7 2020, 23:09:01)
[GCC 10.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> e = os.environ
>>> e.putenv
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: '_Environ' object has no attribute 'putenv'
and definition of _Environ
is also changed.
class _Environ(MutableMapping):
def __init__(self, data, encodekey, decodekey, encodevalue, decodevalue):
self.encodekey = encodekey
self.decodekey = decodekey
self.encodevalue = encodevalue
self.decodevalue = decodevalue
self._data = data
Issue Analytics
- State:
- Created 3 years ago
- Reactions:44
- Comments:9
Top Results From Across the Web
Python Release Python 3.9.0
Python 3.9 is incompatible with this unsupported version of Windows. Major new features of the 3.9 series, compared to 3.8. Some of the...
Read more >Python 3.9 support table for most popular Python packages
This site shows Python 3.9 support for the 360 most downloaded packages on PyPI: 274 green packages (76.1%) support Python 3.9;; 86 white...
Read more >Python 3.9: please confirm support in pants #11818 - GitHub
hi, the pants script only seems to support up to Python 3.8: https://pantsbuild.github.io/setup/pants function set_supported_python_versions ...
Read more >How to PIP Install Requests Python Package - ActiveState
Try a faster and easier way to manage your Python dependencies. Use Python 3.9 by ActiveState and build your own runtime with the...
Read more >How can I run Python 3.9.1 natively on M1 Mac?
Please help a newbie figure out how to take advantage of his recent impulse-buy. python-3.9 · apple-silicon · Share.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Making these changes works for Python 3.9+, but not sure if it breaks older releases 3.8-:
Its happening with 3.9.7 so I read some of the issues here and it looks like this project is not maintained anymore.