From 85664f354bad2c9d568c2fc5a03aa3d960e4aaf7 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Sun, 2 Jul 2023 18:11:45 +0200 Subject: [PATCH 01/10] gh-106320: Remove private _PyInterpreterState functions (#106335) Remove private _PyThreadState and _PyInterpreterState C API functions: move them to the internal C API (pycore_pystate.h and pycore_interp.h). Don't export most of these functions anymore, but still export functions used by tests. Remove _PyThreadState_Prealloc() and _PyThreadState_Init() from the C API, but keep it in the stable API. From 9907d9bfc4ba3ab0ea119d64aabfce9bf7ddb5dc Mon Sep 17 00:00:00 2001 From: Adorilson Bezerra Date: Sat, 30 Dec 2023 16:00:03 +0000 Subject: [PATCH 02/10] Doc: minor change --- Doc/library/array.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/Doc/library/array.rst b/Doc/library/array.rst index 1f04f697c7507f..e4940e27e01232 100644 --- a/Doc/library/array.rst +++ b/Doc/library/array.rst @@ -282,3 +282,4 @@ Examples:: `NumPy `_ The NumPy package defines another array type. + From ac028d7043b53409487208c93952c96c984c431b Mon Sep 17 00:00:00 2001 From: Adorilson Bezerra Date: Mon, 25 Mar 2024 19:23:48 +0000 Subject: [PATCH 03/10] Revert "Doc: minor change" This reverts commit ebfa0937c2caf0110ab1540f14956d56fe925092. --- Doc/library/array.rst | 1 - 1 file changed, 1 deletion(-) diff --git a/Doc/library/array.rst b/Doc/library/array.rst index e4940e27e01232..1f04f697c7507f 100644 --- a/Doc/library/array.rst +++ b/Doc/library/array.rst @@ -282,4 +282,3 @@ Examples:: `NumPy `_ The NumPy package defines another array type. - From 3b534065024f81d02267903486c3a3ba69e6b07a Mon Sep 17 00:00:00 2001 From: Adorilson Bezerra Date: Sun, 14 Mar 2021 22:51:39 -0300 Subject: [PATCH 04/10] gh-106318: Add example for str.isalpha() --- Doc/library/stdtypes.rst | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Doc/library/stdtypes.rst b/Doc/library/stdtypes.rst index a81a6704142dcc..2cc53eaf763ea8 100644 --- a/Doc/library/stdtypes.rst +++ b/Doc/library/stdtypes.rst @@ -1990,7 +1990,19 @@ expression support in the :mod:`re` module). from the `Alphabetic property defined in the section 4.10 'Letters, Alphabetic, and Ideographic' of the Unicode Standard `_. + For example:: + + ..doctest:: + + >>> 'a commom word'.isalpha() + False + >>> 'acommomword'.isalpha() + True + >>> 'µ'.isalpha() # no-ascii characters could be alpha too + True + + See Unicode Properties section in :ref:`unicode-howto`. .. method:: str.isascii() From 38c3493056dbcf3e80f5de3f21f367efee373b91 Mon Sep 17 00:00:00 2001 From: Adorilson Bezerra Date: Sat, 9 Aug 2025 17:58:28 +0100 Subject: [PATCH 05/10] gh-106318: Resolve conflict on str.isalpha() doc --- Doc/library/stdtypes.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Doc/library/stdtypes.rst b/Doc/library/stdtypes.rst index 2cc53eaf763ea8..8aa14cedca368f 100644 --- a/Doc/library/stdtypes.rst +++ b/Doc/library/stdtypes.rst @@ -1990,9 +1990,9 @@ expression support in the :mod:`re` module). from the `Alphabetic property defined in the section 4.10 'Letters, Alphabetic, and Ideographic' of the Unicode Standard `_. - For example:: + For example: - ..doctest:: + .. doctest:: >>> 'a commom word'.isalpha() False From c8645e936a983e7dafd33acf876af1f4fbe7a99c Mon Sep 17 00:00:00 2001 From: Adorilson Bezerra Date: Sat, 9 Aug 2025 18:13:57 +0100 Subject: [PATCH 06/10] gh-106318: Fix link to Unicode Properties on str.isalpha() doc --- Doc/library/stdtypes.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/library/stdtypes.rst b/Doc/library/stdtypes.rst index 8aa14cedca368f..be5edf15af20b6 100644 --- a/Doc/library/stdtypes.rst +++ b/Doc/library/stdtypes.rst @@ -2001,8 +2001,8 @@ expression support in the :mod:`re` module). >>> 'µ'.isalpha() # no-ascii characters could be alpha too True + See :ref:`unicode-properties`. - See Unicode Properties section in :ref:`unicode-howto`. .. method:: str.isascii() From 55d4ea2237d74e38e72a2e545a8c4d79fec2a9dd Mon Sep 17 00:00:00 2001 From: Adorilson Bezerra Date: Sat, 9 Aug 2025 20:12:27 +0100 Subject: [PATCH 07/10] gh-106318: Improve comment in str.isalpha() doc example MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Éric --- Doc/library/stdtypes.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/library/stdtypes.rst b/Doc/library/stdtypes.rst index be5edf15af20b6..3827f4f0db8067 100644 --- a/Doc/library/stdtypes.rst +++ b/Doc/library/stdtypes.rst @@ -1998,7 +1998,7 @@ expression support in the :mod:`re` module). False >>> 'acommomword'.isalpha() True - >>> 'µ'.isalpha() # no-ascii characters could be alpha too + >>> 'µ'.isalpha() # non-ascii characters can be considered alphabetical too True See :ref:`unicode-properties`. From 84f1a6b54c2755a9a9e5ada726b2afc94bf3fe9d Mon Sep 17 00:00:00 2001 From: Adorilson Bezerra Date: Sat, 9 Aug 2025 18:26:36 +0100 Subject: [PATCH 08/10] [DOC] Add label to Unicode Properties subsection on how-to --- Doc/howto/unicode.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Doc/howto/unicode.rst b/Doc/howto/unicode.rst index 254fe729355353..243cc27bac7025 100644 --- a/Doc/howto/unicode.rst +++ b/Doc/howto/unicode.rst @@ -352,6 +352,8 @@ If you don't include such a comment, the default encoding used will be UTF-8 as already mentioned. See also :pep:`263` for more information. +.. _unicode-properties: + Unicode Properties ------------------ From 3eca3988a6037fe0f23534151bd3d3c7717969b6 Mon Sep 17 00:00:00 2001 From: Adorilson Bezerra Date: Mon, 24 Nov 2025 12:01:05 +0000 Subject: [PATCH 09/10] Update Doc/library/stdtypes.rst Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> --- Doc/library/stdtypes.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/library/stdtypes.rst b/Doc/library/stdtypes.rst index 3827f4f0db8067..f5bd3c697d9f02 100644 --- a/Doc/library/stdtypes.rst +++ b/Doc/library/stdtypes.rst @@ -1998,7 +1998,7 @@ expression support in the :mod:`re` module). False >>> 'acommomword'.isalpha() True - >>> 'µ'.isalpha() # non-ascii characters can be considered alphabetical too + >>> 'µ'.isalpha() # non-ASCII characters can be considered alphabetical too True See :ref:`unicode-properties`. From b105cd40f273ad82d35e26381ec7be0ba6d79cb0 Mon Sep 17 00:00:00 2001 From: Adorilson Bezerra Date: Mon, 24 Nov 2025 12:01:25 +0000 Subject: [PATCH 10/10] Update Doc/library/stdtypes.rst Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> --- Doc/library/stdtypes.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Doc/library/stdtypes.rst b/Doc/library/stdtypes.rst index f5bd3c697d9f02..ca038f2e0c51e4 100644 --- a/Doc/library/stdtypes.rst +++ b/Doc/library/stdtypes.rst @@ -1994,9 +1994,9 @@ expression support in the :mod:`re` module). .. doctest:: - >>> 'a commom word'.isalpha() + >>> 'Letters and spaces'.isalpha() False - >>> 'acommomword'.isalpha() + >>> 'LettersOnly'.isalpha() True >>> 'µ'.isalpha() # non-ASCII characters can be considered alphabetical too True