Skip to content

usage in combination with xdist fails on windows due to posix style atomic file rewrite #344

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

Closed
RonnyPfannschmidt opened this issue Jul 7, 2016 · 5 comments

Comments

@RonnyPfannschmidt
Copy link

on pytest-dev/pytest#1705 we see

_________________ ERROR collecting testing/python/metafunc.py _________________
_pytest\python.py:374: in fget
    return self._obj
   AttributeError: 'Module' object has no attribute '_obj'
During handling of the above exception, another exception occurred:
...
.tox\py35-xdist\lib\site-packages\hypothesis\internal\charmap.py:77: in categories
    cm = charmap()
.tox\py35-xdist\lib\site-packages\hypothesis\internal\charmap.py:63: in charmap
    os.rename(tmpfile, f)
FileExistsError: [WinError 183] Cannot create a file when that file already exists: 'C:\\projects\\pytest\\.hypothesis\\tmp\\tmp9lzkh68w' -> 'C:\\projects\\pytest\\.hypothesis\\unicodedata\\8.0.0\\charmap.pickle.gz'
_________________ ERROR collecting testing/python/metafunc.py _________________
@DRMacIver
Copy link
Member

Yes, it looks like you're right. Sigh.

Atomic file creation turns out to be a hard problem.

@DRMacIver
Copy link
Member

...but not that hard. I was just doing it wrong.

I've got a probably fix. Just letting CI run. Assuming it works I'll do a patch release for the issue later today.

@RonnyPfannschmidt
Copy link
Author

\o/ thanks for the swift response 👍

@DRMacIver
Copy link
Member

No problem. It's proving a little fiddlier than I thought though (mostly because consistent behaviour between Python 2 and 3). Hopefully will still have a fix out today. Might be tomorrow.

@DRMacIver
Copy link
Member

And then everything went smoothly. So 3.4.1 is now out. Please test and let me know if you're still experiencing this problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants