summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcui fliter <imcusg@gmail.com>2024-03-05 16:05:52 (GMT)
committerGitHub <noreply@github.com>2024-03-05 16:05:52 (GMT)
commite7ba6e9dbe5433b4a0bcb0658da6a68197c28630 (patch)
treea969e02a86240adb40023084777365594bc82c61
parent4402b3cbcf8323bfa908ef86a687a5a7d46d27f3 (diff)
downloadcpython-e7ba6e9dbe5433b4a0bcb0658da6a68197c28630.zip
cpython-e7ba6e9dbe5433b4a0bcb0658da6a68197c28630.tar.gz
cpython-e7ba6e9dbe5433b4a0bcb0658da6a68197c28630.tar.bz2
chore: fix typos (#116345)
Signed-off-by: cui fliter <imcusg@gmail.com>
-rw-r--r--Doc/library/idle.rst2
-rw-r--r--Include/cpython/code.h2
-rw-r--r--Include/internal/pycore_compile.h2
-rw-r--r--Include/internal/pycore_gc.h2
-rw-r--r--Include/internal/pycore_instruments.h2
-rw-r--r--Include/internal/pycore_interp.h2
-rw-r--r--Include/internal/pycore_lock.h4
-rw-r--r--Lib/asyncio/tasks.py2
-rw-r--r--Lib/importlib/util.py2
-rw-r--r--Lib/test/libregrtest/run_workers.py2
-rw-r--r--Lib/test/libregrtest/utils.py2
-rw-r--r--Lib/test/test_asyncio/test_waitfor.py4
-rw-r--r--Lib/test/test_baseexception.py2
-rw-r--r--Objects/mimalloc/prim/windows/etw.h2
-rw-r--r--Tools/build/stable_abi.py2
15 files changed, 17 insertions, 17 deletions
diff --git a/Doc/library/idle.rst b/Doc/library/idle.rst
index 249dc0e..17a5144 100644
--- a/Doc/library/idle.rst
+++ b/Doc/library/idle.rst
@@ -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.
diff --git a/Include/cpython/code.h b/Include/cpython/code.h
index 1f47d99..4e7e212 100644
--- a/Include/cpython/code.h
+++ b/Include/cpython/code.h
@@ -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 {
diff --git a/Include/internal/pycore_compile.h b/Include/internal/pycore_compile.h
index e587075..0f446a0 100644
--- a/Include/internal/pycore_compile.h
+++ b/Include/internal/pycore_compile.h
@@ -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);
diff --git a/Include/internal/pycore_gc.h b/Include/internal/pycore_gc.h
index 40414a8..cf0b148 100644
--- a/Include/internal/pycore_gc.h
+++ b/Include/internal/pycore_gc.h
@@ -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;
}
diff --git a/Include/internal/pycore_instruments.h b/Include/internal/pycore_instruments.h
index eae8371..7f84d4a 100644
--- a/Include/internal/pycore_instruments.h
+++ b/Include/internal/pycore_instruments.h
@@ -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
diff --git a/Include/internal/pycore_interp.h b/Include/internal/pycore_interp.h
index 6a00aaf..d79fd3b 100644
--- a/Include/internal/pycore_interp.h
+++ b/Include/internal/pycore_interp.h
@@ -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;
diff --git a/Include/internal/pycore_lock.h b/Include/internal/pycore_lock.h
index f648be4..971b461 100644
--- a/Include/internal/pycore_lock.h
+++ b/Include/internal/pycore_lock.h
@@ -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);
diff --git a/Lib/asyncio/tasks.py b/Lib/asyncio/tasks.py
index fafee3e..48e31af 100644
--- a/Lib/asyncio/tasks.py
+++ b/Lib/asyncio/tasks.py
@@ -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.
diff --git a/Lib/importlib/util.py b/Lib/importlib/util.py
index ff4f12f..da9bd08 100644
--- a/Lib/importlib/util.py
+++ b/Lib/importlib/util.py
@@ -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):
diff --git a/Lib/test/libregrtest/run_workers.py b/Lib/test/libregrtest/run_workers.py
index 18a0342..9cfe1b9 100644
--- a/Lib/test/libregrtest/run_workers.py
+++ b/Lib/test/libregrtest/run_workers.py
@@ -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
diff --git a/Lib/test/libregrtest/utils.py b/Lib/test/libregrtest/utils.py
index b30025d..7765ae8 100644
--- a/Lib/test/libregrtest/utils.py
+++ b/Lib/test/libregrtest/utils.py
@@ -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:
diff --git a/Lib/test/test_asyncio/test_waitfor.py b/Lib/test/test_asyncio/test_waitfor.py
index d52f325..11a8eee 100644
--- a/Lib/test/test_asyncio/test_waitfor.py
+++ b/Lib/test/test_asyncio/test_waitfor.py
@@ -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`.
diff --git a/Lib/test/test_baseexception.py b/Lib/test/test_baseexception.py
index 4c3cf0b..6dc06c5 100644
--- a/Lib/test/test_baseexception.py
+++ b/Lib/test/test_baseexception.py
@@ -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.
diff --git a/Objects/mimalloc/prim/windows/etw.h b/Objects/mimalloc/prim/windows/etw.h
index 4e0a092..e9ec35f 100644
--- a/Objects/mimalloc/prim/windows/etw.h
+++ b/Objects/mimalloc/prim/windows/etw.h
@@ -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.
diff --git a/Tools/build/stable_abi.py b/Tools/build/stable_abi.py
index 8314662..95fc4df 100644
--- a/Tools/build/stable_abi.py
+++ b/Tools/build/stable_abi.py
@@ -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.