diff options
author | Inada Naoki <songofacandy@gmail.com> | 2021-03-31 09:49:41 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-31 09:49:41 (GMT) |
commit | cfa176685a5e788bafc7749d7a93f43ea3e4de9f (patch) | |
tree | 499a11b7c9533665429cf9542afe1be2302f302a /Modules | |
parent | ff3c9739bd69aa8b58007e63c9e40e6708b4761e (diff) | |
download | cpython-cfa176685a5e788bafc7749d7a93f43ea3e4de9f.zip cpython-cfa176685a5e788bafc7749d7a93f43ea3e4de9f.tar.gz cpython-cfa176685a5e788bafc7749d7a93f43ea3e4de9f.tar.bz2 |
Revert "bpo-43510: PEP 597: Accept `encoding="locale"` in binary mode (GH-25103)" (#25108)
This reverts commit ff3c9739bd69aa8b58007e63c9e40e6708b4761e.
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/_io/_iomodule.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Modules/_io/_iomodule.c b/Modules/_io/_iomodule.c index c627ca2..652c2ce 100644 --- a/Modules/_io/_iomodule.c +++ b/Modules/_io/_iomodule.c @@ -346,8 +346,7 @@ _io_open_impl(PyObject *module, PyObject *file, const char *mode, goto error; } - if (binary && encoding != NULL - && strcmp(encoding, "locale") != 0) { + if (binary && encoding != NULL) { PyErr_SetString(PyExc_ValueError, "binary mode doesn't take an encoding argument"); goto error; |