[issue40701] tempfile mixes str and bytes in an inconsistent manner

2021-04-10 Thread Gregory P. Smith
Gregory P. Smith added the comment: New changeset e05a703848473b0365886dcc593cbddc46609f29 by Gregory P. Smith in branch 'master': bpo-40701: doc typo historcal -> historical (GH-25334) https://github.com/python/cpython/commit/e05a703848473b0365886dcc593cbddc46609f29 --

[issue40701] tempfile mixes str and bytes in an inconsistent manner

2021-04-10 Thread Gregory P. Smith
Change by Gregory P. Smith : -- pull_requests: +24068 pull_request: https://github.com/python/cpython/pull/25334 ___ Python tracker ___

[issue40701] tempfile mixes str and bytes in an inconsistent manner

2021-04-10 Thread Łukasz Langa
Łukasz Langa added the comment: Sorry, I decided not to take this. We're four bugfix releases into 3.9 and there is non-zero chance somebody relies on existing behavior somehow. Marking this as changing with 3.10.0 is cleaner from an end user standpoint. -- priority: release blocker

[issue40701] tempfile mixes str and bytes in an inconsistent manner

2021-04-09 Thread Gregory P. Smith
Gregory P. Smith added the comment: Fixed for 3.10. Marking as a release blocker for 3.9 and assigning for a release manager decision on if they accept this change (the PR) as a bugfix in 3.9 or not. (see the PR) It is late enough in 3.8's lifetime I wouldn't touch that one. --

[issue40701] tempfile mixes str and bytes in an inconsistent manner

2021-03-03 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 4.0 -> 5.0 pull_requests: +23505 pull_request: https://github.com/python/cpython/pull/24734 ___ Python tracker

[issue40701] tempfile mixes str and bytes in an inconsistent manner

2021-03-03 Thread Gregory P. Smith
Gregory P. Smith added the comment: New changeset 9c7927400cd8f1d283bf7915b6b33fea81b8655d by Eric L in branch 'master': bpo-40701: tempfile mixes str and bytes in an inconsistent manner (GH-20442) https://github.com/python/cpython/commit/9c7927400cd8f1d283bf7915b6b33fea81b8655d --

[issue40701] tempfile mixes str and bytes in an inconsistent manner

2021-03-02 Thread Gregory P. Smith
Gregory P. Smith added the comment: 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

[issue40701] tempfile mixes str and bytes in an inconsistent manner

2020-05-27 Thread Gregory P. Smith
Gregory P. Smith added the comment: I expect the best decision to be to get rid of tempfile.tempdir entirely. That would need be its own issue with a deprecation period involved. A process global that alters behavior of all calls into a module that don't explicitly opt-out is a bad API.

[issue40701] tempfile mixes str and bytes in an inconsistent manner

2020-05-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Well, the behavior for an existing bytes path was not unintended, but some people can depend on it. But before making it an official feature, we should also check other cases of an unintended behavior. What if set tempfile.tempdir to a Path object or to a

[issue40701] tempfile mixes str and bytes in an inconsistent manner

2020-05-27 Thread Gregory P. Smith
Gregory P. Smith added the comment: We consider it closer to new feature as it changes existing behavior in a way that people cannot _depend_ on being present in older Python releases as it'd only appear in a bugfix release, so most people could never write code depending on it while

[issue40701] tempfile mixes str and bytes in an inconsistent manner

2020-05-26 Thread Eric L.
Eric L. added the comment: Well, your decision but, as a user of the library, it didn't feel like a new feature just like a bug to be fixed, the main issue being the inconsistent handling of bytes vs. str. -- ___ Python tracker

[issue40701] tempfile mixes str and bytes in an inconsistent manner

2020-05-26 Thread Roundup Robot
Change by Roundup Robot : -- nosy: +python-dev nosy_count: 3.0 -> 4.0 pull_requests: +19698 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20442 ___ Python tracker

[issue40701] tempfile mixes str and bytes in an inconsistent manner

2020-05-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: In any case this is a new feature, so it can be added only in 3.10, and we need the documentation patch for 3.9 and older. As a workaround you can use os.fsdecode(): tempfile.tempdir = os.fsdecode(b'/doesntexist') --

[issue40701] tempfile mixes str and bytes in an inconsistent manner

2020-05-24 Thread Eric L.
Eric L. added the comment: On 24/05/2020 20:30, Serhiy Storchaka wrote: > Maybe just document that tempdir should be a string? I would definitely prefer to have bytes paths considered as 1st class citizen. -- ___ Python tracker

[issue40701] tempfile mixes str and bytes in an inconsistent manner

2020-05-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Maybe just document that tempdir should be a string? -- nosy: +serhiy.storchaka ___ Python tracker ___

[issue40701] tempfile mixes str and bytes in an inconsistent manner

2020-05-24 Thread Eric L.
Eric L. added the comment: On 23/05/2020 21:41, Gregory P. Smith wrote: > Could you please turn that into a Github PR? I can, if you don't tell me that I need to setup a full-blown Python development environment to do this. -- ___ Python tracker

[issue40701] tempfile mixes str and bytes in an inconsistent manner

2020-05-23 Thread Gregory P. Smith
Gregory P. Smith added the comment: Could you please turn that into a Github PR? -- ___ Python tracker ___ ___ Python-bugs-list

[issue40701] tempfile mixes str and bytes in an inconsistent manner

2020-05-23 Thread Florian Dahlitz
Change by Florian Dahlitz : -- nosy: -DahlitzFlorian ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue40701] tempfile mixes str and bytes in an inconsistent manner

2020-05-23 Thread Eric L.
Eric L. added the comment: Sorry, I uploaded by mistake an early version of the patch. The new one is the one I had actually tested (the old one would fail with mixing bytes and string under certain circumstances, I can't remember any more). -- Added file:

[issue40701] tempfile mixes str and bytes in an inconsistent manner

2020-05-23 Thread Terry J. Reedy
Change by Terry J. Reedy : -- versions: +Python 3.10 -Python 3.5, Python 3.6 ___ Python tracker ___ ___ Python-bugs-list mailing

[issue40701] tempfile mixes str and bytes in an inconsistent manner

2020-05-21 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +gregory.p.smith ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue40701] tempfile mixes str and bytes in an inconsistent manner

2020-05-21 Thread Eric L.
Eric L. added the comment: 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

[issue40701] tempfile mixes str and bytes in an inconsistent manner

2020-05-21 Thread Florian Dahlitz
Change by Florian Dahlitz : -- nosy: +DahlitzFlorian ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue40701] tempfile mixes str and bytes in an inconsistent manner

2020-05-20 Thread Eric L.
New submission from Eric L. : tempfile fails on mixed str and bytes when setting tempfile.tempdir to a non-existent bytes path but succeeds when set to an existing bytes path. $ 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