]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Doc: More duplicate word fixes (GH-136299)
authorWeilin Du <108666168+LamentXU123@users.noreply.github.com>
Fri, 11 Jul 2025 18:18:47 +0000 (02:18 +0800)
committerGitHub <noreply@github.com>
Fri, 11 Jul 2025 18:18:47 +0000 (21:18 +0300)
12 files changed:
Include/internal/mimalloc/mimalloc/types.h
Lib/test/test_argparse.py
Lib/test/test_dictcomps.py
Lib/test/test_setcomps.py
Lib/test/test_zipfile/_path/test_path.py
Misc/NEWS.d/3.10.0a3.rst
Misc/NEWS.d/3.12.0a5.rst
Misc/NEWS.d/3.13.0a1.rst
Misc/NEWS.d/3.14.0b1.rst
Modules/_asynciomodule.c
Objects/typeobject.c
Python/preconfig.c

index a17f637fe682367786a4c4e898d44787a55e71c4..19e9322417431418747e420c3ee52fbce6908711 100644 (file)
@@ -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`
 
index 08ff41368d9bb01759db1fff207e44a29a1d5b0e..ddd48b1bc0c56fe75009705ce571c6b582c12f44 100644 (file)
@@ -1829,7 +1829,7 @@ BIN_STDERR_SENTINEL = object()
 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
index 26b56dac5032fa8ecf3738e037bb113ae1425b21..a7a46216787437ea0e27d252b378353a76217651 100644 (file)
@@ -132,7 +132,7 @@ class DictComprehensionTest(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:
                 {x:x for x in BrokenIter(init_raises=True)}
index 0bb02ef11f6b4b99e00f316cbb44cc060972d9a9..6fc5bb74036c5fa1d645dbf8f0b63f0071b44b87 100644 (file)
@@ -154,7 +154,7 @@ We also repeat each of the above scoping tests inside a function
 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:
index 696134023a56b917b0f63304b045fed68f2a2bb3..958a586b0dc8e86e77ae0207cfbd4ba22742a3f8 100644 (file)
@@ -316,7 +316,7 @@ class TestPath(unittest.TestCase):
     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)):
index 3f3fb7ec599e57851f92078c43e43e9617e62b46..6cf3db3eb43c8bcc0318930bf8794088264d03d3 100644 (file)
@@ -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.
 
 ..
 
index 5dc443bb55b617b759792b128d695e3a01496f07..b73bbfbfdc481969ff2413b5dfdd8d0d3b74ecdd 100644 (file)
@@ -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.
 
index 0a93cbcea0ffd29a2dea52bea1845a06a949519b..0741eab4eca6a46b67bd5d398fda303ccd3be14f 100644 (file)
@@ -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.
 
 ..
index 5847dea7d5e8ee6a7c6c3b78fc337d22f44b7544..041fbaf2051719bd808152938e94af8773662cc1 100644 (file)
@@ -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.
 
 ..
index 5f9181395c4828cd2b5e1036f64111ccda292ec5..99408e60721c602fe5da791467ba7a4dc6c55030 100644 (file)
@@ -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:
index e84278d13c3e9cb9350c91b4bae47c42a9e49465..379c4d0467c487d69ca5c43bde6943bb974e72d6 100644 (file)
@@ -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
index 5b26c75de8b3a00d255d180525cff1ba10368b7a..67b2d2f2dc186df1e8740d91b3d08539bde6e4d4 100644 (file)
@@ -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)) {