diff --git a/Doc/library/datetime.rst b/Doc/library/datetime.rst index 272abee2de86..ecaad06ccc2e 100644 --- a/Doc/library/datetime.rst +++ b/Doc/library/datetime.rst @@ -1842,7 +1842,7 @@ Note that the :class:`datetime` instances that differ only by the value of the :attr:`~datetime.fold` attribute are considered equal in comparisons. Applications that can't bear wall-time ambiguities should explicitly check the -value of the :attr:`~datetime.fold` atribute or avoid using hybrid +value of the :attr:`~datetime.fold` attribute or avoid using hybrid :class:`tzinfo` subclasses; there are no ambiguities when using :class:`timezone`, or any other fixed-offset :class:`tzinfo` subclass (such as a class representing only EST (fixed offset -5 hours), or only EDT (fixed offset -4 hours)). diff --git a/Doc/library/email.contentmanager.rst b/Doc/library/email.contentmanager.rst index c25d0736835e..a9c078bd60ba 100644 --- a/Doc/library/email.contentmanager.rst +++ b/Doc/library/email.contentmanager.rst @@ -433,5 +433,5 @@ Currently the email package provides only one concrete content manager, If *headers* is specified and is a list of strings of the form ``headername: headervalue`` or a list of ``header`` objects - (distinguised from strings by having a ``name`` attribute), add the + (distinguished from strings by having a ``name`` attribute), add the headers to *msg*. diff --git a/Doc/library/idle.rst b/Doc/library/idle.rst index 0b8171d7816f..ffe842643ee4 100644 --- a/Doc/library/idle.rst +++ b/Doc/library/idle.rst @@ -531,7 +531,7 @@ Command line usage -c command run command in the shell window -d enable debugger and open shell window -e open editor window - -h print help message with legal combinatios and exit + -h print help message with legal combinations and exit -i open shell window -r file run file in shell window -s run $IDLESTARTUP or $PYTHONSTARTUP first, in shell window diff --git a/Doc/library/smtpd.rst b/Doc/library/smtpd.rst index ad6bd3cc061a..1c255ddb942c 100644 --- a/Doc/library/smtpd.rst +++ b/Doc/library/smtpd.rst @@ -44,7 +44,7 @@ SMTPServer Objects dictionary is a suitable value). If not specified the :mod:`asyncore` global socket map is used. - *enable_SMTPUTF8* determins whether the ``SMTPUTF8`` extension (as defined + *enable_SMTPUTF8* determines whether the ``SMTPUTF8`` extension (as defined in :RFC:`6531`) should be enabled. The default is ``False``. When ``True``, ``SMTPUTF8`` is accepted as a parameter to the ``MAIL`` command and when present is passed to :meth:`process_message` in the @@ -162,7 +162,7 @@ SMTPChannel Objects accepted in a ``DATA`` command. A value of ``None`` or ``0`` means no limit. - *enable_SMTPUTF8* determins whether the ``SMTPUTF8`` extension (as defined + *enable_SMTPUTF8* determines whether the ``SMTPUTF8`` extension (as defined in :RFC:`6531`) should be enabled. The default is ``False``. *decode_data* and *enable_SMTPUTF8* cannot be set to ``True`` at the same time. diff --git a/Doc/whatsnew/3.3.rst b/Doc/whatsnew/3.3.rst index 44c71e0eb590..48b8a3bee27b 100644 --- a/Doc/whatsnew/3.3.rst +++ b/Doc/whatsnew/3.3.rst @@ -1954,7 +1954,7 @@ ssl :attr:`~ssl.OP_NO_COMPRESSION` can be used to disable compression. (Contributed by Antoine Pitrou in :issue:`13634`.) -* Support has been added for the Next Procotol Negotiation extension using +* Support has been added for the Next Protocol Negotiation extension using the :meth:`ssl.SSLContext.set_npn_protocols` method. (Contributed by Colin Marc in :issue:`14204`.) diff --git a/Include/abstract.h b/Include/abstract.h index f838b50b6e08..e728b121f425 100644 --- a/Include/abstract.h +++ b/Include/abstract.h @@ -487,7 +487,7 @@ xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx*/ /* old buffer API FIXME: usage of these should all be replaced in Python itself but for backwards compatibility we will implement them. - Their usage without a corresponding "unlock" mechansim + Their usage without a corresponding "unlock" mechanism may create issues (but they would already be there). */ PyAPI_FUNC(int) PyObject_AsCharBuffer(PyObject *obj, diff --git a/Include/bytesobject.h b/Include/bytesobject.h index 4578069df582..11d8218402dc 100644 --- a/Include/bytesobject.h +++ b/Include/bytesobject.h @@ -131,7 +131,7 @@ PyAPI_FUNC(Py_ssize_t) _PyBytes_InsertThousandsGrouping(char *buffer, #define F_ZERO (1<<4) #ifndef Py_LIMITED_API -/* The _PyBytesWriter structure is big: it contains an embeded "stack buffer". +/* The _PyBytesWriter structure is big: it contains an embedded "stack buffer". A _PyBytesWriter variable must be declared at the end of variables in a function to optimize the memory allocation on the stack. */ typedef struct { diff --git a/Include/pymath.h b/Include/pymath.h index 894362e69813..7216a092d17c 100644 --- a/Include/pymath.h +++ b/Include/pymath.h @@ -37,7 +37,7 @@ extern double pow(double, double); #endif /* __STDC__ */ #endif /* _MSC_VER */ -/* High precision defintion of pi and e (Euler) +/* High precision definition of pi and e (Euler) * The values are taken from libc6's math.h. */ #ifndef Py_MATH_PIl diff --git a/Lib/asyncio/streams.py b/Lib/asyncio/streams.py index c88a87cd0967..b4adc7d9c689 100644 --- a/Lib/asyncio/streams.py +++ b/Lib/asyncio/streams.py @@ -590,7 +590,7 @@ def read(self, n=-1): bytes. If the EOF was received and the internal buffer is empty, return an empty bytes object. - If n is zero, return empty bytes object immediatelly. + If n is zero, return empty bytes object immediately. If n is positive, this function try to read `n` bytes, and may return less or equal bytes than requested, but at least one byte. If EOF was diff --git a/Lib/concurrent/futures/process.py b/Lib/concurrent/futures/process.py index 590edba24eff..8f1d714193ab 100644 --- a/Lib/concurrent/futures/process.py +++ b/Lib/concurrent/futures/process.py @@ -63,7 +63,7 @@ # interpreter to exit when there are still idle processes in a # ProcessPoolExecutor's process pool (i.e. shutdown() was not called). However, # allowing workers to die with the interpreter has two undesirable properties: -# - The workers would still be running during interpretor shutdown, +# - The workers would still be running during interpreter shutdown, # meaning that they would fail in unpredictable ways. # - The workers could be killed while evaluating a work item, which could # be bad if the callable being evaluated has external side-effects e.g. diff --git a/Lib/concurrent/futures/thread.py b/Lib/concurrent/futures/thread.py index 6266f38eb795..03d276b63f63 100644 --- a/Lib/concurrent/futures/thread.py +++ b/Lib/concurrent/futures/thread.py @@ -16,7 +16,7 @@ # to exit when there are still idle threads in a ThreadPoolExecutor's thread # pool (i.e. shutdown() was not called). However, allowing workers to die with # the interpreter has two undesirable properties: -# - The workers would still be running during interpretor shutdown, +# - The workers would still be running during interpreter shutdown, # meaning that they would fail in unpredictable ways. # - The workers could be killed while evaluating a work item, which could # be bad if the callable being evaluated has external side-effects e.g. diff --git a/Lib/distutils/tests/test_msvc9compiler.py b/Lib/distutils/tests/test_msvc9compiler.py index 5e18c6136034..77a07ef39dd1 100644 --- a/Lib/distutils/tests/test_msvc9compiler.py +++ b/Lib/distutils/tests/test_msvc9compiler.py @@ -125,7 +125,7 @@ def test_reg_class(self): self.assertRaises(KeyError, Reg.get_value, 'xxx', 'xxx') # looking for values that should exist on all - # windows registeries versions. + # windows registry versions. path = r'Control Panel\Desktop' v = Reg.get_value(path, 'dragfullwindows') self.assertIn(v, ('0', '1', '2')) diff --git a/Lib/email/contentmanager.py b/Lib/email/contentmanager.py index d3636529b6d7..099c314628e6 100644 --- a/Lib/email/contentmanager.py +++ b/Lib/email/contentmanager.py @@ -141,7 +141,7 @@ def _encode_base64(data, max_line_length): def _encode_text(string, charset, cte, policy): lines = string.encode(charset).splitlines() linesep = policy.linesep.encode('ascii') - def embeded_body(lines): return linesep.join(lines) + linesep + def embedded_body(lines): return linesep.join(lines) + linesep def normal_body(lines): return b'\n'.join(lines) + b'\n' if cte==None: # Use heuristics to decide on the "best" encoding. @@ -152,7 +152,7 @@ def normal_body(lines): return b'\n'.join(lines) + b'\n' if (policy.cte_type == '8bit' and max(len(x) for x in lines) <= policy.max_line_length): return '8bit', normal_body(lines).decode('ascii', 'surrogateescape') - sniff = embeded_body(lines[:10]) + sniff = embedded_body(lines[:10]) sniff_qp = quoprimime.body_encode(sniff.decode('latin-1'), policy.max_line_length) sniff_base64 = binascii.b2a_base64(sniff) @@ -171,7 +171,7 @@ def normal_body(lines): return b'\n'.join(lines) + b'\n' data = quoprimime.body_encode(normal_body(lines).decode('latin-1'), policy.max_line_length) elif cte == 'base64': - data = _encode_base64(embeded_body(lines), policy.max_line_length) + data = _encode_base64(embedded_body(lines), policy.max_line_length) else: raise ValueError("Unknown content transfer encoding {}".format(cte)) return cte, data diff --git a/Lib/email/generator.py b/Lib/email/generator.py index 11ff16df9a16..7c3cdc96d52d 100644 --- a/Lib/email/generator.py +++ b/Lib/email/generator.py @@ -97,7 +97,7 @@ def flatten(self, msg, unixfrom=False, linesep=None): self._NL = policy.linesep self._encoded_NL = self._encode(self._NL) self._EMPTY = '' - self._encoded_EMTPY = self._encode('') + self._encoded_EMPTY = self._encode('') # Because we use clone (below) when we recursively process message # subparts, and because clone uses the computed policy (not None), # submessages will automatically get set to the computed policy when diff --git a/Lib/email/header.py b/Lib/email/header.py index 6820ea16baf3..c7b2dd9f310b 100644 --- a/Lib/email/header.py +++ b/Lib/email/header.py @@ -49,7 +49,7 @@ # Find a header embedded in a putative header value. Used to check for # header injection attack. -_embeded_header = re.compile(r'\n[^ \t]+:') +_embedded_header = re.compile(r'\n[^ \t]+:') @@ -385,7 +385,7 @@ def encode(self, splitchars=';, \t', maxlinelen=None, linesep='\n'): if self._chunks: formatter.add_transition() value = formatter._str(linesep) - if _embeded_header.search(value): + if _embedded_header.search(value): raise HeaderParseError("header value appears to contain " "an embedded header: {!r}".format(value)) return value diff --git a/Lib/email/message.py b/Lib/email/message.py index aefaf57d00e0..65bb23775223 100644 --- a/Lib/email/message.py +++ b/Lib/email/message.py @@ -1043,7 +1043,7 @@ def iter_attachments(self): yield from parts return # Otherwise we more or less invert the remaining logic in get_body. - # This only really works in edge cases (ex: non-text relateds or + # This only really works in edge cases (ex: non-text related or # alternatives) if the sending agent sets content-disposition. seen = [] # Only skip the first example of each candidate type. for part in parts: diff --git a/Lib/http/client.py b/Lib/http/client.py index 9d5cf4518fe7..91074129225c 100644 --- a/Lib/http/client.py +++ b/Lib/http/client.py @@ -136,7 +136,7 @@ # # VCHAR defined in http://tools.ietf.org/html/rfc5234#appendix-B.1 -# the patterns for both name and value are more leniant than RFC +# the patterns for both name and value are more lenient than RFC # definitions to allow for backwards compatibility _is_legal_header_name = re.compile(rb'[^:\s][^:\r\n]*').fullmatch _is_illegal_header_value = re.compile(rb'\n(?![ \t])|\r(?![ \t\n])').search diff --git a/Lib/idlelib/README.txt b/Lib/idlelib/README.txt index d333b47633ed..f7aad68ae3f8 100644 --- a/Lib/idlelib/README.txt +++ b/Lib/idlelib/README.txt @@ -65,7 +65,7 @@ pathbrowser.py # Create path browser window. percolator.py # Manage delegator stack (nim). pyparse.py # Give information on code indentation pyshell.py # Start IDLE, manage shell, complete editor window -query.py # Query user for informtion +query.py # Query user for information redirector.py # Intercept widget subcommands (for percolator) (nim). replace.py # Search and replace pattern in text. rpc.py # Commuicate between idle and user processes (nim). diff --git a/Lib/idlelib/help.html b/Lib/idlelib/help.html index 1357289fff6c..b2d8fdcbb95d 100644 --- a/Lib/idlelib/help.html +++ b/Lib/idlelib/help.html @@ -497,7 +497,7 @@