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 paul.moore
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-28.20:50:37
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
To be explicit, I'm +1 on breaking backward compatibility in the minor form described by Ethan: if NamedTemporaryFile is used as a context manager, the file is closed *on context manager exit* and *not* when the file is closed.

Breaking compatibility is allowed in minor versions (3.11 at this point, as this won't make it in before 3.10 feature freeze). So this is an acceptable change.

I don't personally think this needs a transition period or deprecation, and in particular I don't think that Jason's "gradual transition" proposal is necessary.

I'd be sad if we ended up with an over-complicated solution for no better reason than an excess of caution over a backward compatibility issue that we're not sure will impact anyone. Do we have any actual examples of code that needs the current CM behaviour (as opposed to a general concern that someone might be using the functionality)?

(My original over-complicated proposal was based on a mistaken belief that it had already been established that backward incompatibility was absolutely not allowed. But I never subscribed to that view myself.)
Date User Action Args
2021-04-28 20:50:37paul.mooresetrecipients: + 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, ev2geny, chary314
2021-04-28 20:50:37paul.mooresetmessageid: <>
2021-04-28 20:50:37paul.moorelinkissue14243 messages
2021-04-28 20:50:37paul.moorecreate