diff --git a/.github/problem-matchers/gcc.json b/.github/problem-matchers/gcc.json index bd5ab6c00a7608..b78324cf10e84d 100644 --- a/.github/problem-matchers/gcc.json +++ b/.github/problem-matchers/gcc.json @@ -1,5 +1,5 @@ { - "__comment": "Taken from vscode-cpptools's Extension/package.json gcc rule", + "__comment": "Taken from vscode-cpptools' Extension/package.json gcc rule", "problemMatcher": [ { "owner": "gcc-problem-matcher", diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ec7904c2e2cc73..8993361e2e62d5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -440,7 +440,7 @@ jobs: with: config_hash: ${{ needs.check_source.outputs.config_hash }} options: ./configure --config-cache --with-thread-sanitizer --with-pydebug - suppressions_path: Tools/tsan/supressions.txt + suppressions_path: Tools/tsan/suppressions.txt tsan_logs_artifact_name: tsan-logs-default build_tsan_free_threading: diff --git a/Doc/c-api/init.rst b/Doc/c-api/init.rst index 8e0cf7bb0fc088..3b0fa5acf87506 100644 --- a/Doc/c-api/init.rst +++ b/Doc/c-api/init.rst @@ -2418,7 +2418,7 @@ Example usage:: In the above example, :c:macro:`Py_SETREF` calls :c:macro:`Py_DECREF`, which can call arbitrary code through an object's deallocation function. The critical -section API avoids potentital deadlocks due to reentrancy and lock ordering +section API avoids potential deadlocks due to reentrancy and lock ordering by allowing the runtime to temporarily suspend the critical section if the code triggered by the finalizer blocks and calls :c:func:`PyEval_SaveThread`. diff --git a/Doc/c-api/long.rst b/Doc/c-api/long.rst index 02ef8aa7846468..6f4a5037018383 100644 --- a/Doc/c-api/long.rst +++ b/Doc/c-api/long.rst @@ -511,7 +511,7 @@ distinguished from a number. Use :c:func:`PyErr_Occurred` to disambiguate. free(bignum); *flags* is either ``-1`` (``Py_ASNATIVEBYTES_DEFAULTS``) to select defaults - that behave most like a C cast, or a combintation of the other flags in + that behave most like a C cast, or a combination of the other flags in the table below. Note that ``-1`` cannot be combined with other flags. diff --git a/Doc/c-api/monitoring.rst b/Doc/c-api/monitoring.rst index 285ddb2889a67f..51d866cfd47469 100644 --- a/Doc/c-api/monitoring.rst +++ b/Doc/c-api/monitoring.rst @@ -147,7 +147,7 @@ would typically correspond to a python function. The ``version`` argument is a pointer to a value which should be allocated by the user together with ``state_array`` and initialized to 0, - and then set only by :c:func:`!PyMonitoring_EnterScope` itelf. It allows this + and then set only by :c:func:`!PyMonitoring_EnterScope` itself. It allows this function to determine whether event states have changed since the previous call, and to return quickly if they have not. diff --git a/Doc/library/concurrent.futures.rst b/Doc/library/concurrent.futures.rst index ce72127127c7a6..141b30194b84eb 100644 --- a/Doc/library/concurrent.futures.rst +++ b/Doc/library/concurrent.futures.rst @@ -206,7 +206,7 @@ ThreadPoolExecutor Example 'http://www.cnn.com/', 'http://europe.wsj.com/', 'http://www.bbc.co.uk/', - 'http://nonexistant-subdomain.python.org/'] + 'http://nonexistent-subdomain.python.org/'] # Retrieve a single page and report the URL and contents def load_url(url, timeout): diff --git a/Doc/library/importlib.metadata.rst b/Doc/library/importlib.metadata.rst index 85d5a2d684d6eb..ddfc5c06d825c0 100644 --- a/Doc/library/importlib.metadata.rst +++ b/Doc/library/importlib.metadata.rst @@ -559,7 +559,7 @@ path. ``DatabaseDistribution``, then, would look something like:: - class DatabaseDistribution(importlib.metadata.Distributon): + class DatabaseDistribution(importlib.metadata.Distribution): def __init__(self, record): self.record = record diff --git a/Doc/using/windows.rst b/Doc/using/windows.rst index 20d872d7639219..daaf8822af1161 100644 --- a/Doc/using/windows.rst +++ b/Doc/using/windows.rst @@ -838,8 +838,8 @@ The short form of the argument (``-3``) only ever selects from core Python releases, and not other distributions. However, the longer form (``-V:3``) will select from any. -The Company is matched on the full string, case-insenitive. The Tag is matched -oneither the full string, or a prefix, provided the next character is a dot or a +The Company is matched on the full string, case-insensitive. The Tag is matched +on either the full string, or a prefix, provided the next character is a dot or a hyphen. This allows ``-V:3.1`` to match ``3.1-32``, but not ``3.10``. Tags are sorted using numerical ordering (``3.10`` is newer than ``3.1``), but are compared using text (``-V:3.01`` does not match ``3.1``). diff --git a/Include/cpython/critical_section.h b/Include/cpython/critical_section.h index 35db3fb6a59ce6..4d48ba13451304 100644 --- a/Include/cpython/critical_section.h +++ b/Include/cpython/critical_section.h @@ -93,7 +93,7 @@ PyCriticalSection2_End(PyCriticalSection2 *c); } #else /* !Py_GIL_DISABLED */ -// NOTE: the contents of this struct are private and may change betweeen +// NOTE: the contents of this struct are private and may change between // Python releases without a deprecation period. struct PyCriticalSection { // Tagged pointer to an outer active critical section (or 0). @@ -105,7 +105,7 @@ struct PyCriticalSection { // A critical section protected by two mutexes. Use // Py_BEGIN_CRITICAL_SECTION2 and Py_END_CRITICAL_SECTION2. -// NOTE: the contents of this struct are private and may change betweeen +// NOTE: the contents of this struct are private and may change between // Python releases without a deprecation period. struct PyCriticalSection2 { PyCriticalSection _cs_base; diff --git a/Include/internal/pycore_code.h b/Include/internal/pycore_code.h index 57e0a14bb9b5bd..ad85463e9d90a8 100644 --- a/Include/internal/pycore_code.h +++ b/Include/internal/pycore_code.h @@ -577,7 +577,7 @@ adaptive_counter_backoff(_Py_BackoffCounter counter) { /* * The following bits are chosen so that the value of - * COMPARSION_BIT(left, right) + * COMPARISON_BIT(left, right) * masked by the values below will be non-zero if the * comparison is true, and zero if it is false */ diff --git a/Include/internal/pycore_critical_section.h b/Include/internal/pycore_critical_section.h index 78cd0d54972660..98d5afc28c79b6 100644 --- a/Include/internal/pycore_critical_section.h +++ b/Include/internal/pycore_critical_section.h @@ -53,13 +53,13 @@ extern "C" { // Asserts that the mutex is locked. The mutex must be held by the // top-most critical section otherwise there's the possibility -// that the mutex would be swalled out in some code paths. +// that the mutex would be stalled out in some code paths. #define _Py_CRITICAL_SECTION_ASSERT_MUTEX_LOCKED(mutex) \ _PyCriticalSection_AssertHeld(mutex) // Asserts that the mutex for the given object is locked. The mutex must // be held by the top-most critical section otherwise there's the -// possibility that the mutex would be swalled out in some code paths. +// possibility that the mutex would be stalled out in some code paths. #ifdef Py_DEBUG # define _Py_CRITICAL_SECTION_ASSERT_OBJECT_LOCKED(op) \ diff --git a/Include/internal/pycore_hamt.h b/Include/internal/pycore_hamt.h index d8742c7cb63578..251ca987992135 100644 --- a/Include/internal/pycore_hamt.h +++ b/Include/internal/pycore_hamt.h @@ -15,7 +15,7 @@ cell in the 7th level of the tree -- so we'd put them in a "collision" node. Which brings the total possible tree depth to 8. Read more about the actual layout of the HAMT tree in `hamt.c`. -This constant is used to define a datastucture for storing iteration state. +This constant is used to define a datastructure for storing iteration state. */ #define _Py_HAMT_MAX_TREE_DEPTH 8 diff --git a/Include/internal/pycore_lock.h b/Include/internal/pycore_lock.h index 57cbce8f126aca..f2c90973126419 100644 --- a/Include/internal/pycore_lock.h +++ b/Include/internal/pycore_lock.h @@ -209,7 +209,7 @@ PyAPI_FUNC(void) _PyRWMutex_Unlock(_PyRWMutex *rwmutex); // 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 separate spin lock. -// The writer can also detect that the undelering data has not changed and abandon the write +// The writer can also detect that the underlying data has not changed and abandon the write // and restore the previous sequence. typedef struct { uint32_t sequence; diff --git a/Include/internal/pycore_object.h b/Include/internal/pycore_object.h index 8832692d03c29e..ec4ca18f76d52a 100644 --- a/Include/internal/pycore_object.h +++ b/Include/internal/pycore_object.h @@ -61,9 +61,9 @@ extern void _Py_ForgetReference(PyObject *); PyAPI_FUNC(int) _PyObject_IsFreed(PyObject *); /* We need to maintain an internal copy of Py{Var}Object_HEAD_INIT to avoid - designated initializer conflicts in C++20. If we use the deinition in + designated initializer conflicts in C++20. If we use the definition in object.h, we will be mixing designated and non-designated initializers in - pycore objects which is forbiddent in C++20. However, if we then use + pycore objects which is forbidden in C++20. However, if we then use designated initializers in object.h then Extensions without designated break. Furthermore, we can't use designated initializers in Extensions since these are not supported pre-C++20. Thus, keeping an internal copy here is the most diff --git a/Include/unicodeobject.h b/Include/unicodeobject.h index 2ce3a008b7129e..2eca4c1def35f9 100644 --- a/Include/unicodeobject.h +++ b/Include/unicodeobject.h @@ -813,7 +813,7 @@ PyAPI_FUNC(PyObject*) PyUnicode_Split( Py_ssize_t maxsplit /* Maxsplit count */ ); -/* Dito, but split at line breaks. +/* Ditto, but split at line breaks. CRLF is considered to be one line break. Line breaks are not included in the resulting list. */ diff --git a/InternalDocs/adaptive.md b/InternalDocs/adaptive.md index 09245730b271fa..6cb560eeb9dc1c 100644 --- a/InternalDocs/adaptive.md +++ b/InternalDocs/adaptive.md @@ -54,7 +54,7 @@ and `Tadaptive` is the mean time to execute the specialized and adaptive forms. `Ti` is the time to execute the `i`th instruction in the family and `Ni` is the number of times that instruction is executed. -`Tmiss` is the time to process a miss, including de-optimzation +`Tmiss` is the time to process a miss, including de-optimization and the time to execute the base instruction. The ideal situation is where misses are rare and the specialized diff --git a/Lib/_pyio.py b/Lib/_pyio.py index 7b6d10c008d3cb..c3e0580ba2d3c0 100644 --- a/Lib/_pyio.py +++ b/Lib/_pyio.py @@ -2381,7 +2381,7 @@ def tell(self): assert skip_bytes <= len(next_input) while skip_bytes > 0: decoder.setstate((b'', dec_flags)) - # Decode up to temptative start point + # Decode up to tentative start point n = len(decoder.decode(next_input[:skip_bytes])) if n <= chars_to_skip: b, d = decoder.getstate() diff --git a/Lib/_pyrepl/unix_console.py b/Lib/_pyrepl/unix_console.py index 2576b938a34c64..1b2b69cb52d42d 100644 --- a/Lib/_pyrepl/unix_console.py +++ b/Lib/_pyrepl/unix_console.py @@ -784,7 +784,7 @@ def __tputs(self, fmt, prog=delayprog): will never do anyone any good.""" # using .get() means that things will blow up # only if the bps is actually needed (which I'm - # betting is pretty unlkely) + # betting is pretty unlikely) bps = ratedict.get(self.__svtermstate.ospeed) while 1: m = prog.search(fmt) diff --git a/Lib/bdb.py b/Lib/bdb.py index 666f9714eb9b7a..2bdf043e47b453 100644 --- a/Lib/bdb.py +++ b/Lib/bdb.py @@ -889,7 +889,7 @@ def effective(file, line, frame): must exist) that is enabled, for which checkfuncname is True, and that has neither a False condition nor a positive ignore count. The flag, meaning that a temporary breakpoint should be deleted, is False only - when the condiion cannot be evaluated (in which case, ignore count is + when the condition cannot be evaluated (in which case, ignore count is ignored). If no such entry exists, then (None, None) is returned. diff --git a/Lib/difflib.py b/Lib/difflib.py index 7f595b6c72e641..85d52fcc4e9018 100644 --- a/Lib/difflib.py +++ b/Lib/difflib.py @@ -927,7 +927,7 @@ def _fancy_replace(self, a, alo, ahi, b, blo, bhi): dump_i, dump_j = alo, blo # smallest indices not yet resolved for j in range(blo, bhi): cruncher.set_seq2(b[j]) - # Search the corresponding i's within WINDOW for rhe highest + # Search the corresponding i's within WINDOW for the highest # ratio greater than `cutoff`. aequiv = alo + (j - blo) arange = range(max(aequiv - WINDOW, dump_i), diff --git a/Lib/email/_header_value_parser.py b/Lib/email/_header_value_parser.py index ec2215a5e5f33c..a42d08f1d4daeb 100644 --- a/Lib/email/_header_value_parser.py +++ b/Lib/email/_header_value_parser.py @@ -1,7 +1,7 @@ """Header value parser implementing various email-related RFC parsing rules. The parsing methods defined in this module implement various email related -parsing rules. Principal among them is RFC 5322, which is the followon +parsing rules. Principal among them is RFC 5322, which is the followup to RFC 2822 and primarily a clarification of the former. It also implements RFC 2047 encoded word decoding. diff --git a/Lib/idlelib/help.html b/Lib/idlelib/help.html index 827d230b54e159..d20a76ca645453 100644 --- a/Lib/idlelib/help.html +++ b/Lib/idlelib/help.html @@ -554,7 +554,7 @@
Arrow keys move the cursor one character or line.
C-c attemps to interrupt statement execution (but may fail).
C-c attempts to interrupt statement execution (but may fail).
C-d closes Shell if typed at a >>>
prompt.
Alt-p and Alt-n (C-p and C-n on macOS)
retrieve to the current prompt the previous or next previously
diff --git a/Lib/idlelib/run.py b/Lib/idlelib/run.py
index 8f98e73258e778..a30db99a619a93 100644
--- a/Lib/idlelib/run.py
+++ b/Lib/idlelib/run.py
@@ -108,11 +108,11 @@ def handle_tk_events(tcl=tcl):
# Thread shared globals: Establish a queue between a subthread (which handles
# the socket) and the main thread (which runs user code), plus global
-# completion, exit and interruptable (the main thread) flags:
+# completion, exit and interruptible (the main thread) flags:
exit_now = False
quitting = False
-interruptable = False
+interruptible = False
def main(del_exitfunc=False):
"""Start the Python execution server in a subprocess
@@ -582,14 +582,14 @@ def __init__(self, rpchandler):
self.locals = {}
def runcode(self, code):
- global interruptable
+ global interruptible
try:
self.user_exc_info = None
- interruptable = True
+ interruptible = True
try:
exec(code, self.locals)
finally:
- interruptable = False
+ interruptible = False
except SystemExit as e:
if e.args: # SystemExit called with an argument.
ob = e.args[0]
@@ -615,7 +615,7 @@ def runcode(self, code):
flush_stdout()
def interrupt_the_server(self):
- if interruptable:
+ if interruptible:
thread.interrupt_main()
def start_the_debugger(self, gui_adap_oid):
diff --git a/Lib/pdb.py b/Lib/pdb.py
index d9aed24bfcd8e7..34066f7b040082 100644
--- a/Lib/pdb.py
+++ b/Lib/pdb.py
@@ -2428,7 +2428,7 @@ def main():
formatter_class=argparse.RawDescriptionHelpFormatter,
allow_abbrev=False)
- # We need to maunally get the script from args, because the first positional
+ # We need to manually get the script from args, because the first positional
# arguments could be either the script we need to debug, or the argument
# to the -m module
parser.add_argument('-c', '--command', action='append', default=[], metavar='command', dest='commands',
diff --git a/Lib/shutil.py b/Lib/shutil.py
index dd3e0e0c5da54b..c71bc24a5eff41 100644
--- a/Lib/shutil.py
+++ b/Lib/shutil.py
@@ -82,7 +82,7 @@ class RegistryError(Exception):
"""Raised when a registry operation with the archiving
and unpacking registries fails"""
-class _GiveupOnFastCopy(Exception):
+class _GiveUpOnFastCopy(Exception):
"""Raised as a signal to fallback on using raw read()/write()
file copy when fast-copy functions fail to do so.
"""
@@ -95,7 +95,7 @@ def _fastcopy_fcopyfile(fsrc, fdst, flags):
infd = fsrc.fileno()
outfd = fdst.fileno()
except Exception as err:
- raise _GiveupOnFastCopy(err) # not a regular file
+ raise _GiveUpOnFastCopy(err) # not a regular file
try:
posix._fcopyfile(infd, outfd, flags)
@@ -103,7 +103,7 @@ def _fastcopy_fcopyfile(fsrc, fdst, flags):
err.filename = fsrc.name
err.filename2 = fdst.name
if err.errno in {errno.EINVAL, errno.ENOTSUP}:
- raise _GiveupOnFastCopy(err)
+ raise _GiveUpOnFastCopy(err)
else:
raise err from None
@@ -126,7 +126,7 @@ def _fastcopy_sendfile(fsrc, fdst):
infd = fsrc.fileno()
outfd = fdst.fileno()
except Exception as err:
- raise _GiveupOnFastCopy(err) # not a regular file
+ raise _GiveUpOnFastCopy(err) # not a regular file
# Hopefully the whole file will be copied in a single call.
# sendfile() is called in a loop 'till EOF is reached (0 return)
@@ -156,14 +156,14 @@ def _fastcopy_sendfile(fsrc, fdst):
# does not support copies between regular files (only
# sockets).
_USE_CP_SENDFILE = False
- raise _GiveupOnFastCopy(err)
+ raise _GiveUpOnFastCopy(err)
if err.errno == errno.ENOSPC: # filesystem is full
raise err from None
# Give up on first call and if no data was copied.
if offset == 0 and os.lseek(outfd, 0, os.SEEK_CUR) == 0:
- raise _GiveupOnFastCopy(err)
+ raise _GiveUpOnFastCopy(err)
raise err
else:
@@ -263,14 +263,14 @@ def copyfile(src, dst, *, follow_symlinks=True):
try:
_fastcopy_fcopyfile(fsrc, fdst, posix._COPYFILE_DATA)
return dst
- except _GiveupOnFastCopy:
+ except _GiveUpOnFastCopy:
pass
# Linux / Android / Solaris
elif _USE_CP_SENDFILE:
try:
_fastcopy_sendfile(fsrc, fdst)
return dst
- except _GiveupOnFastCopy:
+ except _GiveUpOnFastCopy:
pass
# Windows, see:
# https://github.com/python/cpython/pull/7160#discussion_r195405230
diff --git a/Lib/test/decimaltestdata/ddQuantize.decTest b/Lib/test/decimaltestdata/ddQuantize.decTest
index e1c5674d9ac042..636bac40927428 100644
--- a/Lib/test/decimaltestdata/ddQuantize.decTest
+++ b/Lib/test/decimaltestdata/ddQuantize.decTest
@@ -462,7 +462,7 @@ ddqua520 quantize 1.234 1e359 -> 0E+359 Inexact Rounded
ddqua521 quantize 123.456 1e359 -> 0E+359 Inexact Rounded
ddqua522 quantize 1.234 1e359 -> 0E+359 Inexact Rounded
ddqua523 quantize 123.456 1e359 -> 0E+359 Inexact Rounded
--- next four are "won't fit" overflow
+-- next four are "won't fit" overflows
ddqua526 quantize 1.234 1e-299 -> NaN Invalid_operation
ddqua527 quantize 123.456 1e-299 -> NaN Invalid_operation
ddqua528 quantize 1.234 1e-299 -> NaN Invalid_operation
diff --git a/Lib/test/libregrtest/utils.py b/Lib/test/libregrtest/utils.py
index d6be4ad049d14a..32a88ca514d01b 100644
--- a/Lib/test/libregrtest/utils.py
+++ b/Lib/test/libregrtest/utils.py
@@ -37,7 +37,7 @@
# Other resources excluded from --use=all:
#
-# - extralagefile (ex: test_zipfile64): really too slow to be enabled
+# - extralargefile (ex: test_zipfile64): really too slow to be enabled
# "by default"
# - tzdata: while needed to validate fully test_datetime, it makes
# test_datetime too slow (15-20 min on some buildbots) and so is disabled by
diff --git a/Lib/test/support/__init__.py b/Lib/test/support/__init__.py
index d768bead7120c7..4fc51a53c12f9c 100644
--- a/Lib/test/support/__init__.py
+++ b/Lib/test/support/__init__.py
@@ -2203,7 +2203,7 @@ def wait_process(pid, *, exitcode, timeout=None):
pid2, status = os.waitpid(pid, os.WNOHANG)
if pid2 != 0:
break
- # rety: the process is still running
+ # retry: the process is still running
else:
try:
os.kill(pid, signal.SIGKILL)
@@ -2570,7 +2570,7 @@ class CPUStopwatch:
N.B.:
- This *includes* time spent in other threads.
- Some systems only have a coarse resolution; check
- stopwatch.clock_info.rseolution if.
+ stopwatch.clock_info.resolution if.
Usage:
diff --git a/Lib/test/test_argparse.py b/Lib/test/test_argparse.py
index 78692fd3474782..cc7a4b1463b9b7 100644
--- a/Lib/test/test_argparse.py
+++ b/Lib/test/test_argparse.py
@@ -2862,7 +2862,7 @@ def test_single_parent_mutex(self):
parser = ErrorRaisingArgumentParser(parents=[self.ab_mutex_parent])
self._test_mutex_ab(parser.parse_args)
- def test_single_granparent_mutex(self):
+ def test_single_grandparent_mutex(self):
parents = [self.ab_mutex_parent]
parser = ErrorRaisingArgumentParser(add_help=False, parents=parents)
parser = ErrorRaisingArgumentParser(parents=[parser])
diff --git a/Lib/test/test_asyncio/test_locks.py b/Lib/test/test_asyncio/test_locks.py
index c3bff760f7307e..616e631058f1cd 100644
--- a/Lib/test/test_asyncio/test_locks.py
+++ b/Lib/test/test_asyncio/test_locks.py
@@ -784,8 +784,8 @@ async def func():
# originally raised.
self.assertIs(err.exception, raised)
- async def test_cancelled_error_re_aquire(self):
- # Test that a cancelled error, received when re-aquiring lock,
+ async def test_cancelled_error_re_acquire(self):
+ # Test that a cancelled error, received when re-acquiring lock,
# will be re-raised un-modified.
wake = False
raised = None
@@ -846,7 +846,7 @@ async def consumer():
c[0].cancel()
# now wait for the item to be consumed
- # if it doesn't means that our "notify" didn"t take hold.
+ # if it doesn't means that our "notify" didn't take hold.
# because it raced with a cancel()
try:
async with asyncio.timeout(0.01):
@@ -886,7 +886,7 @@ async def consumer():
condition.notify(1)
# now we sleep for a bit. This allows the target task to wake up and
- # settle on re-aquiring the lock
+ # settle on re-acquiring the lock
await asyncio.sleep(0)
# Cancel it while awaiting the lock
@@ -894,7 +894,7 @@ async def consumer():
c[0].cancel()
# now wait for the item to be consumed
- # if it doesn't means that our "notify" didn"t take hold.
+ # if it doesn't means that our "notify" didn't take hold.
# because it raced with a cancel()
try:
async with asyncio.timeout(0.01):
diff --git a/Lib/test/test_capi/test_misc.py b/Lib/test/test_capi/test_misc.py
index 5c6faa1626d380..b1f3cd380d91e7 100644
--- a/Lib/test/test_capi/test_misc.py
+++ b/Lib/test/test_capi/test_misc.py
@@ -2106,7 +2106,7 @@ async def foo(arg): return await arg # Py 3.5
self.assertEqual(ret, 0)
self.assertEqual(pickle.load(f), {'a': '123x', 'b': '123'})
- def test_py_config_isoloated_per_interpreter(self):
+ def test_py_config_isolated_per_interpreter(self):
# A config change in one interpreter must not leak to out to others.
#
# This test could verify ANY config value, it just happens to have been
diff --git a/Lib/test/test_capi/test_opt.py b/Lib/test/test_capi/test_opt.py
index f1ab72180d714d..b8b7328b1c79a5 100644
--- a/Lib/test/test_capi/test_opt.py
+++ b/Lib/test/test_capi/test_opt.py
@@ -1432,7 +1432,7 @@ class Foo:
self.assertIsNotNone(ex)
self.assertEqual(res, 200)
guard_type_version_count = opnames.count("_GUARD_TYPE_VERSION")
- # Note: This will actually be 1 for noe
+ # Note: This will actually be 1 for now
# https://github.com/python/cpython/pull/119365#discussion_r1626220129
self.assertEqual(guard_type_version_count, 2)
diff --git a/Lib/test/test_cmd_line.py b/Lib/test/test_cmd_line.py
index 35725718152c56..cc976c1b663f8f 100644
--- a/Lib/test/test_cmd_line.py
+++ b/Lib/test/test_cmd_line.py
@@ -470,7 +470,7 @@ def test_output_newline(self):
self.assertEqual(b'1\n2\n', out)
self.assertEqual(b'3\n4\n', err)
- def test_unmached_quote(self):
+ def test_unmatched_quote(self):
# Issue #10206: python program starting with unmatched quote
# spewed spaces to stdout
rc, out, err = assert_python_failure('-c', "'")
diff --git a/Lib/test/test_cmd_line_script.py b/Lib/test/test_cmd_line_script.py
index 3a5a8abf81e43d..fefcd44365f552 100644
--- a/Lib/test/test_cmd_line_script.py
+++ b/Lib/test/test_cmd_line_script.py
@@ -503,7 +503,7 @@ def test_dash_m_bad_pyc(self):
self.assertNotIn(b'is a package', err)
self.assertNotIn(b'Traceback', err)
- def test_hint_when_triying_to_import_a_py_file(self):
+ def test_hint_when_trying_to_import_a_py_file(self):
with os_helper.temp_dir() as script_dir, \
os_helper.change_cwd(path=script_dir):
# Create invalid *.pyc as empty file
diff --git a/Lib/test/test_code.py b/Lib/test/test_code.py
index ba77e1c5341db8..6557464913a3fe 100644
--- a/Lib/test/test_code.py
+++ b/Lib/test/test_code.py
@@ -698,7 +698,7 @@ def dedup(lst, prev=object()):
yield item
prev = item
-def lines_from_postions(positions):
+def lines_from_positions(positions):
return dedup(l for (l, _, _, _) in positions)
def misshappen():
@@ -759,7 +759,7 @@ def check_lines(self, func):
co = func.__code__
lines1 = [line for _, _, line in co.co_lines()]
self.assertEqual(lines1, list(dedup(lines1)))
- lines2 = list(lines_from_postions(positions_from_location_table(co)))
+ lines2 = list(lines_from_positions(positions_from_location_table(co)))
for l1, l2 in zip(lines1, lines2):
self.assertEqual(l1, l2)
self.assertEqual(len(lines1), len(lines2))
diff --git a/Lib/test/test_concurrent_futures/test_process_pool.py b/Lib/test/test_concurrent_futures/test_process_pool.py
index 8b1bdaa33d8f5c..1e7735f4376f81 100644
--- a/Lib/test/test_concurrent_futures/test_process_pool.py
+++ b/Lib/test/test_concurrent_futures/test_process_pool.py
@@ -86,7 +86,7 @@ def test_traceback(self):
f1.getvalue())
@hashlib_helper.requires_hashdigest('md5')
- def test_ressources_gced_in_workers(self):
+ def test_resources_gced_in_workers(self):
# Ensure that argument for a job are correctly gc-ed after the job
# is finished
mgr = self.get_context().Manager()
diff --git a/Lib/test/test_context.py b/Lib/test/test_context.py
index b06b9df9f5b0b8..ac3974aafe2b7e 100644
--- a/Lib/test/test_context.py
+++ b/Lib/test/test_context.py
@@ -418,7 +418,7 @@ def __eq__(self, other):
return super().__eq__(other)
-class HaskKeyCrasher:
+class HashKeyCrasher:
def __init__(self, *, error_on_hash=False, error_on_eq=False):
self.error_on_hash = error_on_hash
self.error_on_eq = error_on_eq
@@ -595,14 +595,14 @@ def test_hamt_stress(self):
key = KeyStr(i)
if not (i % CRASH_HASH_EVERY):
- with HaskKeyCrasher(error_on_hash=True):
+ with HashKeyCrasher(error_on_hash=True):
with self.assertRaises(HashingError):
h.set(key, i)
h = h.set(key, i)
if not (i % CRASH_EQ_EVERY):
- with HaskKeyCrasher(error_on_eq=True):
+ with HashKeyCrasher(error_on_eq=True):
with self.assertRaises(EqError):
h.get(KeyStr(i)) # really trigger __eq__
@@ -624,12 +624,12 @@ def test_hamt_stress(self):
key = KeyStr(i)
if not (iter_i % CRASH_HASH_EVERY):
- with HaskKeyCrasher(error_on_hash=True):
+ with HashKeyCrasher(error_on_hash=True):
with self.assertRaises(HashingError):
h.delete(key)
if not (iter_i % CRASH_EQ_EVERY):
- with HaskKeyCrasher(error_on_eq=True):
+ with HashKeyCrasher(error_on_eq=True):
with self.assertRaises(EqError):
h.delete(KeyStr(i))
@@ -1078,11 +1078,11 @@ def test_hamt_in_1(self):
self.assertFalse(B in h)
with self.assertRaises(EqError):
- with HaskKeyCrasher(error_on_eq=True):
+ with HashKeyCrasher(error_on_eq=True):
AA in h
with self.assertRaises(HashingError):
- with HaskKeyCrasher(error_on_hash=True):
+ with HashKeyCrasher(error_on_hash=True):
AA in h
def test_hamt_getitem_1(self):
@@ -1101,11 +1101,11 @@ def test_hamt_getitem_1(self):
h[B]
with self.assertRaises(EqError):
- with HaskKeyCrasher(error_on_eq=True):
+ with HashKeyCrasher(error_on_eq=True):
h[AA]
with self.assertRaises(HashingError):
- with HaskKeyCrasher(error_on_hash=True):
+ with HashKeyCrasher(error_on_hash=True):
h[AA]
diff --git a/Lib/test/test_csv.py b/Lib/test/test_csv.py
index ce5c03659f1979..e266f0927b0627 100644
--- a/Lib/test/test_csv.py
+++ b/Lib/test/test_csv.py
@@ -512,7 +512,7 @@ def test_read_linenum(self):
self.assertRaises(StopIteration, next, r)
self.assertEqual(r.line_num, 3)
- def test_roundtrip_quoteed_newlines(self):
+ def test_roundtrip_quoted_newlines(self):
rows = [
['\na', 'b\nc', 'd\n'],
['\re', 'f\rg', 'h\r'],
diff --git a/Lib/test/test_dataclasses/__init__.py b/Lib/test/test_dataclasses/__init__.py
index 2e6c49e29ce828..9167fd8b0a501e 100644
--- a/Lib/test/test_dataclasses/__init__.py
+++ b/Lib/test/test_dataclasses/__init__.py
@@ -2918,7 +2918,7 @@ class C:
class D(C):
j: int
- def test_inherit_frozen_mutliple_inheritance(self):
+ def test_inherit_frozen_multiple_inheritance(self):
@dataclass
class NotFrozen:
pass
@@ -2960,7 +2960,7 @@ class NotFrozenChild(*bases):
class FrozenChild(*bases):
pass
- def test_inherit_frozen_mutliple_inheritance_regular_mixins(self):
+ def test_inherit_frozen_multiple_inheritance_regular_mixins(self):
@dataclass(frozen=True)
class Frozen:
pass
diff --git a/Lib/test/test_doctest/test_doctest2.txt b/Lib/test/test_doctest/test_doctest2.txt
index 76dab94a9c0470..d9dc859fc341dc 100644
--- a/Lib/test/test_doctest/test_doctest2.txt
+++ b/Lib/test/test_doctest/test_doctest2.txt
@@ -10,5 +10,5 @@ This test also has some (random) encoded (utf-8) unicode text:
ÐÐÐÐÐ
-This doesn't cause a problem in the tect surrounding the examples, but
+This doesn't cause a problem in the test surrounding the examples, but
we include it here (in this test text file) to make sure. :)
diff --git a/Lib/test/test_email/test__header_value_parser.py b/Lib/test/test_email/test__header_value_parser.py
index 95224e19f67ce5..6a5bb421f50477 100644
--- a/Lib/test/test_email/test__header_value_parser.py
+++ b/Lib/test/test_email/test__header_value_parser.py
@@ -1015,7 +1015,7 @@ def test_get_phrase_obsolete(self):
self.assertEqual(len(phrase), 7)
self.assertEqual(phrase[3].comments, ['weird'])
- def test_get_phrase_pharse_must_start_with_word(self):
+ def test_get_phrase_phrase_must_start_with_word(self):
phrase = self._test_get_x(parser.get_phrase,
'(even weirder).name',
'(even weirder).name',
@@ -1422,7 +1422,7 @@ def test_get_addr_spec_normal(self):
self.assertEqual(addr_spec.domain, 'example.com')
self.assertEqual(addr_spec.addr_spec, 'dinsdale@example.com')
- def test_get_addr_spec_with_doamin_literal(self):
+ def test_get_addr_spec_with_domain_literal(self):
addr_spec = self._test_get_x(parser.get_addr_spec,
'dinsdale@[127.0.0.1]',
'dinsdale@[127.0.0.1]',
@@ -1444,7 +1444,7 @@ def test_get_addr_spec_with_cfws(self):
self.assertEqual(addr_spec.domain, 'example.com')
self.assertEqual(addr_spec.addr_spec, 'dinsdale@example.com')
- def test_get_addr_spec_with_qouoted_string_and_cfws(self):
+ def test_get_addr_spec_with_quoted_string_and_cfws(self):
addr_spec = self._test_get_x(parser.get_addr_spec,
'(foo) "roy a bug"(bar)@ (bird) example.com (bog)',
'(foo) "roy a bug"(bar)@ (bird) example.com (bog)',
@@ -2290,7 +2290,7 @@ def test_get_group_one_invalid(self):
self.assertEqual(group.mailboxes[1].local_part, 'x')
self.assertIsNone(group.all_mailboxes[1].display_name)
- def test_get_group_missing_final_semicol(self):
+ def test_get_group_missing_final_semicolon(self):
group = self._test_get_x(parser.get_group,
('Monty Python:"Fred A. Bear"