Closed isac322 closed 3 years ago
I would also be interested in having this resolved. I am hesitant to move to 3.9 until we can run our tests in parallel.
Making these changes works for Python 3.9+, but not sure if it breaks older releases 3.8-:
# pytest_parallel/__init__.py
114: class ThreadLocalEnviron(os._Environ):
115: def __init__(self, env):
116: super().__init__(
117: env._data,
118: env.encodekey,
119: env.decodekey,
120: env.encodevalue,
121: env.decodevalue,
122: # env.putenv, # <---- Commented
123: # env.unsetenv # <---- Commented
124: )
139: def __setitem__(self, key, value):
140: if key == 'PYTEST_CURRENT_TEST':
141: value = self.encodevalue(value)
142: os.putenv(self.encodekey(key), value) # <------ Changed self to os
147: def __delitem__(self, key):
148: if key == 'PYTEST_CURRENT_TEST':
149: os.unsetenv(self.encodekey(key)) # <------ Changed self to os
I have got same issue. please fix it for 3.9
Also have the same issue
希望尽快支持3.9
+1 hoping to see if the proposed PR can be merged
The same issue
Would love this to be solved. It is preventing me from moving from 3.8. Is this closed as it is a pytest-parallel issue? I am guessing it is.
e solved. It is preventing me from moving from 3.8. Is this closed as it is a pytest-parall
Its happening with 3.9.7 so I read some of the issues here and it looks like this project is not maintained anymore.
When I run
pytest . --workers auto
with Python 3.9, this error occur.So I check the code, it uses
os.environ.putenv
but Python doesn't have the API. Then only haveos.putenv
.On Python 3.8 they are exists.
But 3.9 does not
and definition of
_Environ
is also changed.