Message387930
I clarified the documentation in the PR and added a regression test.
I chose to explicitly document that tempfile.tempdir may only be str or bytes and cannot be a path-like object.
We already document that people really should not set it and instead pass dir= to their APIs. Now the docs make that more clear when it comes to setting it to a bytes object due to the global API return type change consequences.
I view this PR as cleaning up a partial misbehavior while preserving an API wart of it ever working in any manner when set to a bytes value.
getting rid of tempfile.tempdir entirely or preventing it from being a bytes value at all would be much more of a breaking change, even though desirable. Not a bugfix. Now with the PR as is, we at least document that people should avoid doing that and make it clear what consistent behavior happens when they do it anyways. With a test. |
|
Date |
User |
Action |
Args |
2021-03-02 14:24:14 | gregory.p.smith | set | recipients:
+ gregory.p.smith, python-dev, serhiy.storchaka, ericzolf |
2021-03-02 14:24:14 | gregory.p.smith | set | messageid: <1614695054.06.0.480504366041.issue40701@roundup.psfhosted.org> |
2021-03-02 14:24:14 | gregory.p.smith | link | issue40701 messages |
2021-03-02 14:24:13 | gregory.p.smith | create | |
|