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 steve.dower
Recipients Cezary.Wagner, paul.moore, steve.dower, tim.golden, zach.ware
Date 2020-06-24.18:24:20
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1593023060.43.0.442283631707.issue41106@roundup.psfhosted.org>
In-reply-to
Content
I'm going to have to spend more time to analyse this (later), but it seems like Windows deciding not to update the directory's data structures (containing the st_mtime retrieved by scandir) as long as the file is still open.

I suspect the answer for your scenario is that you'll just have to use os.stat() to get the information from the file's entry, rather than the directory's entry. It's unlikely there's anything we can do at Python's level without sacrificing all the performance gains of scandir() for all other scenarios.
History
Date User Action Args
2020-06-24 18:24:20steve.dowersetrecipients: + steve.dower, paul.moore, tim.golden, zach.ware, Cezary.Wagner
2020-06-24 18:24:20steve.dowersetmessageid: <1593023060.43.0.442283631707.issue41106@roundup.psfhosted.org>
2020-06-24 18:24:20steve.dowerlinkissue41106 messages
2020-06-24 18:24:20steve.dowercreate