Skip to content

Commit 8b16ec6

Browse files
vstinneralgonell
andauthored
[3.12] Fix typos (#123775) (#123867)
Fix typos (#123775) (cherry picked from commit 9017b95) Co-authored-by: algonell <[email protected]>
1 parent 917f2c8 commit 8b16ec6

29 files changed

+36
-36
lines changed

Lib/enum.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,7 @@ def __setitem__(self, key, value):
487487
# accepts iterable as multiple arguments?
488488
value = t(auto_valued)
489489
except TypeError:
490-
# then pass them in singlely
490+
# then pass them in singly
491491
value = t(*auto_valued)
492492
self._member_names[key] = None
493493
if non_auto_store:

Lib/test/decimaltestdata/ddFMA.decTest

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1663,7 +1663,7 @@ ddfma375087 fma 1 12345678 1E-33 -> 12345678.00000001 Inexac
16631663
ddfma375088 fma 1 12345678 1E-34 -> 12345678.00000001 Inexact Rounded
16641664
ddfma375089 fma 1 12345678 1E-35 -> 12345678.00000001 Inexact Rounded
16651665

1666-
-- desctructive subtraction (from remainder tests)
1666+
-- destructive subtraction (from remainder tests)
16671667

16681668
-- +++ some of these will be off-by-one remainder vs remainderNear
16691669

Lib/test/decimaltestdata/ddQuantize.decTest

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,7 @@ ddqua520 quantize 1.234 1e359 -> 0E+359 Inexact Rounded
462462
ddqua521 quantize 123.456 1e359 -> 0E+359 Inexact Rounded
463463
ddqua522 quantize 1.234 1e359 -> 0E+359 Inexact Rounded
464464
ddqua523 quantize 123.456 1e359 -> 0E+359 Inexact Rounded
465-
-- next four are "won't fit" overfl
465+
-- next four are "won't fit" overflow
466466
ddqua526 quantize 1.234 1e-299 -> NaN Invalid_operation
467467
ddqua527 quantize 123.456 1e-299 -> NaN Invalid_operation
468468
ddqua528 quantize 1.234 1e-299 -> NaN Invalid_operation

Lib/test/decimaltestdata/ddRemainder.decTest

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,7 @@ ddrem757 remainder 1 sNaN -> NaN Invalid_operation
422422
ddrem758 remainder 1000 sNaN -> NaN Invalid_operation
423423
ddrem759 remainder Inf -sNaN -> -NaN Invalid_operation
424424

425-
-- propaging NaNs
425+
-- propagating NaNs
426426
ddrem760 remainder NaN1 NaN7 -> NaN1
427427
ddrem761 remainder sNaN2 NaN8 -> NaN2 Invalid_operation
428428
ddrem762 remainder NaN3 sNaN9 -> NaN9 Invalid_operation

Lib/test/decimaltestdata/ddRemainderNear.decTest

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,7 @@ ddrmn757 remaindernear 1 sNaN -> NaN Invalid_operation
450450
ddrmn758 remaindernear 1000 sNaN -> NaN Invalid_operation
451451
ddrmn759 remaindernear Inf -sNaN -> -NaN Invalid_operation
452452

453-
-- propaging NaNs
453+
-- propagating NaNs
454454
ddrmn760 remaindernear NaN1 NaN7 -> NaN1
455455
ddrmn761 remaindernear sNaN2 NaN8 -> NaN2 Invalid_operation
456456
ddrmn762 remaindernear NaN3 sNaN9 -> NaN9 Invalid_operation

Lib/test/decimaltestdata/dqRemainder.decTest

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,7 @@ dqrem757 remainder 1 sNaN -> NaN Invalid_operation
418418
dqrem758 remainder 1000 sNaN -> NaN Invalid_operation
419419
dqrem759 remainder Inf -sNaN -> -NaN Invalid_operation
420420

421-
-- propaging NaNs
421+
-- propagating NaNs
422422
dqrem760 remainder NaN1 NaN7 -> NaN1
423423
dqrem761 remainder sNaN2 NaN8 -> NaN2 Invalid_operation
424424
dqrem762 remainder NaN3 sNaN9 -> NaN9 Invalid_operation

Lib/test/decimaltestdata/dqRemainderNear.decTest

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,7 @@ dqrmn757 remaindernear 1 sNaN -> NaN Invalid_operation
450450
dqrmn758 remaindernear 1000 sNaN -> NaN Invalid_operation
451451
dqrmn759 remaindernear Inf -sNaN -> -NaN Invalid_operation
452452

453-
-- propaging NaNs
453+
-- propagating NaNs
454454
dqrmn760 remaindernear NaN1 NaN7 -> NaN1
455455
dqrmn761 remaindernear sNaN2 NaN8 -> NaN2 Invalid_operation
456456
dqrmn762 remaindernear NaN3 sNaN9 -> NaN9 Invalid_operation

Lib/test/decimaltestdata/exp.decTest

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ rounding: half_even
2828
maxExponent: 384
2929
minexponent: -383
3030

31-
-- basics (examples in specificiation, etc.)
31+
-- basics (examples in specification, etc.)
3232
expx001 exp -Infinity -> 0
3333
expx002 exp -10 -> 0.0000453999298 Inexact Rounded
3434
expx003 exp -1 -> 0.367879441 Inexact Rounded

Lib/test/decimaltestdata/remainder.decTest

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,7 @@ remx757 remainder 1 sNaN -> NaN Invalid_operation
435435
remx758 remainder 1000 sNaN -> NaN Invalid_operation
436436
remx759 remainder Inf -sNaN -> -NaN Invalid_operation
437437

438-
-- propaging NaNs
438+
-- propagating NaNs
439439
remx760 remainder NaN1 NaN7 -> NaN1
440440
remx761 remainder sNaN2 NaN8 -> NaN2 Invalid_operation
441441
remx762 remainder NaN3 sNaN9 -> NaN9 Invalid_operation

Lib/test/decimaltestdata/remainderNear.decTest

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -498,7 +498,7 @@ rmnx758 remaindernear 1000 sNaN -> NaN Invalid_operation
498498
rmnx759 remaindernear Inf sNaN -> NaN Invalid_operation
499499
rmnx760 remaindernear NaN sNaN -> NaN Invalid_operation
500500

501-
-- propaging NaNs
501+
-- propagating NaNs
502502
rmnx761 remaindernear NaN1 NaN7 -> NaN1
503503
rmnx762 remaindernear sNaN2 NaN8 -> NaN2 Invalid_operation
504504
rmnx763 remaindernear NaN3 -sNaN9 -> -NaN9 Invalid_operation

Lib/test/ieee754.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ nan
5151
>>> INF / INF
5252
nan
5353

54-
However unambigous operations with inf return inf:
54+
However unambiguous operations with inf return inf:
5555
>>> INF * INF
5656
inf
5757
>>> 1.5 * INF

Lib/test/libregrtest/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -508,7 +508,7 @@ def _run_tests(self, selected: TestTuple, tests: TestList | None) -> int:
508508
setup_process()
509509

510510
if (runtests.hunt_refleak is not None) and (not self.num_workers):
511-
# gh-109739: WindowsLoadTracker thread interfers with refleak check
511+
# gh-109739: WindowsLoadTracker thread interferes with refleak check
512512
use_load_tracker = False
513513
else:
514514
# WindowsLoadTracker is only needed on Windows

Lib/test/libregrtest/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -733,7 +733,7 @@ def get_signal_name(exitcode):
733733
# Special Unicode characters
734734
'\uFFFE'
735735
'\uFFFF'
736-
# Match multiple sequential invalid characters for better effiency
736+
# Match multiple sequential invalid characters for better efficiency
737737
']+')
738738

739739
def _sanitize_xml_replace(regs):

Lib/test/pickletester.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2065,7 +2065,7 @@ def persistent_id(self, obj):
20652065
@support.cpython_only
20662066
def test_bad_ext_code(self):
20672067
# This should never happen in normal circumstances, because the type
2068-
# and the value of the extesion code is checked in copyreg.add_extension().
2068+
# and the value of the extension code is checked in copyreg.add_extension().
20692069
key = (__name__, 'MyList')
20702070
def check(code, exc):
20712071
assert key not in copyreg._extension_registry

Lib/test/test_concurrent_futures/test_deadlock.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ def test_exit_at_task_unpickle(self):
145145
self._check_crash(BrokenProcessPool, id, ExitAtUnpickle())
146146

147147
def test_error_at_task_unpickle(self):
148-
# gh-109832: Restore stderr overriden by _raise_error_ignore_stderr()
148+
# gh-109832: Restore stderr overridden by _raise_error_ignore_stderr()
149149
self.addCleanup(setattr, sys, 'stderr', sys.stderr)
150150

151151
# Check problem occurring while unpickling a task on workers
@@ -183,7 +183,7 @@ def test_error_during_result_pickle_on_worker(self):
183183
self._check_crash(PicklingError, _return_instance, ErrorAtPickle)
184184

185185
def test_error_during_result_unpickle_in_result_handler(self):
186-
# gh-109832: Restore stderr overriden by _raise_error_ignore_stderr()
186+
# gh-109832: Restore stderr overridden by _raise_error_ignore_stderr()
187187
self.addCleanup(setattr, sys, 'stderr', sys.stderr)
188188

189189
# Check problem occurring while unpickling a task in

Lib/test/test_enum.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5157,7 +5157,7 @@ def test_convert_value_lookup_priority(self):
51575157
filter=lambda x: x.startswith('CONVERT_TEST_'))
51585158
# We don't want the reverse lookup value to vary when there are
51595159
# multiple possible names for a given value. It should always
5160-
# report the first lexigraphical name in that case.
5160+
# report the first lexicographical name in that case.
51615161
self.assertEqual(test_type(5).name, 'CONVERT_TEST_NAME_A')
51625162

