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.

classification
Title: Add a path attribute to NamedTemporaryFile
Type: enhancement Stage: resolved
Components: Library (Lib) Versions: Python 3.6
process
Status: closed Resolution: rejected
Dependencies: Superseder:
Assigned To: Nosy List: serhiy.storchaka, wsanchez
Priority: normal Keywords:

Created on 2017-08-08 00:59 by wsanchez, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (2)
msg299884 - (view) Author: Wilfredo Sanchez (wsanchez) Date: 2017-08-08 00:59
Add a path attribute to NamedTemporaryFile which provides a pathlib.Path object pointing to the file on disk.
msg299898 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2017-08-08 05:30
You can just pass the name attribute to the pathlib.Path constructor. Adding a name attribute will not allow you to do what you can't do now, but will increase the coupling between the tempfile and pathlib modules. The purpose of introducing the path protocol was avoiding creating such couplings.
History
Date User Action Args
2022-04-11 14:58:49adminsetgithub: 75320
2022-01-04 23:12:01iritkatrielsetstatus: open -> closed
resolution: rejected
stage: resolved
2017-08-08 05:30:39serhiy.storchakasetnosy: + serhiy.storchaka
messages: + msg299898
2017-08-08 00:59:25wsanchezcreate