summaryrefslogtreecommitdiffstats
path: root/Lib/_pyio.py
diff options
context:
space:
mode:
authorInada Naoki <songofacandy@gmail.com>2021-03-31 09:49:41 (GMT)
committerGitHub <noreply@github.com>2021-03-31 09:49:41 (GMT)
commitcfa176685a5e788bafc7749d7a93f43ea3e4de9f (patch)
tree499a11b7c9533665429cf9542afe1be2302f302a /Lib/_pyio.py
parentff3c9739bd69aa8b58007e63c9e40e6708b4761e (diff)
downloadcpython-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 'Lib/_pyio.py')
-rw-r--r--Lib/_pyio.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/_pyio.py b/Lib/_pyio.py
index ba0b0a2..0f182d4 100644
--- a/Lib/_pyio.py
+++ b/Lib/_pyio.py
@@ -221,7 +221,7 @@ def open(file, mode="r", buffering=-1, encoding=None, errors=None,
raise ValueError("can't have read/write/append mode at once")
if not (creating or reading or writing or appending):
raise ValueError("must have exactly one of read/write/append mode")
- if binary and encoding is not None and encoding != "locale":
+ if binary and encoding is not None:
raise ValueError("binary mode doesn't take an encoding argument")
if binary and errors is not None:
raise ValueError("binary mode doesn't take an errors argument")