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 methane
Recipients eryksun, methane, vstinner
Date 2021-03-31.06:23:32
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1617171813.33.0.779372662254.issue43510@roundup.psfhosted.org>
In-reply-to
Content
I'm sorry, I was wrong. Allowing `encoding="locale"` didn't help OpenWrapper. See GH-25107.

If we use `encoding = text_encoding(encoding)` in binary mode, `open(filename, "rb")` will be warned. This doesn't make sense at all.

Adding `mode` parameter to the `text_encoding()` doesn't make sense too. Because it is used for functions wrapping not only open(), but also TextIOWrapper().

So we must not call `text_encoding()` in binary mode. Allowing `encoding="locale"` in binary mode doesn't make it easy. I will revert GH-25103.
History
Date User Action Args
2021-03-31 06:23:33methanesetrecipients: + methane, vstinner, eryksun
2021-03-31 06:23:33methanesetmessageid: <1617171813.33.0.779372662254.issue43510@roundup.psfhosted.org>
2021-03-31 06:23:33methanelinkissue43510 messages
2021-03-31 06:23:32methanecreate