From a7dd04a044c4c0821e8cece466b1f5bc34aba249 Mon Sep 17 00:00:00 2001 From: meersuri Date: Tue, 8 Feb 2022 23:23:09 +0800 Subject: [PATCH 1/7] Fix enum.property documentation link Incorrectly pointed to built-in the property() function as mentioned in #46586 --- Doc/library/enum.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/library/enum.rst b/Doc/library/enum.rst index 672e256c77c0d7..52ef0094cb71f2 100644 --- a/Doc/library/enum.rst +++ b/Doc/library/enum.rst @@ -110,7 +110,7 @@ Module Contents :class:`StrEnum` defaults to the lower-cased version of the member name, while other Enums default to 1 and increase from there. - :func:`property` + :func:`~enum.property` Allows :class:`Enum` members to have attributes without conflicting with member names. From 64f5b1d0aa9297fe5658b6b384f5b3ee24d2040e Mon Sep 17 00:00:00 2001 From: "blurb-it[bot]" <43283697+blurb-it[bot]@users.noreply.github.com> Date: Tue, 8 Feb 2022 15:38:16 +0000 Subject: [PATCH 2/7] =?UTF-8?q?=F0=9F=93=9C=F0=9F=A4=96=20Added=20by=20blu?= =?UTF-8?q?rb=5Fit.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../next/Documentation/2022-02-08-15-38-16.bpo-46586.6qVFVL.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 Misc/NEWS.d/next/Documentation/2022-02-08-15-38-16.bpo-46586.6qVFVL.rst diff --git a/Misc/NEWS.d/next/Documentation/2022-02-08-15-38-16.bpo-46586.6qVFVL.rst b/Misc/NEWS.d/next/Documentation/2022-02-08-15-38-16.bpo-46586.6qVFVL.rst new file mode 100644 index 00000000000000..e0683e47127a38 --- /dev/null +++ b/Misc/NEWS.d/next/Documentation/2022-02-08-15-38-16.bpo-46586.6qVFVL.rst @@ -0,0 +1 @@ +Fix enum.property link to point to the enum page rather than the built-in property() page \ No newline at end of file From 078b226d28d39ddae12f448d95fe11c6db9165ea Mon Sep 17 00:00:00 2001 From: meersuri Date: Thu, 10 Feb 2022 22:43:25 +0800 Subject: [PATCH 3/7] Fix links to builtin max, min in sys.float_info --- Doc/library/sys.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Doc/library/sys.rst b/Doc/library/sys.rst index 5e47201f88eae1..beb720ddd8cd00 100644 --- a/Doc/library/sys.rst +++ b/Doc/library/sys.rst @@ -545,7 +545,7 @@ always available. | :const:`mant_dig` | DBL_MANT_DIG | float precision: the number of base-``radix`` | | | | digits in the significand of a float | +---------------------+----------------+--------------------------------------------------+ - | :const:`max` | DBL_MAX | maximum representable positive finite float | + | :const:`!max` | DBL_MAX | maximum representable positive finite float | +---------------------+----------------+--------------------------------------------------+ | :const:`max_exp` | DBL_MAX_EXP | maximum integer *e* such that ``radix**(e-1)`` is| | | | a representable finite float | @@ -553,7 +553,7 @@ always available. | :const:`max_10_exp` | DBL_MAX_10_EXP | maximum integer *e* such that ``10**e`` is in the| | | | range of representable finite floats | +---------------------+----------------+--------------------------------------------------+ - | :const:`min` | DBL_MIN | minimum representable positive *normalized* float| + | :const:`!min` | DBL_MIN | minimum representable positive *normalized* float| | | | | | | | Use :func:`math.ulp(0.0) ` to get the | | | | smallest positive *denormalized* representable | From 47d95acd6bc890d4bc8806a172567883dfa1bfd6 Mon Sep 17 00:00:00 2001 From: meersuri Date: Sat, 12 Feb 2022 10:08:25 +0800 Subject: [PATCH 4/7] =?UTF-8?q?Revert=20"=F0=9F=93=9C=F0=9F=A4=96=20Added?= =?UTF-8?q?=20by=20blurb=5Fit."?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 64f5b1d0aa9297fe5658b6b384f5b3ee24d2040e. --- Doc/library/sys.rst | 4 ++-- .../Documentation/2022-02-08-15-38-16.bpo-46586.6qVFVL.rst | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) delete mode 100644 Misc/NEWS.d/next/Documentation/2022-02-08-15-38-16.bpo-46586.6qVFVL.rst diff --git a/Doc/library/sys.rst b/Doc/library/sys.rst index beb720ddd8cd00..5e47201f88eae1 100644 --- a/Doc/library/sys.rst +++ b/Doc/library/sys.rst @@ -545,7 +545,7 @@ always available. | :const:`mant_dig` | DBL_MANT_DIG | float precision: the number of base-``radix`` | | | | digits in the significand of a float | +---------------------+----------------+--------------------------------------------------+ - | :const:`!max` | DBL_MAX | maximum representable positive finite float | + | :const:`max` | DBL_MAX | maximum representable positive finite float | +---------------------+----------------+--------------------------------------------------+ | :const:`max_exp` | DBL_MAX_EXP | maximum integer *e* such that ``radix**(e-1)`` is| | | | a representable finite float | @@ -553,7 +553,7 @@ always available. | :const:`max_10_exp` | DBL_MAX_10_EXP | maximum integer *e* such that ``10**e`` is in the| | | | range of representable finite floats | +---------------------+----------------+--------------------------------------------------+ - | :const:`!min` | DBL_MIN | minimum representable positive *normalized* float| + | :const:`min` | DBL_MIN | minimum representable positive *normalized* float| | | | | | | | Use :func:`math.ulp(0.0) ` to get the | | | | smallest positive *denormalized* representable | diff --git a/Misc/NEWS.d/next/Documentation/2022-02-08-15-38-16.bpo-46586.6qVFVL.rst b/Misc/NEWS.d/next/Documentation/2022-02-08-15-38-16.bpo-46586.6qVFVL.rst deleted file mode 100644 index e0683e47127a38..00000000000000 --- a/Misc/NEWS.d/next/Documentation/2022-02-08-15-38-16.bpo-46586.6qVFVL.rst +++ /dev/null @@ -1 +0,0 @@ -Fix enum.property link to point to the enum page rather than the built-in property() page \ No newline at end of file From 848412768cc855075bfb096b509419b59f2b2280 Mon Sep 17 00:00:00 2001 From: meersuri Date: Sat, 19 Feb 2022 14:36:37 +0800 Subject: [PATCH 5/7] Fix more erroneous doc links to builtins --- Doc/library/fileinput.rst | 2 +- Doc/library/io.rst | 4 ++-- Doc/library/urllib.request.rst | 2 +- Doc/library/zipfile.rst | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Doc/library/fileinput.rst b/Doc/library/fileinput.rst index 2a2c1b3c2b921c..0bb76c52da8d40 100644 --- a/Doc/library/fileinput.rst +++ b/Doc/library/fileinput.rst @@ -224,5 +224,5 @@ The two following opening hooks are provided by this module: Added the optional *errors* parameter. .. deprecated:: 3.10 - This function is deprecated since :func:`input` and :class:`FileInput` + This function is deprecated since :func:`~fileinput.input` and :class:`FileInput` now have *encoding* and *errors* parameters. diff --git a/Doc/library/io.rst b/Doc/library/io.rst index de88c572f3662e..37fc08ef5eab73 100644 --- a/Doc/library/io.rst +++ b/Doc/library/io.rst @@ -55,7 +55,7 @@ the backing store is natively made of bytes (such as in the case of a file), encoding and decoding of data is made transparently as well as optional translation of platform-specific newline characters. -The easiest way to create a text stream is with :meth:`open()`, optionally +The easiest way to create a text stream is with :meth:`~io.open`, optionally specifying an encoding:: f = open("myfile.txt", "r", encoding="utf-8") @@ -77,7 +77,7 @@ objects. No encoding, decoding, or newline translation is performed. This category of streams can be used for all kinds of non-text data, and also when manual control over the handling of text data is desired. -The easiest way to create a binary stream is with :meth:`open()` with ``'b'`` in +The easiest way to create a binary stream is with :meth:`~io.open` with ``'b'`` in the mode string:: f = open("myfile.jpg", "rb") diff --git a/Doc/library/urllib.request.rst b/Doc/library/urllib.request.rst index 88e93ba6b002eb..c13dc917c55ec6 100644 --- a/Doc/library/urllib.request.rst +++ b/Doc/library/urllib.request.rst @@ -737,7 +737,7 @@ The following attribute and methods should only be used by classes derived from This method, if implemented, will be called by the parent :class:`OpenerDirector`. It should return a file-like object as described in - the return value of the :meth:`open` of :class:`OpenerDirector`, or ``None``. + the return value of the :meth:`~OpenerDirector.open` of :class:`OpenerDirector`, or ``None``. It should raise :exc:`~urllib.error.URLError`, unless a truly exceptional thing happens (for example, :exc:`MemoryError` should not be mapped to :exc:`URLError`). diff --git a/Doc/library/zipfile.rst b/Doc/library/zipfile.rst index 9d0d894c05b578..7ad65f0c5569c7 100644 --- a/Doc/library/zipfile.rst +++ b/Doc/library/zipfile.rst @@ -289,7 +289,7 @@ ZipFile Objects compressed text files in :term:`universal newlines` mode. .. versionchanged:: 3.6 - :meth:`open` can now be used to write files into the archive with the + :meth:`~ZipFile.open` can now be used to write files into the archive with the ``mode='w'`` option. .. versionchanged:: 3.6 From ccf9af7f6790aebc75f03d7306d486e72c8d5167 Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Mon, 2 May 2022 11:45:04 -0600 Subject: [PATCH 6/7] Apply suggestions from code review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Éric --- Doc/library/io.rst | 4 ++-- Doc/library/zipfile.rst | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Doc/library/io.rst b/Doc/library/io.rst index 37fc08ef5eab73..de88c572f3662e 100644 --- a/Doc/library/io.rst +++ b/Doc/library/io.rst @@ -55,7 +55,7 @@ the backing store is natively made of bytes (such as in the case of a file), encoding and decoding of data is made transparently as well as optional translation of platform-specific newline characters. -The easiest way to create a text stream is with :meth:`~io.open`, optionally +The easiest way to create a text stream is with :meth:`open()`, optionally specifying an encoding:: f = open("myfile.txt", "r", encoding="utf-8") @@ -77,7 +77,7 @@ objects. No encoding, decoding, or newline translation is performed. This category of streams can be used for all kinds of non-text data, and also when manual control over the handling of text data is desired. -The easiest way to create a binary stream is with :meth:`~io.open` with ``'b'`` in +The easiest way to create a binary stream is with :meth:`open()` with ``'b'`` in the mode string:: f = open("myfile.jpg", "rb") diff --git a/Doc/library/zipfile.rst b/Doc/library/zipfile.rst index 7ad65f0c5569c7..b59d1fac9592fa 100644 --- a/Doc/library/zipfile.rst +++ b/Doc/library/zipfile.rst @@ -289,7 +289,7 @@ ZipFile Objects compressed text files in :term:`universal newlines` mode. .. versionchanged:: 3.6 - :meth:`~ZipFile.open` can now be used to write files into the archive with the + :meth:`ZipFile.open` can now be used to write files into the archive with the ``mode='w'`` option. .. versionchanged:: 3.6 From 5d0aad44f15e06d53a3290de6e2fe19cfa93883c Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Mon, 2 May 2022 12:07:47 -0600 Subject: [PATCH 7/7] Apply suggestions from code review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Éric --- Doc/library/fileinput.rst | 2 +- Doc/library/urllib.request.rst | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Doc/library/fileinput.rst b/Doc/library/fileinput.rst index 0bb76c52da8d40..4bc868759f2025 100644 --- a/Doc/library/fileinput.rst +++ b/Doc/library/fileinput.rst @@ -224,5 +224,5 @@ The two following opening hooks are provided by this module: Added the optional *errors* parameter. .. deprecated:: 3.10 - This function is deprecated since :func:`~fileinput.input` and :class:`FileInput` + This function is deprecated since :func:`fileinput.input` and :class:`FileInput` now have *encoding* and *errors* parameters. diff --git a/Doc/library/urllib.request.rst b/Doc/library/urllib.request.rst index c13dc917c55ec6..f898cdc3009adb 100644 --- a/Doc/library/urllib.request.rst +++ b/Doc/library/urllib.request.rst @@ -737,7 +737,7 @@ The following attribute and methods should only be used by classes derived from This method, if implemented, will be called by the parent :class:`OpenerDirector`. It should return a file-like object as described in - the return value of the :meth:`~OpenerDirector.open` of :class:`OpenerDirector`, or ``None``. + the return value of the :meth:`~OpenerDirector.open` method of :class:`OpenerDirector`, or ``None``. It should raise :exc:`~urllib.error.URLError`, unless a truly exceptional thing happens (for example, :exc:`MemoryError` should not be mapped to :exc:`URLError`).