Message392479
>Eryk Sun <eryksun@gmail.com> added the comment:
>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.
At the moment, the TemporaryFile directly reuses NamedTemporaryFile for none-posix or cygwin systems.
https://github.com/python/cpython/blob/a92d7387632de1fc64de51f22f6191acd0c6f5c0/Lib/tempfile.py#L552
Does it mean, that your suggestion to leave the O_TEMPORARY for TemporaryFile means, that NamedTemporaryFile needs to have a mechanism to know whether it was called as a TemporaryFile and then to have a different functionality in this case relative to the situation it would be called directly? |
|
Date |
User |
Action |
Args |
2021-04-30 17:21:44 | ev2geny | set | recipients:
+ ev2geny, 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, eryksun, steve.dower, Carl Osterwisch, ethan smith, John Florian, chary314 |
2021-04-30 17:21:44 | ev2geny | set | messageid: <1619803304.14.0.324985690176.issue14243@roundup.psfhosted.org> |
2021-04-30 17:21:44 | ev2geny | link | issue14243 messages |
2021-04-30 17:21:44 | ev2geny | create | |
|