]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.12] chore: fix typos (#116345) (#116370)
authorTerry Jan Reedy <tjreedy@udel.edu>
Tue, 5 Mar 2024 18:51:17 +0000 (13:51 -0500)
committerGitHub <noreply@github.com>
Tue, 5 Mar 2024 18:51:17 +0000 (18:51 +0000)
Co-authored-by: cui fliter <imcusg@gmail.com>
(cherry picked from commit e7ba6e9dbe5433b4a0bcb0658da6a68197c28630)

Doc/library/idle.rst
Include/cpython/code.h
Include/internal/pycore_instruments.h
Lib/asyncio/tasks.py
Lib/importlib/util.py
Lib/test/libregrtest/run_workers.py
Lib/test/libregrtest/utils.py
Lib/test/test_asyncio/test_waitfor.py
Lib/test/test_baseexception.py
Tools/build/stable_abi.py

index 249dc0ea6ba735bfe2d7feb814a829544219dc07..17a5144b4c0635fc063b8c10b80ae57d76c55940 100644 (file)
@@ -604,7 +604,7 @@ in an editor window.
 The editing features described in previous subsections work when entering
 code interactively.  IDLE's Shell window also responds to the following:
 
-* :kbd:`C-c` attemps to interrupt statement execution (but may fail).
+* :kbd:`C-c` attempts to interrupt statement execution (but may fail).
 
 * :kbd:`C-d` closes Shell if typed at a ``>>>`` prompt.
 
index 03834b20c3e83e11ac000d29d04a924a9375cf4c..311cffec113f0bf43a966c321923b66d82e2934d 100644 (file)
@@ -75,7 +75,7 @@ typedef struct {
     PyObject *_co_freevars;
 } _PyCoCached;
 
-/* Ancilliary data structure used for instrumentation.
+/* Ancillary data structure used for instrumentation.
    Line instrumentation creates an array of
    these. One entry per code unit.*/
 typedef struct {
index 87f70d2dc0d9ac29fff89428c33d3ccebd770e86..b8591563d76b6ee2e957f71c48e5521e451e9ec4 100644 (file)
@@ -40,7 +40,7 @@ extern "C" {
 #define PY_MONITORING_EVENT_RERAISE 14
 
 
-/* Ancilliary events */
+/* Ancillary events */
 
 #define PY_MONITORING_EVENT_C_RETURN 15
 #define PY_MONITORING_EVENT_C_RAISE 16
index 65f2a6ef8004828e5c41702521d7df56eeed02d5..0b22e28d8e04692bfd7e1611c0230204df49da19 100644 (file)
@@ -480,7 +480,7 @@ async def wait_for(fut, timeout):
 
     If the wait is cancelled, the task is also cancelled.
 
-    If the task supresses the cancellation and returns a value instead,
+    If the task suppresses the cancellation and returns a value instead,
     that value is returned.
 
     This function is a coroutine.
index 7a2311ff121ecb13becaa20ab0d542c75261b2a3..f1bd06469cfc6140880cdb22daf40905b3bd3cac 100644 (file)
@@ -146,7 +146,7 @@ class _incompatible_extension_module_restrictions:
 
     You can get the same effect as this function by implementing the
     basic interface of multi-phase init (PEP 489) and lying about
-    support for mulitple interpreters (or per-interpreter GIL).
+    support for multiple interpreters (or per-interpreter GIL).
     """
 
     def __init__(self, *, disable_check):
index 7d2c1cd84cd1ee38487bec47794cfeb2ad7dcb3e..3083a873fcebe9c1fd2c42e1643ccf39854735db 100644 (file)
@@ -209,7 +209,7 @@ class WorkerThread(threading.Thread):
             self._popen = None
 
     def create_stdout(self, stack: contextlib.ExitStack) -> TextIO:
-        """Create stdout temporay file (file descriptor)."""
+        """Create stdout temporary file (file descriptor)."""
 
         if MS_WINDOWS:
             # gh-95027: When stdout is not a TTY, Python uses the ANSI code
index af61e4220e030529b704fac4461b262b9df94e76..c77e36cd88e5218f7ec20fce9b4a1440b9527ef3 100644 (file)
@@ -419,7 +419,7 @@ def get_work_dir(parent_dir: StrPath, worker: bool = False) -> StrPath:
     # the tests. The name of the dir includes the pid to allow parallel
     # testing (see the -j option).
     # Emscripten and WASI have stubbed getpid(), Emscripten has only
-    # milisecond clock resolution. Use randint() instead.
+    # millisecond clock resolution. Use randint() instead.
     if support.is_emscripten or support.is_wasi:
         nounce = random.randint(0, 1_000_000)
     else:
index d52f32534a0cfef10326826f9880b89f4f270888..11a8eeeab37634a50eebddfa36621b7c8d042bf3 100644 (file)
@@ -249,8 +249,8 @@ class AsyncioWaitForTest(unittest.IsolatedAsyncioTestCase):
         await self._test_cancel_wait_for(60.0)
 
     async def test_wait_for_cancel_suppressed(self):
-        # GH-86296: Supressing CancelledError is discouraged
-        # but if a task subpresses CancelledError and returns a value,
+        # GH-86296: Suppressing CancelledError is discouraged
+        # but if a task suppresses CancelledError and returns a value,
         # `wait_for` should return the value instead of raising CancelledError.
         # This is the same behavior as `asyncio.timeout`.
 
index 4c3cf0b964ae56569194ca4035f1338d9ebe9895..6dc06c5e4bc9d52f80b0bc92ddd27703d8eed3c4 100644 (file)
@@ -129,7 +129,7 @@ class ExceptionClassTests(unittest.TestCase):
 
         d[HashThisKeyWillClearTheDict()] = Value()  # refcount of Value() is 1 now
 
-        # Exception.__setstate__ should aquire a strong reference of key and
+        # Exception.__setstate__ should acquire a strong reference of key and
         # value in the dict. Otherwise, Value()'s refcount would go below
         # zero in the tp_hash call in PyObject_SetAttr(), and it would cause
         # crash in GC.
index 4cd1cd953d0d2995013fac278bd6e9be58abdfde..c6363fda34998ff98d1b051f7acbe0fefe59b4d8 100644 (file)
@@ -601,7 +601,7 @@ def check_private_names(manifest):
         if name.startswith('_') and not item.abi_only:
             raise ValueError(
                 f'`{name}` is private (underscore-prefixed) and should be '
-                + 'removed from the stable ABI list or or marked `abi_only`')
+                + 'removed from the stable ABI list or marked `abi_only`')
 
 def check_dump(manifest, filename):
     """Check that manifest.dump() corresponds to the data.