Message389877
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. |
|
Date |
User |
Action |
Args |
2021-03-31 06:23:33 | methane | set | recipients:
+ methane, vstinner, eryksun |
2021-03-31 06:23:33 | methane | set | messageid: <1617171813.33.0.779372662254.issue43510@roundup.psfhosted.org> |
2021-03-31 06:23:33 | methane | link | issue43510 messages |
2021-03-31 06:23:32 | methane | create | |
|