This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Antony.Lee
Recipients Antony.Lee, paul.moore, steve.dower, tim.golden, zach.ware
Date 2022-02-18.08:50:37
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1645174237.48.0.436213701589.issue46785@roundup.psfhosted.org>
In-reply-to
Content
In a first Python process, repeatedly create and delete a file:

from pathlib import Path
while True:
    Path("foo").touch(); Path("foo").unlink()

In another process, repeatedly check for the path's existence:

from pathlib import Path
while True: print(Path("foo").exists())

On Linux, the second process prints a random series of True and False.  On Windows, it quickly fails after a few dozen iterations (likely machine-dependent) with

PermissionError: [WinError 5] Access is denied: 'foo'

which is actually raised by the stat() call.

I would suggest that this is not really desirable behavior?
History
Date User Action Args
2022-02-18 08:50:37Antony.Leesetrecipients: + Antony.Lee, paul.moore, tim.golden, zach.ware, steve.dower
2022-02-18 08:50:37Antony.Leesetmessageid: <1645174237.48.0.436213701589.issue46785@roundup.psfhosted.org>
2022-02-18 08:50:37Antony.Leelinkissue46785 messages
2022-02-18 08:50:37Antony.Leecreate