51635163
def test_convert_int(self):

Lib/test/test_fractions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ def typed_approx_eq(a, b):
9797

9898
class Symbolic:
9999
"""Simple non-numeric class for testing mixed arithmetic.
100-
It is not Integral, Rational, Real or Complex, and cannot be conveted
100+
It is not Integral, Rational, Real or Complex, and cannot be converted
101101
to int, float or complex. but it supports some arithmetic operations.
102102
"""
103103
def __init__(self, value):

Lib/test/test_fstring.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -732,7 +732,7 @@ def test_comments(self):
732732
self.assertEqual(
733733
f"""
734734
{
735-
40 # fourty
735+
40 # forty
736736
+ # plus
737737
2 # two
738738
}""",
@@ -741,7 +741,7 @@ def test_comments(self):
741741
self.assertEqual(
742742
f"""
743743
{
744-
40 # fourty
744+
40 # forty
745745
+ # plus
746746
2 # two
747747
}""",

Lib/test/test_getpath.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -557,7 +557,7 @@ def test_framework_macos(self):
557557
ns.add_known_dir("/Library/Frameworks/Python.framework/Versions/9.8/lib/python9.8/lib-dynload")
558558
ns.add_known_file("/Library/Frameworks/Python.framework/Versions/9.8/lib/python9.8/os.py")
559559

560-
# This is definitely not the stdlib (see discusion in bpo-46890)
560+
# This is definitely not the stdlib (see discussion in bpo-46890)
561561
#ns.add_known_file("/Library/Frameworks/lib/python98.zip")
562562

563563
expected = dict(
@@ -605,7 +605,7 @@ def test_alt_framework_macos(self):
605605
ns.add_known_dir("/Library/Frameworks/DebugPython.framework/Versions/9.8/lib/python9.8/lib-dynload")
606606
ns.add_known_xfile("/Library/Frameworks/DebugPython.framework/Versions/9.8/lib/python9.8/os.py")
607607

608-
# This is definitely not the stdlib (see discusion in bpo-46890)
608+
# This is definitely not the stdlib (see discussion in bpo-46890)
609609
#ns.add_known_xfile("/Library/lib/python98.zip")
610610
expected = dict(
611611
executable="/Library/Frameworks/DebugPython.framework/Versions/9.8/bin/python9.8",

Lib/test/test_math.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1397,7 +1397,7 @@ def __repr__(self):
13971397
return f'Flt({int(self)})'
13981398

13991399
def baseline_sumprod(p, q):
1400-
"""This defines the target behavior including expections and special values.
1400+
"""This defines the target behavior including exceptions and special values.
14011401
However, it is subject to rounding errors, so float inputs should be exactly
14021402
representable with only a few bits.
14031403
"""

Lib/test/test_property.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,7 @@ def getter3(self):
406406
self.assertEqual(p2.__doc__, "doc-A")
407407

408408
# Case-3: with no user-provided doc new getter doc
409-
# takes precendence
409+
# takes precedence
410410
p = property(getter2, None, None, None)
411411

412412
p2 = p.getter(getter3)

Lib/test/test_socket.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1631,7 +1631,7 @@ def test_getaddrinfo_int_port_overflow(self):
16311631
try:
16321632
socket.getaddrinfo(None, ULONG_MAX + 1, type=socket.SOCK_STREAM)
16331633
except OverflowError:
1634-
# Platforms differ as to what values consitute a getaddrinfo() error
1634+
# Platforms differ as to what values constitute a getaddrinfo() error
16351635
# return. Some fail for LONG_MAX+1, others ULONG_MAX+1, and Windows
16361636
# silently accepts such huge "port" aka "service" numeric values.
16371637
self.fail("Either no error or socket.gaierror expected.")

Lib/test/test_string_literals.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ def test_eval_str_invalid_escape(self):
131131
self.assertEqual(exc.lineno, 1)
132132
self.assertEqual(exc.offset, 1)
133133

134-
# Check that the warning is raised ony once if there are syntax errors
134+
# Check that the warning is raised only once if there are syntax errors
135135

136136
with warnings.catch_warnings(record=True) as w:
137137
warnings.simplefilter('always', category=SyntaxWarning)

Lib/test/test_zipfile/test_core.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1117,7 +1117,7 @@ def test_force_zip64(self):
11171117
# Because this is hard to verify by parsing the data as a zip, the raw
11181118
# bytes are checked to ensure that they line up with the zip spec.
11191119
# The spec for this can be found at: https://pkware.cachefly.net/webdocs/casestudies/APPNOTE.TXT
1120-
# The relevent sections for this test are:
1120+
# The relevant sections for this test are:
11211121
# - 4.3.7 for local file header
11221122
# - 4.5.3 for zip64 extra field
11231123

@@ -1188,7 +1188,7 @@ def test_unseekable_zip_known_filesize(self):
11881188
# in as a zip, this test looks at the raw bytes created to ensure that
11891189
# the correct data has been generated.
11901190
# The spec for this can be found at: https://pkware.cachefly.net/webdocs/casestudies/APPNOTE.TXT
1191-
# The relevent sections for this test are:
1191+
# The relevant sections for this test are:
11921192
# - 4.3.7 for local file header
11931193
# - 4.3.9 for the data descriptor
11941194
# - 4.5.3 for zip64 extra field

Lib/turtledemo/sorting_animate.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
Sorts a shelf of 10 blocks using insertion
88
sort, selection sort and quicksort.
99
10-
Shelfs are implemented using builtin lists.
10+
Shelves are implemented using builtin lists.
1111
1212
Blocks are turtles with shape "square", but
1313
stretched to rectangles by shapesize()

Misc/coverity_model.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ PyObject *PyLong_FromSsize_t(Py_ssize_t ival)
7474

7575
/* tainted sinks
7676
*
77-
* Coverity considers argv, environ, read() data etc as tained.
77+
* Coverity considers argv, environ, read() data etc as tainted.
7878
*/
7979

8080
PyObject *PyErr_SetFromErrnoWithFilename(PyObject *exc, const char *filename)

Tools/c-analyzer/c_parser/preprocessor/gcc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ def _iter_top_include_lines(lines, topfile, cwd,
125125
raw):
126126
partial = 0 # depth
127127
files = [topfile]
128-
# We start at 1 in case there are source lines (including blank onces)
128+
# We start at 1 in case there are source lines (including blank ones)
129129
# before the first marker line. Also, we already verified in
130130
# _parse_marker_line() that the preprocessor reported lno as 1.
131131
lno = 1

configure

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

configure.ac

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1599,7 +1599,7 @@ then
15991599
AS_VAR_IF([host_cpu], [wasm64], [AS_VAR_APPEND([HOSTRUNNER], [" --experimental-wasm-memory64"])])
16001600
],
16011601
dnl TODO: support other WASI runtimes
1602-
dnl wasmtime starts the proces with "/" as CWD. For OOT builds add the
1602+
dnl wasmtime starts the process with "/" as CWD. For OOT builds add the
16031603
dnl directory containing _sysconfigdata to PYTHONPATH.
16041604
[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)::/'],
16051605
[HOSTRUNNER='']
@@ -3402,7 +3402,7 @@ then
34023402
LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
34033403
WASI*)
34043404
AS_VAR_IF([enable_wasm_dynamic_linking], [yes], [
3405-
dnl not iplemented yet
3405+
dnl not implemented yet
34063406
]);;
34073407
CYGWIN*)
34083408
LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
@@ -3572,7 +3572,7 @@ esac
35723572
AC_MSG_RESULT([$SHLIBS])
35733573

35743574
dnl perf trampoline is Linux specific and requires an arch-specific
3575-
dnl trampoline in asssembly.
3575+
dnl trampoline in assembly.
35763576
AC_MSG_CHECKING([perf trampoline])
35773577
AS_CASE([$PLATFORM_TRIPLET],
35783578
[x86_64-linux-gnu], [perf_trampoline=yes],
@@ -5690,7 +5690,7 @@ else
56905690
# While Python doesn't currently have full support for these platforms
56915691
# (see e.g., issue 1762561), we can at least make sure that float <-> string
56925692
# conversions work.
5693-
# FLOAT_WORDS_BIGENDIAN doesnt actually detect this case, but if it's not big
5693+
# FLOAT_WORDS_BIGENDIAN doesn't actually detect this case, but if it's not big
56945694
# or little, then it must be this?
56955695
AC_DEFINE([DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754], [1],
56965696
[Define if C doubles are 64-bit IEEE 754 binary format, stored

0 commit comments

Comments
 (0)