diff --git a/CHANGELOG b/CHANGELOG index 6144fd1..57089eb 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -9,6 +9,10 @@ - fix pytest issue41: re-run tests on all file changes, not just randomly select ones like .py/.c. +- fix pytest issue347: slaves running on top of Python3.2 + will set PYTHONDONTWRITEYBTECODE to 1 to avoid import concurrency + bugs. + 1.8 ------------------------- diff --git a/xdist/remote.py b/xdist/remote.py index c589ca8..9e64430 100644 --- a/xdist/remote.py +++ b/xdist/remote.py @@ -125,6 +125,10 @@ def remote_initconfig(option_dict, args): if __name__ == '__channelexec__': + # python3.2 is not concurrent import safe, so let's play it safe + # https://bitbucket.org/hpk42/pytest/issue/347/pytest-xdist-and-python-32 + if sys.version_info[:2] == (3,2): + os.environ["PYTHONDONTWRITEBYTECODE"] = 1 slaveinput,args,option_dict = channel.receive() importpath = os.getcwd() sys.path.insert(0, importpath) # XXX only for remote situations