summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMin ho Kim <minho42@gmail.com>2019-07-30 22:16:13 (GMT)
committerTerry Jan Reedy <tjreedy@udel.edu>2019-07-30 22:16:13 (GMT)
commitc4cacc8c5eab50db8da3140353596f38a01115ca (patch)
tree9198db7e2525d0f113823faee4b6d4ac7136a633
parent0acb646b8e405864224bfd6d7d5089980dea63ac (diff)
downloadcpython-c4cacc8c5eab50db8da3140353596f38a01115ca.zip
cpython-c4cacc8c5eab50db8da3140353596f38a01115ca.tar.gz
cpython-c4cacc8c5eab50db8da3140353596f38a01115ca.tar.bz2
Fix typos in comments, docs and test names (#15018)
* Fix typos in comments, docs and test names * Update test_pyparse.py account for change in string length * Apply suggestion: splitable -> splittable Co-Authored-By: Terry Jan Reedy <tjreedy@udel.edu> * Apply suggestion: splitable -> splittable Co-Authored-By: Terry Jan Reedy <tjreedy@udel.edu> * Apply suggestion: Dealloccte -> Deallocate Co-Authored-By: Terry Jan Reedy <tjreedy@udel.edu> * Update posixmodule checksum. * Reverse idlelib changes.
-rw-r--r--Doc/library/email.encoders.rst2
-rw-r--r--Doc/library/statistics.rst2
-rw-r--r--Include/abstract.h2
-rw-r--r--Include/ast.h2
-rw-r--r--Include/pymath.h2
-rw-r--r--Lib/_pyio.py2
-rw-r--r--Lib/asyncio/streams.py2
-rw-r--r--Lib/asyncio/subprocess.py2
-rw-r--r--Lib/imaplib.py2
-rw-r--r--Lib/lib2to3/fixer_util.py2
-rw-r--r--Lib/lib2to3/tests/test_parser.py2
-rw-r--r--Lib/test/libregrtest/win_utils.py2
-rw-r--r--Lib/test/test_ast.py2
-rw-r--r--Lib/test/test_cmd_line_script.py2
-rw-r--r--Lib/test/test_collections.py4
-rw-r--r--Lib/test/test_compileall.py4
-rw-r--r--Lib/test/test_doctest.py2
-rw-r--r--Lib/test/test_email/test__header_value_parser.py2
-rw-r--r--Lib/test/test_email/test_email.py10
-rw-r--r--Lib/test/test_importlib/util.py2
-rw-r--r--Lib/test/test_mailbox.py2
-rw-r--r--Lib/test/test_pdb.py4
-rw-r--r--Lib/test/test_pprint.py2
-rw-r--r--Lib/test/test_subprocess.py2
-rw-r--r--Lib/test/test_threading.py2
-rw-r--r--Lib/test/test_trace.py2
-rw-r--r--Lib/test/test_turtle.py2
-rw-r--r--Lib/test/test_types.py2
-rw-r--r--Lib/test/test_venv.py2
-rw-r--r--Lib/unittest/result.py2
-rw-r--r--Lib/unittest/test/testmock/testmock.py2
-rw-r--r--Misc/HISTORY2
-rw-r--r--Misc/NEWS.d/3.5.0a1.rst2
-rw-r--r--Misc/NEWS.d/3.7.0a1.rst2
-rw-r--r--Misc/NEWS.d/3.8.0a1.rst2
-rw-r--r--Misc/NEWS.d/3.8.0a4.rst2
-rw-r--r--Misc/NEWS.d/next/Core and Builtins/2019-06-10-23-18-31.bpo-37219.jPSufq.rst2
-rw-r--r--Misc/NEWS.d/next/IDLE/2019-06-04-23-27-33.bpo-37039.FN_fBf.rst2
-rw-r--r--Misc/NEWS.d/next/Security/2019-07-16-08-11-00.bpo-37461.1Ahz7O.rst2
-rw-r--r--Misc/NEWS.d/next/Tests/2019-06-04-18-30-39.bpo-37153.711INB.rst2
-rw-r--r--Modules/_ctypes/libffi_osx/x86/x86-ffi64.c2
-rw-r--r--Modules/_struct.c4
-rw-r--r--Modules/cjkcodecs/README2
-rw-r--r--Modules/clinic/posixmodule.c.h4
-rw-r--r--Modules/expat/expat.h2
-rw-r--r--Modules/getpath.c2
-rw-r--r--Modules/posixmodule.c4
-rw-r--r--Objects/exceptions.c2
-rw-r--r--Objects/object.c2
-rw-r--r--Objects/stringlib/unicode_format.h2
-rw-r--r--Objects/typeobject.c2
-rw-r--r--PC/bdist_wininst/install.c2
-rw-r--r--PCbuild/readme.txt2
-rw-r--r--Python/ast.c2
-rw-r--r--Python/bootstrap_hash.c2
-rw-r--r--Python/compile.c2
-rw-r--r--Python/getopt.c2
-rw-r--r--Python/hamt.c2
-rw-r--r--Python/import.c2
-rw-r--r--Python/initconfig.c2
-rw-r--r--Python/pystate.c2
-rw-r--r--Python/sysmodule.c2
-rwxr-xr-xTools/ssl/make_ssl_data.py2
63 files changed, 73 insertions, 73 deletions
diff --git a/Doc/library/email.encoders.rst b/Doc/library/email.encoders.rst
index e4752a5..5d68b10 100644
--- a/Doc/library/email.encoders.rst
+++ b/Doc/library/email.encoders.rst
@@ -15,7 +15,7 @@ the :meth:`~email.message.EmailMessage.set_content` method.
This module is deprecated in Python 3. The functions provided here
should not be called explicitly since the :class:`~email.mime.text.MIMEText`
class sets the content type and CTE header using the *_subtype* and *_charset*
-values passed during the instaniation of that class.
+values passed during the instantiation of that class.
The remaining text in this section is the original documentation of the module.
diff --git a/Doc/library/statistics.rst b/Doc/library/statistics.rst
index a906a59..3a2a1f9 100644
--- a/Doc/library/statistics.rst
+++ b/Doc/library/statistics.rst
@@ -554,7 +554,7 @@ However, for reading convenience, most of the examples show sorted sequences.
>>> [round(q, 1) for q in quantiles(data, n=10)]
[81.0, 86.2, 89.0, 99.4, 102.5, 103.6, 106.0, 109.8, 111.0]
- >>> # Quartile cut points for the standard normal distibution
+ >>> # Quartile cut points for the standard normal distribution
>>> Z = NormalDist()
>>> [round(q, 4) for q in quantiles(Z, n=4)]
[-0.6745, 0.0, 0.6745]
diff --git a/Include/abstract.h b/Include/abstract.h
index f36fafb..8951f63 100644
--- a/Include/abstract.h
+++ b/Include/abstract.h
@@ -702,7 +702,7 @@ PyAPI_FUNC(PyObject *) PySequence_Fast(PyObject *o, const char* m);
(PyList_Check(o) ? PyList_GET_ITEM(o, i) : PyTuple_GET_ITEM(o, i))
/* Return a pointer to the underlying item array for
- an object retured by PySequence_Fast */
+ an object returned by PySequence_Fast */
#define PySequence_Fast_ITEMS(sf) \
(PyList_Check(sf) ? ((PyListObject *)(sf))->ob_item \
: ((PyTupleObject *)(sf))->ob_item)
diff --git a/Include/ast.h b/Include/ast.h
index f1d7348..1347fcf 100644
--- a/Include/ast.h
+++ b/Include/ast.h
@@ -25,7 +25,7 @@ PyAPI_FUNC(mod_ty) PyAST_FromNodeObject(
PyAPI_FUNC(PyObject *) _PyAST_ExprAsUnicode(expr_ty);
/* Return the borrowed reference to the first literal string in the
- sequence of statemnts or NULL if it doesn't start from a literal string.
+ sequence of statements or NULL if it doesn't start from a literal string.
Doesn't set exception. */
PyAPI_FUNC(PyObject *) _PyAST_GetDocString(asdl_seq *);
diff --git a/Include/pymath.h b/Include/pymath.h
index 6cf69f9..f869724 100644
--- a/Include/pymath.h
+++ b/Include/pymath.h
@@ -125,7 +125,7 @@ PyAPI_FUNC(void) _Py_set_387controlword(unsigned short);
/* Py_IS_FINITE(X)
* Return 1 if float or double arg is neither infinite nor NAN, else 0.
- * Some compilers (e.g. VisualStudio) have intrisics for this, so a special
+ * Some compilers (e.g. VisualStudio) have intrinsics for this, so a special
* macro for this particular test is useful
* Note: PC/pyconfig.h defines Py_IS_FINITE as _finite
*/
diff --git a/Lib/_pyio.py b/Lib/_pyio.py
index c355164..40e0c9f 100644
--- a/Lib/_pyio.py
+++ b/Lib/_pyio.py
@@ -1573,7 +1573,7 @@ class FileIO(RawIOBase):
raise IsADirectoryError(errno.EISDIR,
os.strerror(errno.EISDIR), file)
except AttributeError:
- # Ignore the AttribueError if stat.S_ISDIR or errno.EISDIR
+ # Ignore the AttributeError if stat.S_ISDIR or errno.EISDIR
# don't exist.
pass
self._blksize = getattr(fdfstat, 'st_blksize', 0)
diff --git a/Lib/asyncio/streams.py b/Lib/asyncio/streams.py
index 204eaf7..e56e2ef 100644
--- a/Lib/asyncio/streams.py
+++ b/Lib/asyncio/streams.py
@@ -556,7 +556,7 @@ class FlowControlMixin(protocols.Protocol):
# Avoid inheritance from FlowControlMixin
# Copy-paste the code to your project
# if you need flow control helpers
- warnings.warn(f"{self.__class__} should be instaniated "
+ warnings.warn(f"{self.__class__} should be instantiated "
"by asyncio internals only, "
"please avoid its creation from user code",
DeprecationWarning)
diff --git a/Lib/asyncio/subprocess.py b/Lib/asyncio/subprocess.py
index e6bec71..2a68c9e 100644
--- a/Lib/asyncio/subprocess.py
+++ b/Lib/asyncio/subprocess.py
@@ -130,7 +130,7 @@ class SubprocessStreamProtocol(streams.FlowControlMixin,
class Process:
def __init__(self, transport, protocol, loop, *, _asyncio_internal=False):
if not _asyncio_internal:
- warnings.warn(f"{self.__class__} should be instaniated "
+ warnings.warn(f"{self.__class__} should be instantiated "
"by asyncio internals only, "
"please avoid its creation from user code",
DeprecationWarning)
diff --git a/Lib/imaplib.py b/Lib/imaplib.py
index 822d9d6..a4f4993 100644
--- a/Lib/imaplib.py
+++ b/Lib/imaplib.py
@@ -502,7 +502,7 @@ class IMAP4:
def enable(self, capability):
"""Send an RFC5161 enable string to the server.
- (typ, [data]) = <intance>.enable(capability)
+ (typ, [data]) = <instance>.enable(capability)
"""
if 'ENABLE' not in self.capabilities:
raise IMAP4.error("Server does not support ENABLE")
diff --git a/Lib/lib2to3/fixer_util.py b/Lib/lib2to3/fixer_util.py
index babe6cb..c2a3a47 100644
--- a/Lib/lib2to3/fixer_util.py
+++ b/Lib/lib2to3/fixer_util.py
@@ -412,7 +412,7 @@ def _find(name, node):
return None
def _is_import_binding(node, name, package=None):
- """ Will reuturn node if node will import name, or node
+ """ Will return node if node will import name, or node
will import * from package. None is returned otherwise.
See test cases for examples. """
diff --git a/Lib/lib2to3/tests/test_parser.py b/Lib/lib2to3/tests/test_parser.py
index 01b2b51..f22d399 100644
--- a/Lib/lib2to3/tests/test_parser.py
+++ b/Lib/lib2to3/tests/test_parser.py
@@ -531,7 +531,7 @@ class TestSetLiteral(GrammarTest):
# Adapted from Python 3's Lib/test/test_unicode_identifiers.py and
# Lib/test/test_tokenize.py:TokenizeTest.test_non_ascii_identifiers
-class TestIdentfier(GrammarTest):
+class TestIdentifier(GrammarTest):
def test_non_ascii_identifiers(self):
self.validate("Örter = 'places'\ngrün = 'green'")
self.validate("蟒 = a蟒 = 锦蛇 = 1")
diff --git a/Lib/test/libregrtest/win_utils.py b/Lib/test/libregrtest/win_utils.py
index adfe278..0e6bfa8 100644
--- a/Lib/test/libregrtest/win_utils.py
+++ b/Lib/test/libregrtest/win_utils.py
@@ -18,7 +18,7 @@ COUNTER_NAME = r'\System\Processor Queue Length'
class WindowsLoadTracker():
"""
This class asynchronously interacts with the `typeperf` command to read
- the system load on Windows. Mulitprocessing and threads can't be used
+ the system load on Windows. Multiprocessing and threads can't be used
here because they interfere with the test suite's cases for those
modules.
"""
diff --git a/Lib/test/test_ast.py b/Lib/test/test_ast.py
index 5c37a5f..f35d9e6 100644
--- a/Lib/test/test_ast.py
+++ b/Lib/test/test_ast.py
@@ -551,7 +551,7 @@ class AST_Tests(unittest.TestCase):
compile(m, "<test>", "exec")
self.assertIn("but got <_ast.expr", str(cm.exception))
- def test_invalid_identitifer(self):
+ def test_invalid_identifier(self):
m = ast.Module([ast.Expr(ast.Name(42, ast.Load()))], [])
ast.fix_missing_locations(m)
with self.assertRaises(TypeError) as cm:
diff --git a/Lib/test/test_cmd_line_script.py b/Lib/test/test_cmd_line_script.py
index 80198f8..c8bf8af 100644
--- a/Lib/test/test_cmd_line_script.py
+++ b/Lib/test/test_cmd_line_script.py
@@ -714,7 +714,7 @@ class CmdLineTest(unittest.TestCase):
def test_nonexisting_script(self):
# bpo-34783: "./python script.py" must not crash
# if the script file doesn't exist.
- # (Skip test for macOS framework builds because sys.excutable name
+ # (Skip test for macOS framework builds because sys.executable name
# is not the actual Python executable file name.
script = 'nonexistingscript.py'
self.assertFalse(os.path.exists(script))
diff --git a/Lib/test/test_collections.py b/Lib/test/test_collections.py
index e532be6..0119c77 100644
--- a/Lib/test/test_collections.py
+++ b/Lib/test/test_collections.py
@@ -424,8 +424,8 @@ class TestNamedTuple(unittest.TestCase):
self.assertIsInstance(p, tuple)
self.assertEqual(p, (11, 22)) # matches a real tuple
- self.assertEqual(tuple(p), (11, 22)) # coercable to a real tuple
- self.assertEqual(list(p), [11, 22]) # coercable to a list
+ self.assertEqual(tuple(p), (11, 22)) # coercible to a real tuple
+ self.assertEqual(list(p), [11, 22]) # coercible to a list
self.assertEqual(max(p), 22) # iterable
self.assertEqual(max(*p), 22) # star-able
x, y = p
diff --git a/Lib/test/test_compileall.py b/Lib/test/test_compileall.py
index 04f6e1e..99d8437 100644
--- a/Lib/test/test_compileall.py
+++ b/Lib/test/test_compileall.py
@@ -578,14 +578,14 @@ class CommandLineTestsBase:
self.assertEqual(compile_dir.call_args[-1]['workers'], 0)
-class CommmandLineTestsWithSourceEpoch(CommandLineTestsBase,
+class CommandLineTestsWithSourceEpoch(CommandLineTestsBase,
unittest.TestCase,
metaclass=SourceDateEpochTestMeta,
source_date_epoch=True):
pass
-class CommmandLineTestsNoSourceEpoch(CommandLineTestsBase,
+class CommandLineTestsNoSourceEpoch(CommandLineTestsBase,
unittest.TestCase,
metaclass=SourceDateEpochTestMeta,
source_date_epoch=False):
diff --git a/Lib/test/test_doctest.py b/Lib/test/test_doctest.py
index 5ea18f5..f7c399e 100644
--- a/Lib/test/test_doctest.py
+++ b/Lib/test/test_doctest.py
@@ -2485,7 +2485,7 @@ def test_unittest_reportflags():
def test_testfile(): r"""
Tests for the `testfile()` function. This function runs all the
-doctest examples in a given file. In its simple invokation, it is
+doctest examples in a given file. In its simple invocation, it is
called with the name of a file, which is taken to be relative to the
calling module. The return value is (#failures, #tests).
diff --git a/Lib/test/test_email/test__header_value_parser.py b/Lib/test/test_email/test__header_value_parser.py
index 877cd3e..f6e5886 100644
--- a/Lib/test/test_email/test__header_value_parser.py
+++ b/Lib/test/test_email/test__header_value_parser.py
@@ -297,7 +297,7 @@ class TestParser(TestParserMixin, TestEmailBase):
[],
'')
- def test_get_unstructured_invaild_ew(self):
+ def test_get_unstructured_invalid_ew(self):
self._test_get_x(self._get_unst,
'=?test val',
'=?test val',
diff --git a/Lib/test/test_email/test_email.py b/Lib/test/test_email/test_email.py
index aa77588..ae96258 100644
--- a/Lib/test/test_email/test_email.py
+++ b/Lib/test/test_email/test_email.py
@@ -1008,7 +1008,7 @@ Test""")
Subject: the first part of this is short,
but_the_second_part_does_not_fit_within_maxlinelen_and_thus_should_be_on_a_line_all_by_itself""")
- def test_splittable_leading_char_followed_by_overlong_unsplitable(self):
+ def test_splittable_leading_char_followed_by_overlong_unsplittable(self):
eq = self.ndiffAssertEqual
h = Header(', but_the_second'
'_part_does_not_fit_within_maxlinelen_and_thus_should_be_on_a_line'
@@ -1017,7 +1017,7 @@ Subject: the first part of this is short,
,
but_the_second_part_does_not_fit_within_maxlinelen_and_thus_should_be_on_a_line_all_by_itself""")
- def test_multiple_splittable_leading_char_followed_by_overlong_unsplitable(self):
+ def test_multiple_splittable_leading_char_followed_by_overlong_unsplittable(self):
eq = self.ndiffAssertEqual
h = Header(', , but_the_second'
'_part_does_not_fit_within_maxlinelen_and_thus_should_be_on_a_line'
@@ -1026,14 +1026,14 @@ Subject: the first part of this is short,
, ,
but_the_second_part_does_not_fit_within_maxlinelen_and_thus_should_be_on_a_line_all_by_itself""")
- def test_trailing_splitable_on_overlong_unsplitable(self):
+ def test_trailing_splittable_on_overlong_unsplittable(self):
eq = self.ndiffAssertEqual
h = Header('this_part_does_not_fit_within_maxlinelen_and_thus_should_'
'be_on_a_line_all_by_itself;')
eq(h.encode(), "this_part_does_not_fit_within_maxlinelen_and_thus_should_"
"be_on_a_line_all_by_itself;")
- def test_trailing_splitable_on_overlong_unsplitable_with_leading_splitable(self):
+ def test_trailing_splittable_on_overlong_unsplittable_with_leading_splittable(self):
eq = self.ndiffAssertEqual
h = Header('; '
'this_part_does_not_fit_within_maxlinelen_and_thus_should_'
@@ -1466,7 +1466,7 @@ Blah blah blah
g.flatten(msg)
self.assertEqual(b.getvalue(), source + b'>From R\xc3\xb6lli\n')
- def test_mutltipart_with_bad_bytes_in_cte(self):
+ def test_multipart_with_bad_bytes_in_cte(self):
# bpo30835
source = textwrap.dedent("""\
From: aperson@example.com
diff --git a/Lib/test/test_importlib/util.py b/Lib/test/test_importlib/util.py
index 196ea1c..913db4b 100644
--- a/Lib/test/test_importlib/util.py
+++ b/Lib/test/test_importlib/util.py
@@ -488,7 +488,7 @@ class CommonResourceTests(abc.ABC):
self.execute(data01, full_path)
def test_relative_path(self):
- # A reative path is a ValueError.
+ # A relative path is a ValueError.
with self.assertRaises(ValueError):
self.execute(data01, '../data01/utf-8.file')
diff --git a/Lib/test/test_mailbox.py b/Lib/test/test_mailbox.py
index 0995b1e..36a2653 100644
--- a/Lib/test/test_mailbox.py
+++ b/Lib/test/test_mailbox.py
@@ -1420,7 +1420,7 @@ class TestMessage(TestBase, unittest.TestCase):
# Initialize with invalid argument
self.assertRaises(TypeError, lambda: self._factory(object()))
- def test_all_eMM_attribues_exist(self):
+ def test_all_eMM_attributes_exist(self):
# Issue 12537
eMM = email.message_from_string(_sample_message)
msg = self._factory(_sample_message)
diff --git a/Lib/test/test_pdb.py b/Lib/test/test_pdb.py
index d03f1b2..1e464df 100644
--- a/Lib/test/test_pdb.py
+++ b/Lib/test/test_pdb.py
@@ -983,7 +983,7 @@ def test_pdb_return_command_for_coroutine():
def test_pdb_until_command_for_generator():
"""Testing no unwindng stack on yield for generators
- for "until" command if target breakpoing is not reached
+ for "until" command if target breakpoint is not reached
>>> def test_gen():
... yield 0
@@ -1027,7 +1027,7 @@ def test_pdb_until_command_for_generator():
def test_pdb_until_command_for_coroutine():
"""Testing no unwindng stack for coroutines
- for "until" command if target breakpoing is not reached
+ for "until" command if target breakpoint is not reached
>>> import asyncio
diff --git a/Lib/test/test_pprint.py b/Lib/test/test_pprint.py
index b3b8715..cf3e4f0 100644
--- a/Lib/test/test_pprint.py
+++ b/Lib/test/test_pprint.py
@@ -481,7 +481,7 @@ frozenset2({0,
# Consequently, this test is fragile and
# implementation-dependent. Small changes to Python's sort
# algorithm cause the test to fail when it should pass.
- # XXX Or changes to the dictionary implmentation...
+ # XXX Or changes to the dictionary implementation...
cube_repr_tgt = """\
{frozenset(): frozenset({frozenset({2}), frozenset({0}), frozenset({1})}),
diff --git a/Lib/test/test_subprocess.py b/Lib/test/test_subprocess.py
index e58d092..4fe74bf 100644
--- a/Lib/test/test_subprocess.py
+++ b/Lib/test/test_subprocess.py
@@ -1500,7 +1500,7 @@ class RunFuncTestCase(BaseTestCase):
def test_run_with_pathlike_path(self):
# bpo-31961: test run(pathlike_object)
# the name of a command that can be run without
- # any argumenets that exit fast
+ # any arguments that exit fast
prog = 'tree.com' if mswindows else 'ls'
path = shutil.which(prog)
if path is None:
diff --git a/Lib/test/test_threading.py b/Lib/test/test_threading.py
index a04d496..a99b8ec 100644
--- a/Lib/test/test_threading.py
+++ b/Lib/test/test_threading.py
@@ -288,7 +288,7 @@ class ThreadTests(BaseTestCase):
finally:
threading._start_new_thread = _start_new_thread
- def test_finalize_runnning_thread(self):
+ def test_finalize_running_thread(self):
# Issue 1402: the PyGILState_Ensure / _Release functions may be called
# very late on python exit: on deallocation of a running thread for
# example.
diff --git a/Lib/test/test_trace.py b/Lib/test/test_trace.py
index 912badb..7cda546 100644
--- a/Lib/test/test_trace.py
+++ b/Lib/test/test_trace.py
@@ -180,7 +180,7 @@ class TestLineCounts(unittest.TestCase):
firstlineno_called = get_firstlineno(traced_doubler)
expected = {
(self.my_py_filename, firstlineno_calling + 1): 1,
- # List compehentions work differently in 3.x, so the count
+ # List comprehensions work differently in 3.x, so the count
# below changed compared to 2.x.
(self.my_py_filename, firstlineno_calling + 2): 12,
(self.my_py_filename, firstlineno_calling + 3): 1,
diff --git a/Lib/test/test_turtle.py b/Lib/test/test_turtle.py
index 2fd10cc..38448c7 100644
--- a/Lib/test/test_turtle.py
+++ b/Lib/test/test_turtle.py
@@ -85,7 +85,7 @@ class TurtleConfigTest(unittest.TestCase):
self.assertEqual(parsed_cfg, expected)
- def test_partial_config_dict_with_commments(self):
+ def test_partial_config_dict_with_comments(self):
cfg_name = self.get_cfg_file(test_config_two)
parsed_cfg = turtle.config_dict(cfg_name)
diff --git a/Lib/test/test_types.py b/Lib/test/test_types.py
index 56848c1..7b45b7a 100644
--- a/Lib/test/test_types.py
+++ b/Lib/test/test_types.py
@@ -466,7 +466,7 @@ class TypesTests(unittest.TestCase):
# No format code means use g, but must have a decimal
# and a number after the decimal. This is tricky, because
- # a totaly empty format specifier means something else.
+ # a totally empty format specifier means something else.
# So, just use a sign flag
test(1e200, '+g', '+1e+200')
test(1e200, '+', '+1e+200')
diff --git a/Lib/test/test_venv.py b/Lib/test/test_venv.py
index 228aa8d..9724d9e 100644
--- a/Lib/test/test_venv.py
+++ b/Lib/test/test_venv.py
@@ -345,7 +345,7 @@ class BasicTest(BaseTest):
"""
Test that the multiprocessing is able to spawn.
"""
- # Issue bpo-36342: Instanciation of a Pool object imports the
+ # Issue bpo-36342: Instantiation of a Pool object imports the
# multiprocessing.synchronize module. Skip the test if this module
# cannot be imported.
import_module('multiprocessing.synchronize')
diff --git a/Lib/unittest/result.py b/Lib/unittest/result.py
index c7e3206..111317b 100644
--- a/Lib/unittest/result.py
+++ b/Lib/unittest/result.py
@@ -161,7 +161,7 @@ class TestResult(object):
"""Tells whether or not this result was a success."""
# The hasattr check is for test_result's OldResult test. That
# way this method works on objects that lack the attribute.
- # (where would such result intances come from? old stored pickles?)
+ # (where would such result instances come from? old stored pickles?)
return ((len(self.failures) == len(self.errors) == 0) and
(not hasattr(self, 'unexpectedSuccesses') or
len(self.unexpectedSuccesses) == 0))
diff --git a/Lib/unittest/test/testmock/testmock.py b/Lib/unittest/test/testmock/testmock.py
index 090da45..18efd31 100644
--- a/Lib/unittest/test/testmock/testmock.py
+++ b/Lib/unittest/test/testmock/testmock.py
@@ -262,7 +262,7 @@ class MockTest(unittest.TestCase):
ret_val = mock(sentinel.Arg)
self.assertTrue(mock.called, "called not set")
- self.assertEqual(mock.call_count, 1, "call_count incoreect")
+ self.assertEqual(mock.call_count, 1, "call_count incorrect")
self.assertEqual(mock.call_args, ((sentinel.Arg,), {}),
"call_args not set")
self.assertEqual(mock.call_args.args, (sentinel.Arg,),
diff --git a/Misc/HISTORY b/Misc/HISTORY
index f4b756c..f49960c 100644
--- a/Misc/HISTORY
+++ b/Misc/HISTORY
@@ -2113,7 +2113,7 @@ Build
- Issue #21285: Refactor and fix curses configure check to always search
in a ncursesw directory.
-- Issue #15234: For BerkelyDB and Sqlite, only add the found library and
+- Issue #15234: For BerkeleyDB and Sqlite, only add the found library and
include directories if they aren't already being searched. This avoids
an explicit runtime library dependency.
diff --git a/Misc/NEWS.d/3.5.0a1.rst b/Misc/NEWS.d/3.5.0a1.rst
index 62406e1..99f2d1d 100644
--- a/Misc/NEWS.d/3.5.0a1.rst
+++ b/Misc/NEWS.d/3.5.0a1.rst
@@ -4992,7 +4992,7 @@ directory.
.. nonce: vlM720
.. section: Build
-For BerkelyDB and Sqlite, only add the found library and include directories
+For BerkeleyDB and Sqlite, only add the found library and include directories
if they aren't already being searched. This avoids an explicit runtime
library dependency.
diff --git a/Misc/NEWS.d/3.7.0a1.rst b/Misc/NEWS.d/3.7.0a1.rst
index f9cd59c..bbd72d7 100644
--- a/Misc/NEWS.d/3.7.0a1.rst
+++ b/Misc/NEWS.d/3.7.0a1.rst
@@ -3067,7 +3067,7 @@ Sped up reading encrypted ZIP files by 2 times.
.. section: Library
Element.getiterator() and the html parameter of XMLParser() were deprecated
-only in the documentation (since Python 3.2 and 3.4 correspondintly). Now
+only in the documentation (since Python 3.2 and 3.4 correspondingly). Now
using them emits a deprecation warning.
..
diff --git a/Misc/NEWS.d/3.8.0a1.rst b/Misc/NEWS.d/3.8.0a1.rst
index 3d37669..68217d3 100644
--- a/Misc/NEWS.d/3.8.0a1.rst
+++ b/Misc/NEWS.d/3.8.0a1.rst
@@ -2054,7 +2054,7 @@ Speed-up building enums by value, e.g. http.HTTPStatus(200).
.. section: Library
random.gammavariate(1.0, beta) now computes the same result as
-random.expovariate(1.0 / beta). This synchonizes the two algorithms and
+random.expovariate(1.0 / beta). This synchronizes the two algorithms and
eliminates some idiosyncrasies in the old implementation. It does however
produce a difference stream of random variables than it used to.
diff --git a/Misc/NEWS.d/3.8.0a4.rst b/Misc/NEWS.d/3.8.0a4.rst
index 80e01d9..894ce0b 100644
--- a/Misc/NEWS.d/3.8.0a4.rst
+++ b/Misc/NEWS.d/3.8.0a4.rst
@@ -904,7 +904,7 @@ only enabled by ``--findleaks``. The check now also works with
.. nonce: B8-ghi
.. section: Tests
-When using mulitprocessing mode (-jN), regrtest now better reports errors if
+When using multiprocessing mode (-jN), regrtest now better reports errors if
a worker process fails, and it exits immediately on a worker thread failure
or when interrupted.
diff --git a/Misc/NEWS.d/next/Core and Builtins/2019-06-10-23-18-31.bpo-37219.jPSufq.rst b/Misc/NEWS.d/next/Core and Builtins/2019-06-10-23-18-31.bpo-37219.jPSufq.rst
index ef8f52d..d45f086 100644
--- a/Misc/NEWS.d/next/Core and Builtins/2019-06-10-23-18-31.bpo-37219.jPSufq.rst
+++ b/Misc/NEWS.d/next/Core and Builtins/2019-06-10-23-18-31.bpo-37219.jPSufq.rst
@@ -1 +1 @@
-Remove errorneous optimization for empty set differences.
+Remove erroneous optimization for empty set differences.
diff --git a/Misc/NEWS.d/next/IDLE/2019-06-04-23-27-33.bpo-37039.FN_fBf.rst b/Misc/NEWS.d/next/IDLE/2019-06-04-23-27-33.bpo-37039.FN_fBf.rst
index 71c8c89..68d80ae 100644
--- a/Misc/NEWS.d/next/IDLE/2019-06-04-23-27-33.bpo-37039.FN_fBf.rst
+++ b/Misc/NEWS.d/next/IDLE/2019-06-04-23-27-33.bpo-37039.FN_fBf.rst
@@ -1,4 +1,4 @@
-Adjust "Zoom Height" to individual screens by momemtarily maximizing the
+Adjust "Zoom Height" to individual screens by momentarily maximizing the
window on first use with a particular screen. Changing screen settings
may invalidate the saved height. While a window is maximized,
"Zoom Height" has no effect.
diff --git a/Misc/NEWS.d/next/Security/2019-07-16-08-11-00.bpo-37461.1Ahz7O.rst b/Misc/NEWS.d/next/Security/2019-07-16-08-11-00.bpo-37461.1Ahz7O.rst
index 4bfd350..9d47578 100644
--- a/Misc/NEWS.d/next/Security/2019-07-16-08-11-00.bpo-37461.1Ahz7O.rst
+++ b/Misc/NEWS.d/next/Security/2019-07-16-08-11-00.bpo-37461.1Ahz7O.rst
@@ -1,2 +1,2 @@
-Fix an inifite loop when parsing specially crafted email headers. Patch by
+Fix an infinite loop when parsing specially crafted email headers. Patch by
Abhilash Raj.
diff --git a/Misc/NEWS.d/next/Tests/2019-06-04-18-30-39.bpo-37153.711INB.rst b/Misc/NEWS.d/next/Tests/2019-06-04-18-30-39.bpo-37153.711INB.rst
index 138a22f..706ebaa 100644
--- a/Misc/NEWS.d/next/Tests/2019-06-04-18-30-39.bpo-37153.711INB.rst
+++ b/Misc/NEWS.d/next/Tests/2019-06-04-18-30-39.bpo-37153.711INB.rst
@@ -1,2 +1,2 @@
-``test_venv.test_mutiprocessing()`` now explicitly calls
+``test_venv.test_multiprocessing()`` now explicitly calls
``pool.terminate()`` to wait until the pool completes.
diff --git a/Modules/_ctypes/libffi_osx/x86/x86-ffi64.c b/Modules/_ctypes/libffi_osx/x86/x86-ffi64.c
index f2610c1..8e7d0164 100644
--- a/Modules/_ctypes/libffi_osx/x86/x86-ffi64.c
+++ b/Modules/_ctypes/libffi_osx/x86/x86-ffi64.c
@@ -57,7 +57,7 @@ ffi_call_unix64(
of SSESF, SSEDF classes, that are basically SSE class, just gcc will
use SF or DFmode move instead of DImode to avoid reformating penalties.
- Similary we play games with INTEGERSI_CLASS to use cheaper SImode moves
+ Similarly we play games with INTEGERSI_CLASS to use cheaper SImode moves
whenever possible (upper half does contain padding). */
enum x86_64_reg_class
{
diff --git a/Modules/_struct.c b/Modules/_struct.c
index d1c635a..ba8f9cd 100644
--- a/Modules/_struct.c
+++ b/Modules/_struct.c
@@ -361,8 +361,8 @@ _range_error(const formatdef *f, int is_unsigned)
[bln][up]_TYPE
- [bln] distiguishes among big-endian, little-endian and native.
- [pu] distiguishes between pack (to struct) and unpack (from struct).
+ [bln] distinguishes among big-endian, little-endian and native.
+ [pu] distinguishes between pack (to struct) and unpack (from struct).
TYPE is one of char, byte, ubyte, etc.
*/
diff --git a/Modules/cjkcodecs/README b/Modules/cjkcodecs/README
index b2370bc..8f08f2d 100644
--- a/Modules/cjkcodecs/README
+++ b/Modules/cjkcodecs/README
@@ -6,7 +6,7 @@ subdirectory of CJKCodecs' distribution.
-Notes on implmentation characteristics of each codecs
+Notes on implementation characteristics of each codecs
-----------------------------------------------------
1) Big5 codec
diff --git a/Modules/clinic/posixmodule.c.h b/Modules/clinic/posixmodule.c.h
index 22cb947..aa1ab79 100644
--- a/Modules/clinic/posixmodule.c.h
+++ b/Modules/clinic/posixmodule.c.h
@@ -2817,7 +2817,7 @@ PyDoc_STRVAR(os_sched_getscheduler__doc__,
"sched_getscheduler($module, pid, /)\n"
"--\n"
"\n"
-"Get the scheduling policy for the process identifiedy by pid.\n"
+"Get the scheduling policy for the process identified by pid.\n"
"\n"
"Passing 0 for pid returns the scheduling policy for the calling process.");
@@ -8741,4 +8741,4 @@ exit:
#ifndef OS__REMOVE_DLL_DIRECTORY_METHODDEF
#define OS__REMOVE_DLL_DIRECTORY_METHODDEF
#endif /* !defined(OS__REMOVE_DLL_DIRECTORY_METHODDEF) */
-/*[clinic end generated code: output=b3ae8afd275ea5cd input=a9049054013a1b77]*/
+/*[clinic end generated code: output=1e001c855e011720 input=a9049054013a1b77]*/
diff --git a/Modules/expat/expat.h b/Modules/expat/expat.h
index c050f1d..56399da 100644
--- a/Modules/expat/expat.h
+++ b/Modules/expat/expat.h
@@ -265,7 +265,7 @@ XML_ParserCreate_MM(const XML_Char *encoding,
/* Prepare a parser object to be re-used. This is particularly
valuable when memory allocation overhead is disproportionately high,
- such as when a large number of small documnents need to be parsed.
+ such as when a large number of small documents need to be parsed.
All handlers are cleared from the parser, except for the
unknownEncodingHandler. The parser's external state is re-initialized
except for the values of ns and ns_triplets.
diff --git a/Modules/getpath.c b/Modules/getpath.c
index 4ddb663..2372172 100644
--- a/Modules/getpath.c
+++ b/Modules/getpath.c
@@ -95,7 +95,7 @@
* process to find the installed Python tree.
*
* An embedding application can use Py_SetPath() to override all of
- * these authomatic path computations.
+ * these automatic path computations.
*
* NOTE: Windows MSVC builds use PC/getpathp.c instead!
*/
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
index 777e933..4f8c074 100644
--- a/Modules/posixmodule.c
+++ b/Modules/posixmodule.c
@@ -6112,14 +6112,14 @@ os.sched_getscheduler
pid: pid_t
/
-Get the scheduling policy for the process identifiedy by pid.
+Get the scheduling policy for the process identified by pid.
Passing 0 for pid returns the scheduling policy for the calling process.
[clinic start generated code]*/
static PyObject *
os_sched_getscheduler_impl(PyObject *module, pid_t pid)
-/*[clinic end generated code: output=dce4c0bd3f1b34c8 input=5f14cfd1f189e1a0]*/
+/*[clinic end generated code: output=dce4c0bd3f1b34c8 input=8d99dac505485ac8]*/
{
int policy;
diff --git a/Objects/exceptions.c b/Objects/exceptions.c
index 568d495..ef9dd51 100644
--- a/Objects/exceptions.c
+++ b/Objects/exceptions.c
@@ -405,7 +405,7 @@ static PyTypeObject _PyExc_BaseException = {
BaseException_new, /* tp_new */
};
/* the CPython API expects exceptions to be (PyObject *) - both a hold-over
-from the previous implmentation and also allowing Python objects to be used
+from the previous implementation and also allowing Python objects to be used
in the API */
PyObject *PyExc_BaseException = (PyObject *)&_PyExc_BaseException;
diff --git a/Objects/object.c b/Objects/object.c
index ee20506..7f2c23a 100644
--- a/Objects/object.c
+++ b/Objects/object.c
@@ -2072,7 +2072,7 @@ _PyTrash_thread_deposit_object(PyObject *op)
tstate->trash_delete_later = op;
}
-/* Dealloccate all the objects in the _PyTrash_delete_later list. Called when
+/* Deallocate all the objects in the _PyTrash_delete_later list. Called when
* the call-stack unwinds again.
*/
void
diff --git a/Objects/stringlib/unicode_format.h b/Objects/stringlib/unicode_format.h
index ddf1e26..b526ad2 100644
--- a/Objects/stringlib/unicode_format.h
+++ b/Objects/stringlib/unicode_format.h
@@ -828,7 +828,7 @@ output_markup(SubString *field_name, SubString *format_spec,
tmp = NULL;
}
- /* if needed, recurively compute the format_spec */
+ /* if needed, recursively compute the format_spec */
if (format_spec_needs_expanding) {
tmp = build_string(format_spec, args, kwargs, recursion_depth-1,
auto_number);
diff --git a/Objects/typeobject.c b/Objects/typeobject.c
index 8acf678..9e5709a 100644
--- a/Objects/typeobject.c
+++ b/Objects/typeobject.c
@@ -1369,7 +1369,7 @@ PyType_IsSubtype(PyTypeObject *a, PyTypeObject *b)
return 0;
}
else
- /* a is not completely initilized yet; follow tp_base */
+ /* a is not completely initialized yet; follow tp_base */
return type_is_subtype_base_chain(a, b);
}
diff --git a/PC/bdist_wininst/install.c b/PC/bdist_wininst/install.c
index 6d01ad5..0219a19 100644
--- a/PC/bdist_wininst/install.c
+++ b/PC/bdist_wininst/install.c
@@ -2540,7 +2540,7 @@ int DoUninstall(int argc, char **argv)
if (!lines)
return SystemError(0, "Out of memory");
- /* Read the whole logfile, realloacting the buffer */
+ /* Read the whole logfile, reallocating the buffer */
while (fgets(buffer, sizeof(buffer), logfile)) {
int len = strlen(buffer);
/* remove trailing white space */
diff --git a/PCbuild/readme.txt b/PCbuild/readme.txt
index 8cbb5d8..90aac3a 100644
--- a/PCbuild/readme.txt
+++ b/PCbuild/readme.txt
@@ -285,4 +285,4 @@ The pyproject property file defines all of the build settings for each
project, with some projects overriding certain specific values. The GUI
doesn't always reflect the correct settings and may confuse the user
with false information, especially for settings that automatically adapt
-for diffirent configurations.
+for different configurations.
diff --git a/Python/ast.c b/Python/ast.c
index ce3b492..976be70 100644
--- a/Python/ast.c
+++ b/Python/ast.c
@@ -5256,7 +5256,7 @@ fstring_find_expr(const char **str, const char *end, int raw, int recurse_lvl,
*str += 1;
/* If we're in = mode (detected by non-NULL expr_text), and have no format
- spec and no explict conversion, set the conversion to 'r'. */
+ spec and no explicit conversion, set the conversion to 'r'. */
if (*expr_text && format_spec == NULL && conversion == -1) {
conversion = 'r';
}
diff --git a/Python/bootstrap_hash.c b/Python/bootstrap_hash.c
index 43f5264..aa3a3df 100644
--- a/Python/bootstrap_hash.c
+++ b/Python/bootstrap_hash.c
@@ -163,7 +163,7 @@ py_getrandom(void *buffer, Py_ssize_t size, int blocking, int raise)
}
/* getrandom(GRND_NONBLOCK) fails with EAGAIN if the system urandom
- is not initialiazed yet. For _PyRandom_Init(), we ignore the
+ is not initialized yet. For _PyRandom_Init(), we ignore the
error and fall back on reading /dev/urandom which never blocks,
even if the system urandom is not initialized yet:
see the PEP 524. */
diff --git a/Python/compile.c b/Python/compile.c
index 0336959..d2de7a7 100644
--- a/Python/compile.c
+++ b/Python/compile.c
@@ -1868,7 +1868,7 @@ compiler_make_closure(struct compiler *c, PyCodeObject *co, Py_ssize_t flags, Py
free variable that has the same name as a method,
the name will be considered free *and* local in the
class. It should be handled by the closure, as
- well as by the normal name loookup logic.
+ well as by the normal name lookup logic.
*/
reftype = get_ref_type(c, name);
if (reftype == CELL)
diff --git a/Python/getopt.c b/Python/getopt.c
index 1a7db3f..89f7734 100644
--- a/Python/getopt.c
+++ b/Python/getopt.c
@@ -20,7 +20,7 @@
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* Nevertheless, I would like to know about bugs in this library or
- * suggestions for improvment. Send bug reports and feedback to
+ * suggestions for improvement. Send bug reports and feedback to
* davegottner@delphi.com.
*---------------------------------------------------------------------------*/
diff --git a/Python/hamt.c b/Python/hamt.c
index b3cbf9a..28b4e1e 100644
--- a/Python/hamt.c
+++ b/Python/hamt.c
@@ -830,7 +830,7 @@ hamt_node_bitmap_assoc(PyHamtNode_Bitmap *self,
Instead we start using an Array node, which has
simpler (faster) implementation at the expense of
- having prealocated 32 pointers for its keys/values
+ having preallocated 32 pointers for its keys/values
pairs.
Small hamt objects (<30 keys) usually don't have any
diff --git a/Python/import.c b/Python/import.c
index 15f1d94..9f5ec28 100644
--- a/Python/import.c
+++ b/Python/import.c
@@ -833,7 +833,7 @@ import_add_module(PyThreadState *tstate, PyObject *name)
}
else {
m = PyObject_GetItem(modules, name);
- // For backward-comaptibility we copy the behavior
+ // For backward-compatibility we copy the behavior
// of PyDict_GetItemWithError().
if (_PyErr_ExceptionMatches(tstate, PyExc_KeyError)) {
_PyErr_Clear(tstate);
diff --git a/Python/initconfig.c b/Python/initconfig.c
index 9247443..5bd7d4f 100644
--- a/Python/initconfig.c
+++ b/Python/initconfig.c
@@ -1068,7 +1068,7 @@ config_init_program_name(PyConfig *config)
or rather, to work around Apple's overly strict requirements of
the process name. However, we still need a usable sys.executable,
so the actual executable path is passed in an environment variable.
- See Lib/plat-mac/bundlebuiler.py for details about the bootstrap
+ See Lib/plat-mac/bundlebuilder.py for details about the bootstrap
script. */
const char *p = config_get_env(config, "PYTHONEXECUTABLE");
if (p != NULL) {
diff --git a/Python/pystate.c b/Python/pystate.c
index 1c3c0f4..3b2adf5 100644
--- a/Python/pystate.c
+++ b/Python/pystate.c
@@ -1499,7 +1499,7 @@ _PyCrossInterpreterData_Release(_PyCrossInterpreterData *data)
// Switch to the original interpreter.
PyInterpreterState *interp = _PyInterpreterState_LookUpID(data->interp);
if (interp == NULL) {
- // The intepreter was already destroyed.
+ // The interpreter was already destroyed.
if (data->free != NULL) {
// XXX Someone leaked some memory...
}
diff --git a/Python/sysmodule.c b/Python/sysmodule.c
index 103a111..a89ebce 100644
--- a/Python/sysmodule.c
+++ b/Python/sysmodule.c
@@ -1162,7 +1162,7 @@ static PyTypeObject AsyncGenHooksType;
PyDoc_STRVAR(asyncgen_hooks_doc,
"asyncgen_hooks\n\
\n\
-A struct sequence providing information about asynhronous\n\
+A struct sequence providing information about asynchronous\n\
generators hooks. The attributes are read only.");
static PyStructSequence_Field asyncgen_hooks_fields[] = {
diff --git a/Tools/ssl/make_ssl_data.py b/Tools/ssl/make_ssl_data.py
index 3fb4985..fdabd5d 100755
--- a/Tools/ssl/make_ssl_data.py
+++ b/Tools/ssl/make_ssl_data.py
@@ -2,7 +2,7 @@
"""
This script should be called *manually* when we want to upgrade SSLError
-`library` and `reason` mnemnonics to a more recent OpenSSL version.
+`library` and `reason` mnemonics to a more recent OpenSSL version.
It takes two arguments:
- the path to the OpenSSL source tree (e.g. git checkout)