From 47aab946e4b7be86e6a9305766645a929b49fb1e Mon Sep 17 00:00:00 2001 From: Weilin Du <108666168+LamentXU123@users.noreply.github.com> Date: Sat, 5 Jul 2025 02:18:50 +0800 Subject: [PATCH 01/14] Update typeobject.c --- Objects/typeobject.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Objects/typeobject.c b/Objects/typeobject.c index e84278d13c3e9c..379c4d0467c487 100644 --- a/Objects/typeobject.c +++ b/Objects/typeobject.c @@ -225,7 +225,7 @@ type_from_ref(PyObject *ref) } -/* helpers for for static builtin types */ +/* helpers for static builtin types */ #ifndef NDEBUG static inline int From 56351f8d712384aea968ba2e1fb125eb40293876 Mon Sep 17 00:00:00 2001 From: Weilin Du <108666168+LamentXU123@users.noreply.github.com> Date: Sat, 5 Jul 2025 02:19:28 +0800 Subject: [PATCH 02/14] Update _asynciomodule.c --- Modules/_asynciomodule.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Modules/_asynciomodule.c b/Modules/_asynciomodule.c index 5f9181395c4828..99408e60721c60 100644 --- a/Modules/_asynciomodule.c +++ b/Modules/_asynciomodule.c @@ -821,7 +821,7 @@ future_add_done_callback(asyncio_state *state, FutureObj *fut, PyObject *arg, Invariants: * callbacks != NULL: - There are some callbacks in in the list. Just + There are some callbacks in the list. Just add the new callback to it. * callbacks == NULL and callback0 == NULL: From a80704d948e512afbe9b1cc955cc55f63d4969ce Mon Sep 17 00:00:00 2001 From: Weilin Du <108666168+LamentXU123@users.noreply.github.com> Date: Sat, 5 Jul 2025 02:20:29 +0800 Subject: [PATCH 03/14] Update 3.14.0b1.rst --- Misc/NEWS.d/3.14.0b1.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Misc/NEWS.d/3.14.0b1.rst b/Misc/NEWS.d/3.14.0b1.rst index 5847dea7d5e8ee..041fbaf2051719 100644 --- a/Misc/NEWS.d/3.14.0b1.rst +++ b/Misc/NEWS.d/3.14.0b1.rst @@ -1051,7 +1051,7 @@ warning filtering state if the :data:`sys.flags.context_aware_warnings` flag is set to true. This makes using the context manager thread-safe in multi-threaded programs. The flag is true by default in free-threaded builds and is otherwise false. The value of the flag can be overridden by -the the :option:`-X context_aware_warnings <-X>` command-line option or by +the :option:`-X context_aware_warnings <-X>` command-line option or by the :envvar:`PYTHON_CONTEXT_AWARE_WARNINGS` environment variable. .. From 9faf99197aef23386dcca82d975a25b247796836 Mon Sep 17 00:00:00 2001 From: Weilin Du <108666168+LamentXU123@users.noreply.github.com> Date: Sat, 5 Jul 2025 02:20:52 +0800 Subject: [PATCH 04/14] Update 3.13.0a1.rst --- Misc/NEWS.d/3.13.0a1.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Misc/NEWS.d/3.13.0a1.rst b/Misc/NEWS.d/3.13.0a1.rst index 0a93cbcea0ffd2..0741eab4eca6a4 100644 --- a/Misc/NEWS.d/3.13.0a1.rst +++ b/Misc/NEWS.d/3.13.0a1.rst @@ -153,7 +153,7 @@ about a 10% improvement. .. section: Core and Builtins Guard ``assert(tstate->thread_id > 0)`` with ``#ifndef HAVE_PTHREAD_STUBS``. -This allows for for pydebug builds to work under WASI which (currently) +This allows for pydebug builds to work under WASI which (currently) lacks thread support. .. From 39d242660a39598bdd45ee84b984989b4433f32e Mon Sep 17 00:00:00 2001 From: Weilin Du <108666168+LamentXU123@users.noreply.github.com> Date: Sat, 5 Jul 2025 02:21:12 +0800 Subject: [PATCH 05/14] Update 3.12.0a5.rst --- Misc/NEWS.d/3.12.0a5.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Misc/NEWS.d/3.12.0a5.rst b/Misc/NEWS.d/3.12.0a5.rst index 5dc443bb55b617..b73bbfbfdc4819 100644 --- a/Misc/NEWS.d/3.12.0a5.rst +++ b/Misc/NEWS.d/3.12.0a5.rst @@ -253,7 +253,7 @@ Adapt the ``_elementtree`` extension module to multi-phase init .. section: Library Avoid potential unexpected ``freeaddrinfo`` call (double free) in -:mod:`socket` when when a libc ``getaddrinfo()`` implementation leaves +:mod:`socket` when a libc ``getaddrinfo()`` implementation leaves garbage in an output pointer when returning an error. Original patch by Sergey G. Brester. From d3c3b7c49596450e1cfa633549da01fc2ebecfcc Mon Sep 17 00:00:00 2001 From: Weilin Du <108666168+LamentXU123@users.noreply.github.com> Date: Sat, 5 Jul 2025 02:21:29 +0800 Subject: [PATCH 06/14] Update 3.10.0a3.rst --- Misc/NEWS.d/3.10.0a3.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Misc/NEWS.d/3.10.0a3.rst b/Misc/NEWS.d/3.10.0a3.rst index 3f3fb7ec599e57..6cf3db3eb43c8b 100644 --- a/Misc/NEWS.d/3.10.0a3.rst +++ b/Misc/NEWS.d/3.10.0a3.rst @@ -394,7 +394,7 @@ Removed the ``formatter`` module, which was deprecated in Python 3.4. It is somewhat obsolete, little used, and not tested. It was originally scheduled to be removed in Python 3.6, but such removals were delayed until after Python 2.7 EOL. Existing users should copy whatever classes they use into -their code. Patch by Donghee Na and and Terry J. Reedy. +their code. Patch by Donghee Na and Terry J. Reedy. .. From 419e910173bfd89f114c1ba946b1bc6a2cfe9d76 Mon Sep 17 00:00:00 2001 From: Weilin Du <108666168+LamentXU123@users.noreply.github.com> Date: Sat, 5 Jul 2025 02:22:07 +0800 Subject: [PATCH 07/14] Update test_path.py --- Lib/test/test_zipfile/_path/test_path.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/test/test_zipfile/_path/test_path.py b/Lib/test/test_zipfile/_path/test_path.py index 696134023a56b9..958a586b0dc8e8 100644 --- a/Lib/test/test_zipfile/_path/test_path.py +++ b/Lib/test/test_zipfile/_path/test_path.py @@ -316,7 +316,7 @@ def test_mutability(self, alpharep): HUGE_ZIPFILE_NUM_ENTRIES = 2**13 def huge_zipfile(self): - """Create a read-only zipfile with a huge number of entries entries.""" + """Create a read-only zipfile with a huge number of entries.""" strm = io.BytesIO() zf = zipfile.ZipFile(strm, "w") for entry in map(str, range(self.HUGE_ZIPFILE_NUM_ENTRIES)): From d207e4d31104f4499e7cfd3972a42c7f6071ad40 Mon Sep 17 00:00:00 2001 From: Weilin Du <108666168+LamentXU123@users.noreply.github.com> Date: Sat, 5 Jul 2025 02:23:01 +0800 Subject: [PATCH 08/14] Update test_dictcomps.py --- Lib/test/test_dictcomps.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/test/test_dictcomps.py b/Lib/test/test_dictcomps.py index 26b56dac5032fa..a7a46216787437 100644 --- a/Lib/test/test_dictcomps.py +++ b/Lib/test/test_dictcomps.py @@ -132,7 +132,7 @@ def test_star_expression(self): def test_exception_locations(self): # The location of an exception raised from __init__ or - # __next__ should should be the iterator expression + # __next__ should be the iterator expression def init_raises(): try: {x:x for x in BrokenIter(init_raises=True)} From d3f2ff18abf279ff65196ab8668a51b065600a0c Mon Sep 17 00:00:00 2001 From: Weilin Du <108666168+LamentXU123@users.noreply.github.com> Date: Sat, 5 Jul 2025 02:23:29 +0800 Subject: [PATCH 09/14] Update test_setcomps.py --- Lib/test/test_setcomps.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/test/test_setcomps.py b/Lib/test/test_setcomps.py index 0bb02ef11f6b4b..6fc5bb74036c5f 100644 --- a/Lib/test/test_setcomps.py +++ b/Lib/test/test_setcomps.py @@ -154,7 +154,7 @@ class SetComprehensionTest(unittest.TestCase): def test_exception_locations(self): # The location of an exception raised from __init__ or - # __next__ should should be the iterator expression + # __next__ should be the iterator expression def init_raises(): try: From 765c7c465e4cafc5f2b3fd2363a76dbf7dca71ae Mon Sep 17 00:00:00 2001 From: Weilin Du <108666168+LamentXU123@users.noreply.github.com> Date: Sat, 5 Jul 2025 02:24:05 +0800 Subject: [PATCH 10/14] Update test_argparse.py --- Lib/test/test_argparse.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/test/test_argparse.py b/Lib/test/test_argparse.py index 08ff41368d9bb0..ddd48b1bc0c56f 100644 --- a/Lib/test/test_argparse.py +++ b/Lib/test/test_argparse.py @@ -1829,7 +1829,7 @@ def test_r_1_replace(self): class StdStreamComparer: def __init__(self, attr): # We try to use the actual stdXXX.buffer attribute as our - # marker, but but under some test environments, + # marker, but under some test environments, # sys.stdout/err are replaced by io.StringIO which won't have .buffer, # so we use a sentinel simply to show that the tests do the right thing # for any buffer supporting object From cadff59ab29f7b1a8cef4622969c49a0f06855c2 Mon Sep 17 00:00:00 2001 From: Weilin Du <108666168+LamentXU123@users.noreply.github.com> Date: Sat, 5 Jul 2025 02:24:54 +0800 Subject: [PATCH 11/14] Update types.h --- Include/internal/mimalloc/mimalloc/types.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Include/internal/mimalloc/mimalloc/types.h b/Include/internal/mimalloc/mimalloc/types.h index a17f637fe68236..19e93224174314 100644 --- a/Include/internal/mimalloc/mimalloc/types.h +++ b/Include/internal/mimalloc/mimalloc/types.h @@ -481,7 +481,7 @@ typedef struct mi_segment_s { struct mi_segment_s* next; // the list of freed segments in the cache (must be first field, see `segment.c:mi_segment_init`) size_t abandoned; // abandoned pages (i.e. the original owning thread stopped) (`abandoned <= used`) - size_t abandoned_visits; // count how often this segment is visited in the abandoned list (to force reclaim it it is too long) + size_t abandoned_visits; // count how often this segment is visited in the abandoned list (to force reclaim if it is too long) size_t used; // count of pages in use uintptr_t cookie; // verify addresses in debug mode: `mi_ptr_cookie(segment) == segment->cookie` From 7f94800d09cf7f26da38aeadc680fac45da31e2f Mon Sep 17 00:00:00 2001 From: Weilin Du <108666168+LamentXU123@users.noreply.github.com> Date: Sat, 5 Jul 2025 02:25:37 +0800 Subject: [PATCH 12/14] Update test_exception_group.py --- Lib/test/test_exception_group.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/test/test_exception_group.py b/Lib/test/test_exception_group.py index 5df2c41c6b56bc..091d1f20ccec4c 100644 --- a/Lib/test/test_exception_group.py +++ b/Lib/test/test_exception_group.py @@ -496,7 +496,7 @@ def leaf_generator(exc, tbs=None): class LeafGeneratorTest(unittest.TestCase): # The leaf_generator is mentioned in PEP 654 as a suggestion - # on how to iterate over leaf nodes of an EG. Is is also + # on how to iterate over leaf nodes of an EG. Is also # used below as a test utility. So we test it here. def test_leaf_generator(self): From 2030621a43112f6a44c2595fca0976bbce80da6a Mon Sep 17 00:00:00 2001 From: Weilin Du <108666168+LamentXU123@users.noreply.github.com> Date: Sat, 5 Jul 2025 02:26:49 +0800 Subject: [PATCH 13/14] Update preconfig.c --- Python/preconfig.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Python/preconfig.c b/Python/preconfig.c index 5b26c75de8b3a0..67b2d2f2dc186d 100644 --- a/Python/preconfig.c +++ b/Python/preconfig.c @@ -700,7 +700,7 @@ preconfig_init_coerce_c_locale(PyPreConfig *config) /* Test if coerce_c_locale equals to -1 or equals to 1: PYTHONCOERCECLOCALE=1 doesn't imply that the C locale is always coerced. - It is only coerced if if the LC_CTYPE locale is "C". */ + It is only coerced if the LC_CTYPE locale is "C". */ if (config->coerce_c_locale < 0 || config->coerce_c_locale == 1) { /* The C locale enables the C locale coercion (PEP 538) */ if (_Py_LegacyLocaleDetected(0)) { From 6d6a3d58978fddcfad5dc406750a24524c5ce755 Mon Sep 17 00:00:00 2001 From: Weilin Du <108666168+LamentXU123@users.noreply.github.com> Date: Sat, 5 Jul 2025 11:37:00 +0800 Subject: [PATCH 14/14] Update test_exception_group.py --- Lib/test/test_exception_group.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/test/test_exception_group.py b/Lib/test/test_exception_group.py index 091d1f20ccec4c..5df2c41c6b56bc 100644 --- a/Lib/test/test_exception_group.py +++ b/Lib/test/test_exception_group.py @@ -496,7 +496,7 @@ def leaf_generator(exc, tbs=None): class LeafGeneratorTest(unittest.TestCase): # The leaf_generator is mentioned in PEP 654 as a suggestion - # on how to iterate over leaf nodes of an EG. Is also + # on how to iterate over leaf nodes of an EG. Is is also # used below as a test utility. So we test it here. def test_leaf_generator(self):