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.
diff --git a/Doc/library/functions.rst b/Doc/library/functions.rst
index cc48597..ca09e6f 100644
--- a/Doc/library/functions.rst
+++ b/Doc/library/functions.rst
@@ -1090,6 +1090,12 @@
    first decoded using a platform-dependent encoding or using the specified
    *encoding* if given.
 
+   There is an additional mode character permitted, ``'U'``, which no longer
+   has any effect, and is considered deprecated. It previously enabled
+   :term:`universal newlines` in text mode, which became the default behaviour
+   in Python 3.0. Refer to the documentation of the
+   :ref:`newline <open-newline-parameter>` parameter for further details.
+
    .. note::
 
       Python doesn't depend on the underlying operating system's notion of text
@@ -1246,6 +1252,10 @@
 
          * The file is now non-inheritable.
 
+   .. deprecated-removed:: 3.4 3.10
+
+      The ``'U'`` mode.
+
    .. versionchanged::
       3.5
 
@@ -1261,10 +1271,6 @@
          * On Windows, opening a console buffer may return a subclass of
            :class:`io.RawIOBase` other than :class:`io.FileIO`.
 
-   .. versionchanged:: 3.9
-      The ``'U'`` mode has been removed.
-
-
 .. function:: ord(c)
 
    Given a string representing one Unicode character, return an integer