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 eryksun
Recipients Carl Osterwisch, Gabi.Davar, John Florian, chary314, dabrahams, davide.rizzo, dlenski, eric.araujo, eric.smith, eryksun, ethan smith, ethan.furman, ev2geny, jaraco, jwilk, martin.panter, ncoghlan, njs, paul.moore, piotr.dobrogost, pitrou, r.david.murray, sbt, steve.dower, tim.golden, zach.ware
Date 2021-04-30.16:28:35
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1619800115.21.0.214501287454.issue14243@roundup.psfhosted.org>
In-reply-to
Content
> deleting on CM exit when used as a CM, and no change in behaviour 
> otherwise (me, Zachary, Ethan, Jason and Steve). Steve also wants
> O_TEMPORARY to be removed, which doesn't seem controversial among
> this group of people.

Removing O_TEMPORARY is not an afterthought here. It is the core of this issue. The O_TEMPORARY flag MUST NOT be used if the goal is to make NamedTemporaryFile() "particularly useful on Windows". A file that's opened with DELETE access cannot be reopened in most cases, because most opens do not share delete access, but it also can't be closed to allow it to be reopened because the OS will delete it.

I replied twice that I thought using the CM exit instead of O_TEMPORARY is okay for NamedTemporaryFile() -- but only if a separate implementation of TemporaryFile() that uses O_TEMPORARY is added at the same time. I want guaranteed cleanup for TemporaryFile() since it's not intended to be reopened.
History
Date User Action Args
2021-04-30 16:28:35eryksunsetrecipients: + eryksun, paul.moore, jaraco, ncoghlan, pitrou, eric.smith, tim.golden, jwilk, eric.araujo, r.david.murray, njs, dabrahams, ethan.furman, davide.rizzo, sbt, Gabi.Davar, martin.panter, piotr.dobrogost, zach.ware, dlenski, steve.dower, Carl Osterwisch, ethan smith, John Florian, ev2geny, chary314
2021-04-30 16:28:35eryksunsetmessageid: <1619800115.21.0.214501287454.issue14243@roundup.psfhosted.org>
2021-04-30 16:28:35eryksunlinkissue14243 messages
2021-04-30 16:28:35eryksuncreate