]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.12] Fix typos (#123775) (#123867)
authorVictor Stinner <vstinner@python.org>
Mon, 9 Sep 2024 13:22:13 +0000 (15:22 +0200)
committerGitHub <noreply@github.com>
Mon, 9 Sep 2024 13:22:13 +0000 (13:22 +0000)
Fix typos (#123775)

(cherry picked from commit 9017b95ff2dcff16bcb0b0a609ed2b0daa845943)

Co-authored-by: algonell <algonell@gmail.com>
29 files changed:
Lib/enum.py
Lib/test/decimaltestdata/ddFMA.decTest
Lib/test/decimaltestdata/ddQuantize.decTest
Lib/test/decimaltestdata/ddRemainder.decTest
Lib/test/decimaltestdata/ddRemainderNear.decTest
Lib/test/decimaltestdata/dqRemainder.decTest
Lib/test/decimaltestdata/dqRemainderNear.decTest
Lib/test/decimaltestdata/exp.decTest
Lib/test/decimaltestdata/remainder.decTest
Lib/test/decimaltestdata/remainderNear.decTest
Lib/test/ieee754.txt
Lib/test/libregrtest/main.py
Lib/test/libregrtest/utils.py
Lib/test/pickletester.py
Lib/test/test_concurrent_futures/test_deadlock.py
Lib/test/test_enum.py
Lib/test/test_fractions.py
Lib/test/test_fstring.py
Lib/test/test_getpath.py
Lib/test/test_math.py
Lib/test/test_property.py
Lib/test/test_socket.py
Lib/test/test_string_literals.py
Lib/test/test_zipfile/test_core.py
Lib/turtledemo/sorting_animate.py
Misc/coverity_model.c
Tools/c-analyzer/c_parser/preprocessor/gcc.py
configure
configure.ac

index af5613838d12a914519be674c92da82e1b468c61..d9859b3c0a9f98a91ebf8d5a3034c7236afaeb7f 100644 (file)
@@ -487,7 +487,7 @@ class _EnumDict(dict):
                         # accepts iterable as multiple arguments?
                         value = t(auto_valued)
                     except TypeError:
-                        # then pass them in singlely
+                        # then pass them in singly
                         value = t(*auto_valued)
             self._member_names[key] = None
             if non_auto_store:
index 9094fc015bde18724097c3c476881ffa5f0bdd05..7f2e52303747f895b9815f77a2acc7e1d55ac183 100644 (file)
@@ -1663,7 +1663,7 @@ ddfma375087 fma  1  12345678 1E-33                   -> 12345678.00000001 Inexac
 ddfma375088 fma  1  12345678 1E-34                   -> 12345678.00000001 Inexact Rounded\r
 ddfma375089 fma  1  12345678 1E-35                   -> 12345678.00000001 Inexact Rounded\r
 \r
--- desctructive subtraction (from remainder tests)\r
+-- destructive subtraction (from remainder tests)\r
 \r
 -- +++ some of these will be off-by-one remainder vs remainderNear\r
 \r
index 91776201694dd601f8d845ca7e8a3179bd77953e..e1c5674d9ac042ce95b054365dc355e005cd6d3c 100644 (file)
@@ -462,7 +462,7 @@ ddqua520 quantize   1.234    1e359 -> 0E+359 Inexact Rounded
 ddqua521 quantize 123.456    1e359 -> 0E+359 Inexact Rounded\r
 ddqua522 quantize   1.234    1e359 -> 0E+359 Inexact Rounded\r
 ddqua523 quantize 123.456    1e359 -> 0E+359 Inexact Rounded\r
--- next four are "won't fit" overfl\r
+-- next four are "won't fit" overflow\r
 ddqua526 quantize   1.234   1e-299 -> NaN Invalid_operation\r
 ddqua527 quantize 123.456   1e-299 -> NaN Invalid_operation\r
 ddqua528 quantize   1.234   1e-299 -> NaN Invalid_operation\r
index 5bd1e32d01ef03456aa6b7219c31b03118e0ccd5..b1866d39a2868cedc9d0c95fa52c87766ae7ce0c 100644 (file)
@@ -422,7 +422,7 @@ ddrem757 remainder  1    sNaN   ->  NaN  Invalid_operation
 ddrem758 remainder  1000 sNaN   ->  NaN  Invalid_operation\r
 ddrem759 remainder  Inf -sNaN   -> -NaN  Invalid_operation\r
 \r
--- propaging NaNs\r
+-- propagating NaNs\r
 ddrem760 remainder  NaN1   NaN7   ->  NaN1\r
 ddrem761 remainder sNaN2   NaN8   ->  NaN2 Invalid_operation\r
 ddrem762 remainder  NaN3  sNaN9   ->  NaN9 Invalid_operation\r
index 6ba64ebafe9a188f43cf1a4a1135323a75b445f0..bbe82ea3747d16f5e069e6e8cbfc934861f2c688 100644 (file)
@@ -450,7 +450,7 @@ ddrmn757 remaindernear  1    sNaN   ->  NaN  Invalid_operation
 ddrmn758 remaindernear  1000 sNaN   ->  NaN  Invalid_operation\r
 ddrmn759 remaindernear  Inf -sNaN   -> -NaN  Invalid_operation\r
 \r
--- propaging NaNs\r
+-- propagating NaNs\r
 ddrmn760 remaindernear  NaN1   NaN7   ->  NaN1\r
 ddrmn761 remaindernear sNaN2   NaN8   ->  NaN2 Invalid_operation\r
 ddrmn762 remaindernear  NaN3  sNaN9   ->  NaN9 Invalid_operation\r
index bae8eae5269d43c90577803f72edaceb5856ada8..e0aaca3747e229af847f682eb51f1f9041ab3df2 100644 (file)
@@ -418,7 +418,7 @@ dqrem757 remainder  1    sNaN   ->  NaN  Invalid_operation
 dqrem758 remainder  1000 sNaN   ->  NaN  Invalid_operation\r
 dqrem759 remainder  Inf -sNaN   -> -NaN  Invalid_operation\r
 \r
--- propaging NaNs\r
+-- propagating NaNs\r
 dqrem760 remainder  NaN1   NaN7   ->  NaN1\r
 dqrem761 remainder sNaN2   NaN8   ->  NaN2 Invalid_operation\r
 dqrem762 remainder  NaN3  sNaN9   ->  NaN9 Invalid_operation\r
index b850626fe4e04d6699bd77a42f5efcf9f9106c39..2c5c3f5074ea23ecfe774957fc103e0a87404e43 100644 (file)
@@ -450,7 +450,7 @@ dqrmn757 remaindernear  1    sNaN   ->  NaN  Invalid_operation
 dqrmn758 remaindernear  1000 sNaN   ->  NaN  Invalid_operation\r
 dqrmn759 remaindernear  Inf -sNaN   -> -NaN  Invalid_operation\r
 \r
--- propaging NaNs\r
+-- propagating NaNs\r
 dqrmn760 remaindernear  NaN1   NaN7   ->  NaN1\r
 dqrmn761 remaindernear sNaN2   NaN8   ->  NaN2 Invalid_operation\r
 dqrmn762 remaindernear  NaN3  sNaN9   ->  NaN9 Invalid_operation\r
index 6a7af23b6255308fe320da03c53c841dbe978a83..e01d7a8f92db1fd0bff1289e24ac4053d3ec2e49 100644 (file)
@@ -28,7 +28,7 @@ rounding:    half_even
 maxExponent: 384\r
 minexponent: -383\r
 \r
--- basics (examples in specificiation, etc.)\r
+-- basics (examples in specification, etc.)\r
 expx001 exp  -Infinity     -> 0\r
 expx002 exp  -10           -> 0.0000453999298 Inexact Rounded\r
 expx003 exp  -1            -> 0.367879441 Inexact Rounded\r
index 7a1061b1e6f0f83b4b623b02d832ca57eb50d849..4f59b332877afe4a6785b98418baddabf0c4c4e0 100644 (file)
@@ -435,7 +435,7 @@ remx757 remainder  1    sNaN   ->  NaN  Invalid_operation
 remx758 remainder  1000 sNaN   ->  NaN  Invalid_operation
 remx759 remainder  Inf -sNaN   -> -NaN  Invalid_operation
 
--- propaging NaNs
+-- propagating NaNs
 remx760 remainder  NaN1   NaN7   ->  NaN1
 remx761 remainder sNaN2   NaN8   ->  NaN2 Invalid_operation
 remx762 remainder  NaN3  sNaN9   ->  NaN9 Invalid_operation
index b768b9e0cf637037c52f251edc5e147b80794d7a..000b1424d8ab4812eb5f1387f44d108b7f8c842b 100644 (file)
@@ -498,7 +498,7 @@ rmnx758 remaindernear  1000 sNaN   ->  NaN  Invalid_operation
 rmnx759 remaindernear  Inf  sNaN   ->  NaN  Invalid_operation
 rmnx760 remaindernear  NaN  sNaN   ->  NaN  Invalid_operation
 
--- propaging NaNs
+-- propagating NaNs
 rmnx761 remaindernear  NaN1   NaN7   ->  NaN1
 rmnx762 remaindernear sNaN2   NaN8   ->  NaN2 Invalid_operation
 rmnx763 remaindernear  NaN3 -sNaN9   -> -NaN9 Invalid_operation
index a8b8a0a2148f00d2bfb1d047822207de93b34904..3e986cdb1028072ad6ce1eec5179ac2357856c57 100644 (file)
@@ -51,7 +51,7 @@ nan
 >>> INF / INF
 nan
 
-However unambigous operations with inf return inf:
+However unambiguous operations with inf return inf:
 >>> INF * INF
 inf
 >>> 1.5 * INF
index e41646d2d1277f97cf08124a2f1fae6c1f089a1c..04404cbcd524e162efe540a9d339d20e0b095f59 100644 (file)
@@ -508,7 +508,7 @@ class Regrtest:
         setup_process()
 
         if (runtests.hunt_refleak is not None) and (not self.num_workers):
-            # gh-109739: WindowsLoadTracker thread interfers with refleak check
+            # gh-109739: WindowsLoadTracker thread interferes with refleak check
             use_load_tracker = False
         else:
             # WindowsLoadTracker is only needed on Windows
index a4fd1ee7a85fee452e332866d2b77c36a226cf6b..dabed3c3c0bb36ba631471b1621cc1346be5f2fe 100644 (file)
@@ -733,7 +733,7 @@ ILLEGAL_XML_CHARS_RE = re.compile(
     # Special Unicode characters
     '\uFFFE'
     '\uFFFF'
-    # Match multiple sequential invalid characters for better effiency
+    # Match multiple sequential invalid characters for better efficiency
     ']+')
 
 def _sanitize_xml_replace(regs):
index 4a5976afa75118a9fca083167195be9b5d3da276..beab8e93fff29dca841bd615832a4bc96d1d15e8 100644 (file)
@@ -2065,7 +2065,7 @@ class AbstractPicklingErrorTests:
     @support.cpython_only
     def test_bad_ext_code(self):
         # This should never happen in normal circumstances, because the type
-        # and the value of the extesion code is checked in copyreg.add_extension().
+        # and the value of the extension code is checked in copyreg.add_extension().
         key = (__name__, 'MyList')
         def check(code, exc):
             assert key not in copyreg._extension_registry
index 1db4cd009926b9bc7a300c24b1d31f0f0b891de8..e8cd8f670499d2b5c21bac9f5f36286c5ee9cdfd 100644 (file)
@@ -145,7 +145,7 @@ class ExecutorDeadlockTest:
         self._check_crash(BrokenProcessPool, id, ExitAtUnpickle())
 
     def test_error_at_task_unpickle(self):
-        # gh-109832: Restore stderr overriden by _raise_error_ignore_stderr()
+        # gh-109832: Restore stderr overridden by _raise_error_ignore_stderr()
         self.addCleanup(setattr, sys, 'stderr', sys.stderr)
 
         # Check problem occurring while unpickling a task on workers
@@ -183,7 +183,7 @@ class ExecutorDeadlockTest:
         self._check_crash(PicklingError, _return_instance, ErrorAtPickle)
 
     def test_error_during_result_unpickle_in_result_handler(self):
-        # gh-109832: Restore stderr overriden by _raise_error_ignore_stderr()
+        # gh-109832: Restore stderr overridden by _raise_error_ignore_stderr()
         self.addCleanup(setattr, sys, 'stderr', sys.stderr)
 
         # Check problem occurring while unpickling a task in
index 7e3952251c7898e85b2abb60a75c8bd8b0565a3e..aff5b7f68f01bcdaa4c4812301b2e0c2b5661342 100644 (file)
@@ -5157,7 +5157,7 @@ class TestConvert(unittest.TestCase):
                 filter=lambda x: x.startswith('CONVERT_TEST_'))
         # We don't want the reverse lookup value to vary when there are
         # multiple possible names for a given value.  It should always
-        # report the first lexigraphical name in that case.
+        # report the first lexicographical name in that case.
         self.assertEqual(test_type(5).name, 'CONVERT_TEST_NAME_A')
 
     def test_convert_int(self):
index 53200eb7c9c0114cfb891a98a65f8b9bd46a0fa3..f4e763fedbeab0369b63d4d154bf0b810c5a4751 100644 (file)
@@ -97,7 +97,7 @@ def typed_approx_eq(a, b):
 
 class Symbolic:
     """Simple non-numeric class for testing mixed arithmetic.
-    It is not Integral, Rational, Real or Complex, and cannot be conveted
+    It is not Integral, Rational, Real or Complex, and cannot be converted
     to int, float or complex. but it supports some arithmetic operations.
     """
     def __init__(self, value):
index 7fc3702382813eb3b5dcd653a5007743ae6775ca..da1ab4ef5853e6bf30f34b23581fa70f266ee722 100644 (file)
@@ -732,7 +732,7 @@ x = (
         self.assertEqual(
             f"""
 {
-40 # fourty
+40 # forty
 +  # plus
 2  # two
 }""",
@@ -741,7 +741,7 @@ x = (
         self.assertEqual(
             f"""
 {
-40 # fourty
+40 # forty
 +  # plus
 2  # two
 }""",
index b9cbe1d92c436f67adc3a211c095f085dbd4e902..3b613a569b981a5a155f2937dde1de9769d41c26 100644 (file)
@@ -557,7 +557,7 @@ class MockGetPathTests(unittest.TestCase):
         ns.add_known_dir("/Library/Frameworks/Python.framework/Versions/9.8/lib/python9.8/lib-dynload")
         ns.add_known_file("/Library/Frameworks/Python.framework/Versions/9.8/lib/python9.8/os.py")
 
-        # This is definitely not the stdlib (see discusion in bpo-46890)
+        # This is definitely not the stdlib (see discussion in bpo-46890)
         #ns.add_known_file("/Library/Frameworks/lib/python98.zip")
 
         expected = dict(
@@ -605,7 +605,7 @@ class MockGetPathTests(unittest.TestCase):
         ns.add_known_dir("/Library/Frameworks/DebugPython.framework/Versions/9.8/lib/python9.8/lib-dynload")
         ns.add_known_xfile("/Library/Frameworks/DebugPython.framework/Versions/9.8/lib/python9.8/os.py")
 
-        # This is definitely not the stdlib (see discusion in bpo-46890)
+        # This is definitely not the stdlib (see discussion in bpo-46890)
         #ns.add_known_xfile("/Library/lib/python98.zip")
         expected = dict(
             executable="/Library/Frameworks/DebugPython.framework/Versions/9.8/bin/python9.8",
index 0b0155807679c3eabe56f80e040140ba2e5d863f..ef1f54f1fccbfe629e884102b554175614691f35 100644 (file)
@@ -1397,7 +1397,7 @@ class MathTests(unittest.TestCase):
                 return f'Flt({int(self)})'
 
         def baseline_sumprod(p, q):
-            """This defines the target behavior including expections and special values.
+            """This defines the target behavior including exceptions and special values.
             However, it is subject to rounding errors, so float inputs should be exactly
             representable with only a few bits.
             """
index 157a4835379bda11cb3f88009f92ead2100c9621..4d632cd87ab219bbf4a9e400b37a00d590a6df6e 100644 (file)
@@ -406,7 +406,7 @@ class PropertySubclassTests(unittest.TestCase):
         self.assertEqual(p2.__doc__, "doc-A")
 
         # Case-3: with no user-provided doc new getter doc
-        #         takes precendence
+        #         takes precedence
         p = property(getter2, None, None, None)
 
         p2 = p.getter(getter3)
index 545564094e12d8da80e15ef5700190cc6f28c3d2..acfa1cd503b86b46b11df22e5ee5eb4c51e9fedb 100644 (file)
@@ -1631,7 +1631,7 @@ class GeneralModuleTests(unittest.TestCase):
         try:
             socket.getaddrinfo(None, ULONG_MAX + 1, type=socket.SOCK_STREAM)
         except OverflowError:
-            # Platforms differ as to what values consitute a getaddrinfo() error
+            # Platforms differ as to what values constitute a getaddrinfo() error
             # return. Some fail for LONG_MAX+1, others ULONG_MAX+1, and Windows
             # silently accepts such huge "port" aka "service" numeric values.
             self.fail("Either no error or socket.gaierror expected.")
index 371e8193b3544d3e4a46030ae319a5f7db1eb744..c7c6f684cd33f0777abd83c1d56e3cc2b5bc6a33 100644 (file)
@@ -131,7 +131,7 @@ class TestLiterals(unittest.TestCase):
         self.assertEqual(exc.lineno, 1)
         self.assertEqual(exc.offset, 1)
 
-        # Check that the warning is raised ony once if there are syntax errors
+        # Check that the warning is raised only once if there are syntax errors
 
         with warnings.catch_warnings(record=True) as w:
             warnings.simplefilter('always', category=SyntaxWarning)
index 5b32f80d80bb7824af58d0829d21547407af6b38..86efccd26768a101f9b415c68fee9c1149071e4f 100644 (file)
@@ -1117,7 +1117,7 @@ class StoredTestZip64InSmallFiles(AbstractTestZip64InSmallFiles,
         # Because this is hard to verify by parsing the data as a zip, the raw
         # bytes are checked to ensure that they line up with the zip spec.
         # The spec for this can be found at: https://pkware.cachefly.net/webdocs/casestudies/APPNOTE.TXT
-        # The relevent sections for this test are:
+        # The relevant sections for this test are:
         #  - 4.3.7 for local file header
         #  - 4.5.3 for zip64 extra field
 
@@ -1188,7 +1188,7 @@ class StoredTestZip64InSmallFiles(AbstractTestZip64InSmallFiles,
         # in as a zip, this test looks at the raw bytes created to ensure that
         # the correct data has been generated.
         # The spec for this can be found at: https://pkware.cachefly.net/webdocs/casestudies/APPNOTE.TXT
-        # The relevent sections for this test are:
+        # The relevant sections for this test are:
         #  - 4.3.7 for local file header
         #  - 4.3.9 for the data descriptor
         #  - 4.5.3 for zip64 extra field
index d25a0ab6cebdc09e79a7a7974345852cd23a469c..1c6aae80b845880a8dd6a636138283dddc3ce1cc 100755 (executable)
@@ -7,7 +7,7 @@ A minimal sorting algorithm animation:
 Sorts a shelf of 10 blocks using insertion
 sort, selection sort and quicksort.
 
-Shelfs are implemented using builtin lists.
+Shelves are implemented using builtin lists.
 
 Blocks are turtles with shape "square", but
 stretched to rectangles by shapesize()
index 8960362a6d74a05d98aaa5dea4b2c817b67ea2c0..90c72c7baa3f9ed6c88f29da9629e03e383993d9 100644 (file)
@@ -74,7 +74,7 @@ PyObject *PyLong_FromSsize_t(Py_ssize_t ival)
 
 /* tainted sinks
  *
- * Coverity considers argv, environ, read() data etc as tained.
+ * Coverity considers argv, environ, read() data etc as tainted.
  */
 
 PyObject *PyErr_SetFromErrnoWithFilename(PyObject *exc, const char *filename)
index 147615707a3cb83bedce643499d158174a4b7842..1108bdefd00e6df9ded0f6a46c196a8b0900044f 100644 (file)
@@ -125,7 +125,7 @@ def _iter_top_include_lines(lines, topfile, cwd,
                             raw):
     partial = 0  # depth
     files = [topfile]
-    # We start at 1 in case there are source lines (including blank onces)
+    # We start at 1 in case there are source lines (including blank ones)
     # before the first marker line.  Also, we already verified in
     # _parse_marker_line() that the preprocessor reported lno as 1.
     lno = 1
index 4dfaeecfc0b2693f61f491a1cfa56913470d8996..173674073ca51ed329784924456627353ff5c785 100755 (executable)
--- a/configure
+++ b/configure
@@ -23578,7 +23578,7 @@ else
   # While Python doesn't currently have full support for these platforms
   # (see e.g., issue 1762561), we can at least make sure that float <-> string
   # conversions work.
-  # FLOAT_WORDS_BIGENDIAN doesnt actually detect this case, but if it's not big
+  # FLOAT_WORDS_BIGENDIAN doesn't actually detect this case, but if it's not big
   # or little, then it must be this?
 
 printf "%s\n" "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
index 0d6df8e24e4233a792512aeec09065ea840b5893..f22e71f46fea5e7f4c4a57ec9f1a1eb144b3f57e 100644 (file)
@@ -1599,7 +1599,7 @@ then
       AS_VAR_IF([host_cpu], [wasm64], [AS_VAR_APPEND([HOSTRUNNER], [" --experimental-wasm-memory64"])])
     ],
     dnl TODO: support other WASI runtimes
-    dnl wasmtime starts the proces with "/" as CWD. For OOT builds add the
+    dnl wasmtime starts the process with "/" as CWD. For OOT builds add the
     dnl directory containing _sysconfigdata to PYTHONPATH.
     [WASI/*], [HOSTRUNNER='wasmtime run --wasm max-wasm-stack=8388608 --wasi preview2 --env PYTHONPATH=/$(shell realpath --relative-to $(abs_srcdir) $(abs_builddir))/$(shell cat pybuilddir.txt):/Lib --dir $(srcdir)::/'],
     [HOSTRUNNER='']
@@ -3402,7 +3402,7 @@ then
                LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
        WASI*)
                AS_VAR_IF([enable_wasm_dynamic_linking], [yes], [
-                       dnl not iplemented yet
+                       dnl not implemented yet
                ]);;
        CYGWIN*)
                LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
@@ -3572,7 +3572,7 @@ esac
 AC_MSG_RESULT([$SHLIBS])
 
 dnl perf trampoline is Linux specific and requires an arch-specific
-dnl trampoline in asssembly.
+dnl trampoline in assembly.
 AC_MSG_CHECKING([perf trampoline])
 AS_CASE([$PLATFORM_TRIPLET],
   [x86_64-linux-gnu], [perf_trampoline=yes],
@@ -5690,7 +5690,7 @@ else
   # While Python doesn't currently have full support for these platforms
   # (see e.g., issue 1762561), we can at least make sure that float <-> string
   # conversions work.
-  # FLOAT_WORDS_BIGENDIAN doesnt actually detect this case, but if it's not big
+  # FLOAT_WORDS_BIGENDIAN doesn't actually detect this case, but if it's not big
   # or little, then it must be this?
   AC_DEFINE([DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754], [1],
   [Define if C doubles are 64-bit IEEE 754 binary format, stored