[issue46785] On Windows, os.stat() can fail if called while another process is creating or deleting the file

2022-03-13 Thread Itai Steinherz
Itai Steinherz added the comment: Interesting, thanks again :) -- ___ Python tracker <https://bugs.python.org/issue46785> ___ ___ Python-bugs-list mailin

[issue46785] On Windows, os.stat() can fail if called while another process is creating or deleting the file

2022-03-13 Thread Itai Steinherz
Change by Itai Steinherz : -- keywords: +patch pull_requests: +29956 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/31858 ___ Python tracker <https://bugs.python.org/issu

[issue46785] On Windows, os.stat() can fail if called while another process is creating or deleting the file

2022-03-13 Thread Itai Steinherz
Itai Steinherz added the comment: Thanks for the comprehensive reply, Eryk! I have a few questions regarding your suggestion: 1. Why catch ERROR_NOT_READY and ERROR_BAD_NET_NAME as well? How do you know that FindFirstFileW() may return them? 2. Why can't the filename of the "foo&

[issue46785] On Windows, os.stat() can fail if called while another process is creating or deleting the file

2022-03-09 Thread Itai Steinherz
Itai Steinherz added the comment: I'd like to work on this, however I'm not sure how this could be unit-tested. Any ideas? -- nosy: +itaisteinherz ___ Python tracker <https://bugs.python.o