Skip to content

Commit e7ba6e9

Browse files
authored
chore: fix typos (#116345)
Signed-off-by: cui fliter <[email protected]>
1 parent 4402b3c commit e7ba6e9

File tree

15 files changed

+17
-17
lines changed

15 files changed

+17
-17
lines changed

Doc/library/idle.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -604,7 +604,7 @@ in an editor window.
604604
The editing features described in previous subsections work when entering
605605
code interactively. IDLE's Shell window also responds to the following:
606606

607-
* :kbd:`C-c` attemps to interrupt statement execution (but may fail).
607+
* :kbd:`C-c` attempts to interrupt statement execution (but may fail).
608608

609609
* :kbd:`C-d` closes Shell if typed at a ``>>>`` prompt.
610610

Include/cpython/code.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ typedef struct {
7373
PyObject *_co_freevars;
7474
} _PyCoCached;
7575

76-
/* Ancilliary data structure used for instrumentation.
76+
/* Ancillary data structure used for instrumentation.
7777
Line instrumentation creates an array of
7878
these. One entry per code unit.*/
7979
typedef struct {

Include/internal/pycore_compile.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ int _PyCompile_EnsureArrayLargeEnough(
103103
int _PyCompile_ConstCacheMergeOne(PyObject *const_cache, PyObject **obj);
104104

105105

106-
// Export for '_opcode' extention module
106+
// Export for '_opcode' extension module
107107
PyAPI_FUNC(int) _PyCompile_OpcodeIsValid(int opcode);
108108
PyAPI_FUNC(int) _PyCompile_OpcodeHasArg(int opcode);
109109
PyAPI_FUNC(int) _PyCompile_OpcodeHasConst(int opcode);

Include/internal/pycore_gc.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ static inline int _PyObject_GC_MAY_BE_TRACKED(PyObject *obj) {
7373

7474
/* True if an object is shared between multiple threads and
7575
* needs special purpose when freeing to do the possibility
76-
* of in-flight lock-free reads occuring */
76+
* of in-flight lock-free reads occurring */
7777
static inline int _PyObject_GC_IS_SHARED(PyObject *op) {
7878
return (op->ob_gc_bits & _PyGC_BITS_SHARED) != 0;
7979
}

Include/internal/pycore_instruments.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ extern "C" {
3939
#define PY_MONITORING_EVENT_RERAISE 14
4040

4141

42-
/* Ancilliary events */
42+
/* Ancillary events */
4343

4444
#define PY_MONITORING_EVENT_C_RETURN 15
4545
#define PY_MONITORING_EVENT_C_RAISE 16

Include/internal/pycore_interp.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ typedef struct _rare_events {
8585
*/
8686
struct _is {
8787

88-
/* This struct countains the eval_breaker,
88+
/* This struct contains the eval_breaker,
8989
* which is by far the hottest field in this struct
9090
* and should be placed at the beginning. */
9191
struct _ceval_state ceval;

Include/internal/pycore_lock.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ PyAPI_FUNC(void) _PyRWMutex_Unlock(_PyRWMutex *rwmutex);
271271
// underlying data and then read the sequence number again after reading the data. If the
272272
// sequence has not changed the data is valid.
273273
//
274-
// Differs a little bit in that we use CAS on sequence as the lock, instead of a seperate spin lock.
274+
// Differs a little bit in that we use CAS on sequence as the lock, instead of a separate spin lock.
275275
// The writer can also detect that the undelering data has not changed and abandon the write
276276
// and restore the previous sequence.
277277
typedef struct {
@@ -284,7 +284,7 @@ PyAPI_FUNC(void) _PySeqLock_LockWrite(_PySeqLock *seqlock);
284284
// Unlock the sequence lock and move to the next sequence number.
285285
PyAPI_FUNC(void) _PySeqLock_UnlockWrite(_PySeqLock *seqlock);
286286

287-
// Abandon the current update indicating that no mutations have occured
287+
// Abandon the current update indicating that no mutations have occurred
288288
// and restore the previous sequence value.
289289
PyAPI_FUNC(void) _PySeqLock_AbandonWrite(_PySeqLock *seqlock);
290290

Lib/asyncio/tasks.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,7 @@ async def wait_for(fut, timeout):
464464
465465
If the wait is cancelled, the task is also cancelled.
466466
467-
If the task supresses the cancellation and returns a value instead,
467+
If the task suppresses the cancellation and returns a value instead,
468468
that value is returned.
469469
470470
This function is a coroutine.

Lib/importlib/util.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ class _incompatible_extension_module_restrictions:
146146
147147
You can get the same effect as this function by implementing the
148148
basic interface of multi-phase init (PEP 489) and lying about
149-
support for mulitple interpreters (or per-interpreter GIL).
149+
support for multiple interpreters (or per-interpreter GIL).
150150
"""
151151

152152
def __init__(self, *, disable_check):

Lib/test/libregrtest/run_workers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ def _run_process(self, runtests: WorkerRunTests, output_fd: int,
209209
self._popen = None
210210

211211
def create_stdout(self, stack: contextlib.ExitStack) -> TextIO:
212-
"""Create stdout temporay file (file descriptor)."""
212+
"""Create stdout temporary file (file descriptor)."""
213213

214214
if MS_WINDOWS:
215215
# gh-95027: When stdout is not a TTY, Python uses the ANSI code

Lib/test/libregrtest/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,7 @@ def get_work_dir(parent_dir: StrPath, worker: bool = False) -> StrPath:
422422
# the tests. The name of the dir includes the pid to allow parallel
423423
# testing (see the -j option).
424424
# Emscripten and WASI have stubbed getpid(), Emscripten has only
425-
# milisecond clock resolution. Use randint() instead.
425+
# millisecond clock resolution. Use randint() instead.
426426
if support.is_emscripten or support.is_wasi:
427427
nounce = random.randint(0, 1_000_000)
428428
else:

Lib/test/test_asyncio/test_waitfor.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -249,8 +249,8 @@ async def test_cancel_wait_for(self):
249249
await self._test_cancel_wait_for(60.0)
250250

251251
async def test_wait_for_cancel_suppressed(self):
252-
# GH-86296: Supressing CancelledError is discouraged
253-
# but if a task subpresses CancelledError and returns a value,
252+
# GH-86296: Suppressing CancelledError is discouraged
253+
# but if a task suppresses CancelledError and returns a value,
254254
# `wait_for` should return the value instead of raising CancelledError.
255255
# This is the same behavior as `asyncio.timeout`.
256256

Lib/test/test_baseexception.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ class Value(str):
129129

130130
d[HashThisKeyWillClearTheDict()] = Value() # refcount of Value() is 1 now
131131

132-
# Exception.__setstate__ should aquire a strong reference of key and
132+
# Exception.__setstate__ should acquire a strong reference of key and
133133
# value in the dict. Otherwise, Value()'s refcount would go below
134134
# zero in the tp_hash call in PyObject_SetAttr(), and it would cause
135135
# crash in GC.

Objects/mimalloc/prim/windows/etw.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ extern "C" {
136136
// - MCGEN_EVENTSETINFORMATION
137137
// - MCGEN_EVENTWRITETRANSFER
138138
//
139-
// If the the macro is undefined, the MC implementation will default to the
139+
// If the macro is undefined, the MC implementation will default to the
140140
// corresponding ETW APIs. For example, if the MCGEN_EVENTREGISTER macro is
141141
// undefined, the EventRegister[MyProviderName] macro will use EventRegister
142142
// in user mode and will use EtwRegister in kernel mode.

Tools/build/stable_abi.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -601,7 +601,7 @@ def check_private_names(manifest):
601601
if name.startswith('_') and not item.abi_only:
602602
raise ValueError(
603603
f'`{name}` is private (underscore-prefixed) and should be '
604-
+ 'removed from the stable ABI list or or marked `abi_only`')
604+
+ 'removed from the stable ABI list or marked `abi_only`')
605605

606606
def check_dump(manifest, filename):
607607
"""Check that manifest.dump() corresponds to the data.

0 commit comments

Comments
 (0)