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 pxeger
Recipients pxeger
Date 2021-03-12.15:49:24
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1615564164.94.0.724086636584.issue43480@roundup.psfhosted.org>
In-reply-to
Content
It would be nice to have a `.path` method or property on `tempfile.NamedTemporaryFile`, `tempfile.TemporaryDirectory` which produces a `pathlib.Path` of their `.name` attribute, so one can use the modern interface directly.

I think a method would be more appropriate than a property because you're explicitly allocating a new object (unless you use `@functools.cached_property` or similar to have a shared object between successive calls)

I can do a PR.
History
Date User Action Args
2021-03-12 15:49:25pxegersetrecipients: + pxeger
2021-03-12 15:49:24pxegersetmessageid: <1615564164.94.0.724086636584.issue43480@roundup.psfhosted.org>
2021-03-12 15:49:24pxegerlinkissue43480 messages
2021-03-12 15:49:24pxegercreate