mirror of
https://github.com/python/cpython
synced 2024-09-05 00:05:39 +00:00
Fix typos in multiple files (GH-26689)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
This commit is contained in:
parent
736ed6f7a9
commit
17b16e13bb
|
@ -47,7 +47,7 @@ def aix_platform():
|
||||||
# type: () -> str
|
# type: () -> str
|
||||||
"""
|
"""
|
||||||
AIX filesets are identified by four decimal values: V.R.M.F.
|
AIX filesets are identified by four decimal values: V.R.M.F.
|
||||||
V (version) and R (release) can be retreived using ``uname``
|
V (version) and R (release) can be retrieved using ``uname``
|
||||||
Since 2007, starting with AIX 5.3 TL7, the M value has been
|
Since 2007, starting with AIX 5.3 TL7, the M value has been
|
||||||
included with the fileset bos.rte and represents the Technology
|
included with the fileset bos.rte and represents the Technology
|
||||||
Level (TL) of AIX. The F (Fix) value also increases, but is not
|
Level (TL) of AIX. The F (Fix) value also increases, but is not
|
||||||
|
|
|
@ -1334,7 +1334,7 @@ def visit_UnaryOp(self, node):
|
||||||
operator_precedence = self.unop_precedence[operator]
|
operator_precedence = self.unop_precedence[operator]
|
||||||
with self.require_parens(operator_precedence, node):
|
with self.require_parens(operator_precedence, node):
|
||||||
self.write(operator)
|
self.write(operator)
|
||||||
# factor prefixes (+, -, ~) shouldn't be seperated
|
# factor prefixes (+, -, ~) shouldn't be separated
|
||||||
# from the value they belong, (e.g: +1 instead of + 1)
|
# from the value they belong, (e.g: +1 instead of + 1)
|
||||||
if operator_precedence is not _Precedence.FACTOR:
|
if operator_precedence is not _Precedence.FACTOR:
|
||||||
self.write(" ")
|
self.write(" ")
|
||||||
|
|
|
@ -221,7 +221,7 @@ def resume_reading(self):
|
||||||
length = self._pending_data_length
|
length = self._pending_data_length
|
||||||
self._pending_data_length = -1
|
self._pending_data_length = -1
|
||||||
if length > -1:
|
if length > -1:
|
||||||
# Call the protocol methode after calling _loop_reading(),
|
# Call the protocol method after calling _loop_reading(),
|
||||||
# since the protocol can decide to pause reading again.
|
# since the protocol can decide to pause reading again.
|
||||||
self._loop.call_soon(self._data_received, self._data[:length], length)
|
self._loop.call_soon(self._data_received, self._data[:length], length)
|
||||||
|
|
||||||
|
|
|
@ -224,7 +224,7 @@ async def __aexit__(self, typ, value, traceback):
|
||||||
# was passed to throw() and later wrapped into a RuntimeError
|
# was passed to throw() and later wrapped into a RuntimeError
|
||||||
# (see PEP 479 for sync generators; async generators also
|
# (see PEP 479 for sync generators; async generators also
|
||||||
# have this behavior). But do this only if the exception wrapped
|
# have this behavior). But do this only if the exception wrapped
|
||||||
# by the RuntimeError is actully Stop(Async)Iteration (see
|
# by the RuntimeError is actually Stop(Async)Iteration (see
|
||||||
# issue29692).
|
# issue29692).
|
||||||
if isinstance(value, (StopIteration, StopAsyncIteration)):
|
if isinstance(value, (StopIteration, StopAsyncIteration)):
|
||||||
if exc.__cause__ is value:
|
if exc.__cause__ is value:
|
||||||
|
|
|
@ -1100,7 +1100,7 @@ def _process_class(cls, init, repr, eq, order, unsafe_hash, frozen,
|
||||||
|
|
||||||
|
|
||||||
# _dataclass_getstate and _dataclass_setstate are needed for pickling frozen
|
# _dataclass_getstate and _dataclass_setstate are needed for pickling frozen
|
||||||
# classes with slots. These could be slighly more performant if we generated
|
# classes with slots. These could be slightly more performant if we generated
|
||||||
# the code instead of iterating over fields. But that can be a project for
|
# the code instead of iterating over fields. But that can be a project for
|
||||||
# another day, if performance becomes an issue.
|
# another day, if performance becomes an issue.
|
||||||
def _dataclass_getstate(self):
|
def _dataclass_getstate(self):
|
||||||
|
|
|
@ -704,7 +704,7 @@ def send_head(self):
|
||||||
# The test for this was added in test_httpserver.py
|
# The test for this was added in test_httpserver.py
|
||||||
# However, some OS platforms accept a trailingSlash as a filename
|
# However, some OS platforms accept a trailingSlash as a filename
|
||||||
# See discussion on python-dev and Issue34711 regarding
|
# See discussion on python-dev and Issue34711 regarding
|
||||||
# parseing and rejection of filenames with a trailing slash
|
# parsing and rejection of filenames with a trailing slash
|
||||||
if path.endswith("/"):
|
if path.endswith("/"):
|
||||||
self.send_error(HTTPStatus.NOT_FOUND, "File not found")
|
self.send_error(HTTPStatus.NOT_FOUND, "File not found")
|
||||||
return None
|
return None
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
default values. For 'highlight' and 'keys', user sections augment the
|
default values. For 'highlight' and 'keys', user sections augment the
|
||||||
default sections (and must, therefore, have distinct names).
|
default sections (and must, therefore, have distinct names).
|
||||||
|
|
||||||
Throughout this module there is an emphasis on returning useable defaults
|
Throughout this module there is an emphasis on returning usable defaults
|
||||||
when a problem occurs in returning a requested configuration value back to
|
when a problem occurs in returning a requested configuration value back to
|
||||||
idle. This is to allow IDLE to continue to function in spite of errors in
|
idle. This is to allow IDLE to continue to function in spite of errors in
|
||||||
the retrieval of config information. When a default is returned instead of
|
the retrieval of config information. When a default is returned instead of
|
||||||
|
|
|
@ -29,7 +29,7 @@ def __init__(self, text):
|
||||||
text.bind("<<history-next>>", self.history_next)
|
text.bind("<<history-next>>", self.history_next)
|
||||||
|
|
||||||
def history_next(self, event):
|
def history_next(self, event):
|
||||||
"Fetch later statement; start with ealiest if cyclic."
|
"Fetch later statement; start with earliest if cyclic."
|
||||||
self.fetch(reverse=False)
|
self.fetch(reverse=False)
|
||||||
return "break"
|
return "break"
|
||||||
|
|
||||||
|
|
|
@ -1178,7 +1178,7 @@ def __hash__(self):
|
||||||
return hash(self.name) ^ hash(self.path)
|
return hash(self.name) ^ hash(self.path)
|
||||||
|
|
||||||
def create_module(self, spec):
|
def create_module(self, spec):
|
||||||
"""Create an unitialized extension module"""
|
"""Create an uninitialized extension module"""
|
||||||
module = _bootstrap._call_with_frames_removed(
|
module = _bootstrap._call_with_frames_removed(
|
||||||
_imp.create_dynamic, spec)
|
_imp.create_dynamic, spec)
|
||||||
_bootstrap._verbose_message('extension module {!r} loaded from {!r}',
|
_bootstrap._verbose_message('extension module {!r} loaded from {!r}',
|
||||||
|
|
|
@ -943,7 +943,7 @@ def wait(object_list, timeout=None):
|
||||||
return ready
|
return ready
|
||||||
|
|
||||||
#
|
#
|
||||||
# Make connection and socket objects sharable if possible
|
# Make connection and socket objects shareable if possible
|
||||||
#
|
#
|
||||||
|
|
||||||
if sys.platform == 'win32':
|
if sys.platform == 'win32':
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
If called from the command line, it prints the platform
|
If called from the command line, it prints the platform
|
||||||
information concatenated as single string to stdout. The output
|
information concatenated as single string to stdout. The output
|
||||||
format is useable as part of a filename.
|
format is usable as part of a filename.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
# This module is maintained by Marc-Andre Lemburg <mal@egenix.com>.
|
# This module is maintained by Marc-Andre Lemburg <mal@egenix.com>.
|
||||||
|
@ -169,7 +169,7 @@ def libc_ver(executable=None, lib='', version='', chunksize=16384):
|
||||||
|
|
||||||
Note that the function has intimate knowledge of how different
|
Note that the function has intimate knowledge of how different
|
||||||
libc versions add symbols to the executable and thus is probably
|
libc versions add symbols to the executable and thus is probably
|
||||||
only useable for executables compiled using gcc.
|
only usable for executables compiled using gcc.
|
||||||
|
|
||||||
The file is read and scanned in chunks of chunksize bytes.
|
The file is read and scanned in chunks of chunksize bytes.
|
||||||
|
|
||||||
|
|
|
@ -177,8 +177,8 @@ def parse(self, fileobj):
|
||||||
return self.root
|
return self.root
|
||||||
|
|
||||||
def handle_entity_decl(self, entity_name, is_parameter_entity, value, base, system_id, public_id, notation_name):
|
def handle_entity_decl(self, entity_name, is_parameter_entity, value, base, system_id, public_id, notation_name):
|
||||||
# Reject plist files with entity declarations to avoid XML vulnerabilies in expat.
|
# Reject plist files with entity declarations to avoid XML vulnerabilities in expat.
|
||||||
# Regular plist files don't contain those declerations, and Apple's plutil tool does not
|
# Regular plist files don't contain those declarations, and Apple's plutil tool does not
|
||||||
# accept them either.
|
# accept them either.
|
||||||
raise InvalidFileException("XML entity declarations are not supported in plist files")
|
raise InvalidFileException("XML entity declarations are not supported in plist files")
|
||||||
|
|
||||||
|
|
|
@ -522,7 +522,7 @@ def print_line(self, func): # hack: should print percentages
|
||||||
class TupleComp:
|
class TupleComp:
|
||||||
"""This class provides a generic function for comparing any two tuples.
|
"""This class provides a generic function for comparing any two tuples.
|
||||||
Each instance records a list of tuple-indices (from most significant
|
Each instance records a list of tuple-indices (from most significant
|
||||||
to least significant), and sort direction (ascending or decending) for
|
to least significant), and sort direction (ascending or descending) for
|
||||||
each tuple-index. The compare functions can then be used as the function
|
each tuple-index. The compare functions can then be used as the function
|
||||||
argument to the system sort() function when a list of tuples need to be
|
argument to the system sort() function when a list of tuples need to be
|
||||||
sorted in the instances order."""
|
sorted in the instances order."""
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
socketpair() -- create a pair of new socket objects [*]
|
socketpair() -- create a pair of new socket objects [*]
|
||||||
fromfd() -- create a socket object from an open file descriptor [*]
|
fromfd() -- create a socket object from an open file descriptor [*]
|
||||||
send_fds() -- Send file descriptor to the socket.
|
send_fds() -- Send file descriptor to the socket.
|
||||||
recv_fds() -- Recieve file descriptors from the socket.
|
recv_fds() -- Receive file descriptors from the socket.
|
||||||
fromshare() -- create a socket object from data received from socket.share() [*]
|
fromshare() -- create a socket object from data received from socket.share() [*]
|
||||||
gethostname() -- return the current hostname
|
gethostname() -- return the current hostname
|
||||||
gethostbyname() -- map a hostname to its IP number
|
gethostbyname() -- map a hostname to its IP number
|
||||||
|
|
|
@ -368,7 +368,7 @@ def _ipaddress_match(cert_ipaddress, host_ip):
|
||||||
(section 1.7.2 - "Out of Scope").
|
(section 1.7.2 - "Out of Scope").
|
||||||
"""
|
"""
|
||||||
# OpenSSL may add a trailing newline to a subjectAltName's IP address,
|
# OpenSSL may add a trailing newline to a subjectAltName's IP address,
|
||||||
# commonly woth IPv6 addresses. Strip off trailing \n.
|
# commonly with IPv6 addresses. Strip off trailing \n.
|
||||||
ip = _inet_paton(cert_ipaddress.rstrip())
|
ip = _inet_paton(cert_ipaddress.rstrip())
|
||||||
return ip == host_ip
|
return ip == host_ip
|
||||||
|
|
||||||
|
|
|
@ -2086,7 +2086,7 @@ def send_signal(self, sig):
|
||||||
try:
|
try:
|
||||||
os.kill(self.pid, sig)
|
os.kill(self.pid, sig)
|
||||||
except ProcessLookupError:
|
except ProcessLookupError:
|
||||||
# Supress the race condition error; bpo-40550.
|
# Suppress the race condition error; bpo-40550.
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def terminate(self):
|
def terminate(self):
|
||||||
|
|
|
@ -62,7 +62,7 @@ def __repr__(self):
|
||||||
def get_type(self):
|
def get_type(self):
|
||||||
"""Return the type of the symbol table.
|
"""Return the type of the symbol table.
|
||||||
|
|
||||||
The values retuned are 'class', 'module' and
|
The values returned are 'class', 'module' and
|
||||||
'function'.
|
'function'.
|
||||||
"""
|
"""
|
||||||
if self._table.type == _symtable.TYPE_MODULE:
|
if self._table.type == _symtable.TYPE_MODULE:
|
||||||
|
@ -245,7 +245,7 @@ def is_parameter(self):
|
||||||
return bool(self.__flags & DEF_PARAM)
|
return bool(self.__flags & DEF_PARAM)
|
||||||
|
|
||||||
def is_global(self):
|
def is_global(self):
|
||||||
"""Return *True* if the sysmbol is global.
|
"""Return *True* if the symbol is global.
|
||||||
"""
|
"""
|
||||||
return bool(self.__scope in (GLOBAL_IMPLICIT, GLOBAL_EXPLICIT)
|
return bool(self.__scope in (GLOBAL_IMPLICIT, GLOBAL_EXPLICIT)
|
||||||
or (self.__module_scope and self.__flags & DEF_BOUND))
|
or (self.__module_scope and self.__flags & DEF_BOUND))
|
||||||
|
|
|
@ -5696,7 +5696,7 @@ class C(A):
|
||||||
|
|
||||||
def test_incomplete_extend(self):
|
def test_incomplete_extend(self):
|
||||||
"""
|
"""
|
||||||
Extending an unitialized type with type->tp_mro == NULL must
|
Extending an uninitialized type with type->tp_mro == NULL must
|
||||||
throw a reasonable TypeError exception, instead of failing
|
throw a reasonable TypeError exception, instead of failing
|
||||||
with PyErr_BadInternalCall.
|
with PyErr_BadInternalCall.
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -3826,7 +3826,7 @@ def write_docstringdict(filename="turtle_docstringdict"):
|
||||||
default value is turtle_docstringdict
|
default value is turtle_docstringdict
|
||||||
|
|
||||||
Has to be called explicitly, (not used by the turtle-graphics classes)
|
Has to be called explicitly, (not used by the turtle-graphics classes)
|
||||||
The docstring dictionary will be written to the Python script <filname>.py
|
The docstring dictionary will be written to the Python script <filename>.py
|
||||||
It is intended to serve as a template for translation of the docstrings
|
It is intended to serve as a template for translation of the docstrings
|
||||||
into different languages.
|
into different languages.
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -158,7 +158,7 @@ class DynamicClassAttribute:
|
||||||
attributes on the class with the same name. (Enum used this between Python
|
attributes on the class with the same name. (Enum used this between Python
|
||||||
versions 3.4 - 3.9 .)
|
versions 3.4 - 3.9 .)
|
||||||
|
|
||||||
Subclass from this to use a different method of accessing virtual atributes
|
Subclass from this to use a different method of accessing virtual attributes
|
||||||
and still be treated properly by the inspect module. (Enum uses this since
|
and still be treated properly by the inspect module. (Enum uses this since
|
||||||
Python 3.10 .)
|
Python 3.10 .)
|
||||||
|
|
||||||
|
|
|
@ -2205,7 +2205,7 @@ async def _execute_mock_call(self, /, *args, **kwargs):
|
||||||
try:
|
try:
|
||||||
result = next(effect)
|
result = next(effect)
|
||||||
except StopIteration:
|
except StopIteration:
|
||||||
# It is impossible to propogate a StopIteration
|
# It is impossible to propagate a StopIteration
|
||||||
# through coroutines because of PEP 479
|
# through coroutines because of PEP 479
|
||||||
raise StopAsyncIteration
|
raise StopAsyncIteration
|
||||||
if _is_exception(result):
|
if _is_exception(result):
|
||||||
|
|
|
@ -1187,12 +1187,12 @@ static int
|
||||||
verify_end_of_number(struct tok_state *tok, int c, const char *kind)
|
verify_end_of_number(struct tok_state *tok, int c, const char *kind)
|
||||||
{
|
{
|
||||||
/* Emit a deprecation warning only if the numeric literal is immediately
|
/* Emit a deprecation warning only if the numeric literal is immediately
|
||||||
* followed by one of keywords which can occurr after a numeric literal
|
* followed by one of keywords which can occur after a numeric literal
|
||||||
* in valid code: "and", "else", "for", "if", "in", "is" and "or".
|
* in valid code: "and", "else", "for", "if", "in", "is" and "or".
|
||||||
* It allows to gradually deprecate existing valid code without adding
|
* It allows to gradually deprecate existing valid code without adding
|
||||||
* warning before error in most cases of invalid numeric literal (which
|
* warning before error in most cases of invalid numeric literal (which
|
||||||
* would be confusiong and break existing tests).
|
* would be confusing and break existing tests).
|
||||||
* Raise a syntax error with slighly better message than plain
|
* Raise a syntax error with slightly better message than plain
|
||||||
* "invalid syntax" if the numeric literal is immediately followed by
|
* "invalid syntax" if the numeric literal is immediately followed by
|
||||||
* other keyword or identifier.
|
* other keyword or identifier.
|
||||||
*/
|
*/
|
||||||
|
|
1984
Python/importlib_external.h
generated
1984
Python/importlib_external.h
generated
File diff suppressed because it is too large
Load diff
|
@ -128,21 +128,21 @@ VERSION=PYTHON_VERSION
|
||||||
AC_SUBST(SOVERSION)
|
AC_SUBST(SOVERSION)
|
||||||
SOVERSION=1.0
|
SOVERSION=1.0
|
||||||
|
|
||||||
# The later defininition of _XOPEN_SOURCE disables certain features
|
# The later definition of _XOPEN_SOURCE disables certain features
|
||||||
# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
|
# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
|
||||||
AC_DEFINE(_GNU_SOURCE, 1, [Define on Linux to activate all library features])
|
AC_DEFINE(_GNU_SOURCE, 1, [Define on Linux to activate all library features])
|
||||||
|
|
||||||
# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
|
# The later definition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
|
||||||
# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
|
# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
|
||||||
# them.
|
# them.
|
||||||
AC_DEFINE(_NETBSD_SOURCE, 1, [Define on NetBSD to activate all library features])
|
AC_DEFINE(_NETBSD_SOURCE, 1, [Define on NetBSD to activate all library features])
|
||||||
|
|
||||||
# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
|
# The later definition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
|
||||||
# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
|
# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
|
||||||
# them.
|
# them.
|
||||||
AC_DEFINE(__BSD_VISIBLE, 1, [Define on FreeBSD to activate all library features])
|
AC_DEFINE(__BSD_VISIBLE, 1, [Define on FreeBSD to activate all library features])
|
||||||
|
|
||||||
# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
|
# The later definition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
|
||||||
# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
|
# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
|
||||||
# them.
|
# them.
|
||||||
AC_DEFINE(_DARWIN_C_SOURCE, 1, [Define on Darwin to activate all library features])
|
AC_DEFINE(_DARWIN_C_SOURCE, 1, [Define on Darwin to activate all library features])
|
||||||
|
|
Loading…
Reference in a new issue