]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
chore: fix typos (#116345)
authorcui fliter <imcusg@gmail.com>
Tue, 5 Mar 2024 16:05:52 +0000 (00:05 +0800)
committerGitHub <noreply@github.com>
Tue, 5 Mar 2024 16:05:52 +0000 (09:05 -0700)
Signed-off-by: cui fliter <imcusg@gmail.com>
15 files changed:
Doc/library/idle.rst
Include/cpython/code.h
Include/internal/pycore_compile.h
Include/internal/pycore_gc.h
Include/internal/pycore_instruments.h
Include/internal/pycore_interp.h
Include/internal/pycore_lock.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
Objects/mimalloc/prim/windows/etw.h
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 1f47d99fb60443462cce3372749de8a07936704a..4e7e212fd099db609ec468f2370e401dd2259b8f 100644 (file)
@@ -73,7 +73,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 e5870759ba74f16ca9af0c7cbf5b7622f172e280..0f446a00b4df22cb830cf0962af577e3e3724192 100644 (file)
@@ -103,7 +103,7 @@ int _PyCompile_EnsureArrayLargeEnough(
 int _PyCompile_ConstCacheMergeOne(PyObject *const_cache, PyObject **obj);
 
 
-// Export for '_opcode' extention module
+// Export for '_opcode' extension module
 PyAPI_FUNC(int) _PyCompile_OpcodeIsValid(int opcode);
 PyAPI_FUNC(int) _PyCompile_OpcodeHasArg(int opcode);
 PyAPI_FUNC(int) _PyCompile_OpcodeHasConst(int opcode);
index 40414a868518bb6dd69a6c829eaf3631ed91a6f0..cf0b148c2b6463a74ce1cf0b83cbc0aa4c58374c 100644 (file)
@@ -73,7 +73,7 @@ static inline int _PyObject_GC_MAY_BE_TRACKED(PyObject *obj) {
 
 /* True if an object is shared between multiple threads and
  * needs special purpose when freeing to do the possibility
- * of in-flight lock-free reads occuring */
+ * of in-flight lock-free reads occurring */
 static inline int _PyObject_GC_IS_SHARED(PyObject *op) {
     return (op->ob_gc_bits & _PyGC_BITS_SHARED) != 0;
 }
index eae8371ef7f9b8f19e5216b130fb7c88991bd47a..7f84d4a763bbcf6503db9ee962694b84f10a516b 100644 (file)
@@ -39,7 +39,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 6a00aafea73779a004048b7565e11c550e1dec19..d79fd3b6039ef536955a697cb33a97bc37eb2457 100644 (file)
@@ -85,7 +85,7 @@ typedef struct _rare_events {
    */
 struct _is {
 
-    /* This struct countains the eval_breaker,
+    /* This struct contains the eval_breaker,
      * which is by far the hottest field in this struct
      * and should be placed at the beginning. */
     struct _ceval_state ceval;
index f648be496ea4af39c98e53d833d384e975e882ed..971b4611a87f3ba54e9ba6aa5517e3376c03ce83 100644 (file)
@@ -271,7 +271,7 @@ PyAPI_FUNC(void) _PyRWMutex_Unlock(_PyRWMutex *rwmutex);
 // underlying data and then read the sequence number again after reading the data.  If the
 // sequence has not changed the data is valid.
 //
-// Differs a little bit in that we use CAS on sequence as the lock, instead of a seperate spin lock.
+// Differs a little bit in that we use CAS on sequence as the lock, instead of a separate spin lock.
 // The writer can also detect that the undelering data has not changed and abandon the write
 // and restore the previous sequence.
 typedef struct {
@@ -284,7 +284,7 @@ PyAPI_FUNC(void) _PySeqLock_LockWrite(_PySeqLock *seqlock);
 // Unlock the sequence lock and move to the next sequence number.
 PyAPI_FUNC(void) _PySeqLock_UnlockWrite(_PySeqLock *seqlock);
 
-// Abandon the current update indicating that no mutations have occured
+// Abandon the current update indicating that no mutations have occurred
 // and restore the previous sequence value.
 PyAPI_FUNC(void) _PySeqLock_AbandonWrite(_PySeqLock *seqlock);
 
index fafee3e738f6aa36512ea36ceffee46b54f46127..48e31af9a431676bc1b6c12b5b28989a58132f5d 100644 (file)
@@ -464,7 +464,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 ff4f12fb1af70cd4d4fe28a5f11ade054aa3ab04..da9bd080a8dd5a2d47df521b480476c5045fc8a9 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 18a0342f0611cf0e285bc80bc59a7b8df7ad5344..9cfe1b9d6fd07dcf025b534efc586b8c40f2fda2 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 b30025d962413c175b9f52f463c5802296ac1623..7765ae8a933be44df3c8e64a3f5784ee4fdf9fc2 100644 (file)
@@ -422,7 +422,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 4e0a092a10f4ba96facb51781296dc32c8ff2f84..e9ec35fc9ed7ebcb1df0a528cc52390167ae9873 100644 (file)
@@ -136,7 +136,7 @@ extern "C" {
 // - MCGEN_EVENTSETINFORMATION
 // - MCGEN_EVENTWRITETRANSFER
 //
-// If the the macro is undefined, the MC implementation will default to the
+// If the macro is undefined, the MC implementation will default to the
 // corresponding ETW APIs. For example, if the MCGEN_EVENTREGISTER macro is
 // undefined, the EventRegister[MyProviderName] macro will use EventRegister
 // in user mode and will use EtwRegister in kernel mode.
index 83146622c74f941b1cb825b5f743ab36c3c0fb53..95fc4dfbf11e49fd7fe74c5a1806c8ccbc6ed57d 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.