summaryrefslogtreecommitdiffstats
path: root/Modules/_io/clinic
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2020-03-04 17:50:22 (GMT)
committerGitHub <noreply@github.com>2020-03-04 17:50:22 (GMT)
commit942f7a2dea2e95a0fa848329565c0d0288d92e47 (patch)
tree31abda8d45ef676a46ea63a6a8a61ccf6061e9c5 /Modules/_io/clinic
parent00c77ae55a82548a6b45af73cdf712ea34910645 (diff)
downloadcpython-942f7a2dea2e95a0fa848329565c0d0288d92e47.zip
cpython-942f7a2dea2e95a0fa848329565c0d0288d92e47.tar.gz
cpython-942f7a2dea2e95a0fa848329565c0d0288d92e47.tar.bz2
bpo-39674: Revert "bpo-37330: open() no longer accept 'U' in file mode (GH-16959)" (GH-18767)
This reverts commit e471e72977c83664f13d041c78549140c86c92de. The mode will be removed from Python 3.10.
Diffstat (limited to 'Modules/_io/clinic')
-rw-r--r--Modules/_io/clinic/_iomodule.c.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/Modules/_io/clinic/_iomodule.c.h b/Modules/_io/clinic/_iomodule.c.h
index c1f518f..1a9651d 100644
--- a/Modules/_io/clinic/_iomodule.c.h
+++ b/Modules/_io/clinic/_iomodule.c.h
@@ -36,6 +36,7 @@ PyDoc_STRVAR(_io_open__doc__,
"\'b\' binary mode\n"
"\'t\' text mode (default)\n"
"\'+\' open a disk file for updating (reading and writing)\n"
+"\'U\' universal newline mode (deprecated)\n"
"========= ===============================================================\n"
"\n"
"The default mode is \'rt\' (open for reading text). For binary random\n"
@@ -51,6 +52,10 @@ PyDoc_STRVAR(_io_open__doc__,
"returned as strings, the bytes having been first decoded using a\n"
"platform-dependent encoding or using the specified encoding if given.\n"
"\n"
+"\'U\' mode is deprecated and will raise an exception in future versions\n"
+"of Python. It has no effect in Python 3. Use newline to control\n"
+"universal newlines mode.\n"
+"\n"
"buffering is an optional integer used to set the buffering policy.\n"
"Pass 0 to switch buffering off (only allowed in binary mode), 1 to select\n"
"line buffering (only usable in text mode), and an integer > 1 to indicate\n"
@@ -318,4 +323,4 @@ _io_open_code(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObjec
exit:
return return_value;
}
-/*[clinic end generated code: output=680e4b488c7da8a1 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=3df6bc6d91697545 input=a9049054013a1b77]*/