Message369511
In the meantime, I noticed the following in addition:
[ericl@tuxedo ~]$ python3.9
Python 3.9.0a6 (default, Apr 28 2020, 00:00:00)
[GCC 10.0.1 20200430 (Red Hat 10.0.1-0.14)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import tempfile
>>> tempfile.tempdir = b'/tmp'
>>> tempfile.gettempdir()
b'/tmp'
>>> tempfile.tempdir = '/tmp'
>>> tempfile.gettempdirb()
b'/tmp'
This actually explicitly hurts the interface description which states that tempfile.gettempdir() returns a string.
"Encouraged" by this discovery, I've tried to write a patch of tempfile.py addressing the issues discovered. It's my first patch ever of Python so bare with me. The default remains string but if someone _explicitly_ sets tempdir to bytes, it'll become bytes. I've tried all the commands listed previously and it all looks consistent to me. |
|
Date |
User |
Action |
Args |
2020-05-21 09:36:26 | ericzolf | set | recipients:
+ ericzolf, DahlitzFlorian |
2020-05-21 09:36:26 | ericzolf | set | messageid: <1590053786.2.0.0041092465711.issue40701@roundup.psfhosted.org> |
2020-05-21 09:36:26 | ericzolf | link | issue40701 messages |
2020-05-21 09:36:26 | ericzolf | create | |
|