Skip to content

Commit 15f44ab

Browse files
committed
Issue python#27895: Spelling fixes (Contributed by Ville Skyttä).
1 parent 613debc commit 15f44ab

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+121
-121
lines changed

Doc/library/datetime.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -1842,7 +1842,7 @@ Note that the :class:`datetime` instances that differ only by the value of the
18421842
:attr:`~datetime.fold` attribute are considered equal in comparisons.
18431843

18441844
Applications that can't bear wall-time ambiguities should explicitly check the
1845-
value of the :attr:`~datetime.fold` atribute or avoid using hybrid
1845+
value of the :attr:`~datetime.fold` attribute or avoid using hybrid
18461846
:class:`tzinfo` subclasses; there are no ambiguities when using :class:`timezone`,
18471847
or any other fixed-offset :class:`tzinfo` subclass (such as a class representing
18481848
only EST (fixed offset -5 hours), or only EDT (fixed offset -4 hours)).

Doc/library/email.contentmanager.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -433,5 +433,5 @@ Currently the email package provides only one concrete content manager,
433433

434434
If *headers* is specified and is a list of strings of the form
435435
``headername: headervalue`` or a list of ``header`` objects
436-
(distinguised from strings by having a ``name`` attribute), add the
436+
(distinguished from strings by having a ``name`` attribute), add the
437437
headers to *msg*.

Doc/library/idle.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -531,7 +531,7 @@ Command line usage
531531
-c command run command in the shell window
532532
-d enable debugger and open shell window
533533
-e open editor window
534-
-h print help message with legal combinatios and exit
534+
-h print help message with legal combinations and exit
535535
-i open shell window
536536
-r file run file in shell window
537537
-s run $IDLESTARTUP or $PYTHONSTARTUP first, in shell window

Doc/library/smtpd.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ SMTPServer Objects
4444
dictionary is a suitable value). If not specified the :mod:`asyncore`
4545
global socket map is used.
4646

47-
*enable_SMTPUTF8* determins whether the ``SMTPUTF8`` extension (as defined
47+
*enable_SMTPUTF8* determines whether the ``SMTPUTF8`` extension (as defined
4848
in :RFC:`6531`) should be enabled. The default is ``False``.
4949
When ``True``, ``SMTPUTF8`` is accepted as a parameter to the ``MAIL``
5050
command and when present is passed to :meth:`process_message` in the
@@ -162,7 +162,7 @@ SMTPChannel Objects
162162
accepted in a ``DATA`` command. A value of ``None`` or ``0`` means no
163163
limit.
164164

165-
*enable_SMTPUTF8* determins whether the ``SMTPUTF8`` extension (as defined
165+
*enable_SMTPUTF8* determines whether the ``SMTPUTF8`` extension (as defined
166166
in :RFC:`6531`) should be enabled. The default is ``False``.
167167
*decode_data* and *enable_SMTPUTF8* cannot be set to ``True`` at the same
168168
time.

Doc/whatsnew/3.3.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -1954,7 +1954,7 @@ ssl
19541954
:attr:`~ssl.OP_NO_COMPRESSION` can be used to disable compression.
19551955
(Contributed by Antoine Pitrou in :issue:`13634`.)
19561956

1957-
* Support has been added for the Next Procotol Negotiation extension using
1957+
* Support has been added for the Next Protocol Negotiation extension using
19581958
the :meth:`ssl.SSLContext.set_npn_protocols` method.
19591959
(Contributed by Colin Marc in :issue:`14204`.)
19601960

Include/abstract.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,7 @@ xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx*/
487487
/* old buffer API
488488
FIXME: usage of these should all be replaced in Python itself
489489
but for backwards compatibility we will implement them.
490-
Their usage without a corresponding "unlock" mechansim
490+
Their usage without a corresponding "unlock" mechanism
491491
may create issues (but they would already be there). */
492492

493493
PyAPI_FUNC(int) PyObject_AsCharBuffer(PyObject *obj,

Include/bytesobject.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ PyAPI_FUNC(Py_ssize_t) _PyBytes_InsertThousandsGrouping(char *buffer,
131131
#define F_ZERO (1<<4)
132132

133133
#ifndef Py_LIMITED_API
134-
/* The _PyBytesWriter structure is big: it contains an embeded "stack buffer".
134+
/* The _PyBytesWriter structure is big: it contains an embedded "stack buffer".
135135
A _PyBytesWriter variable must be declared at the end of variables in a
136136
function to optimize the memory allocation on the stack. */
137137
typedef struct {

Include/pymath.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ extern double pow(double, double);
3737
#endif /* __STDC__ */
3838
#endif /* _MSC_VER */
3939

40-
/* High precision defintion of pi and e (Euler)
40+
/* High precision definition of pi and e (Euler)
4141
* The values are taken from libc6's math.h.
4242
*/
4343
#ifndef Py_MATH_PIl

Lib/asyncio/streams.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -590,7 +590,7 @@ def read(self, n=-1):
590590
bytes. If the EOF was received and the internal buffer is empty, return
591591
an empty bytes object.
592592
593-
If n is zero, return empty bytes object immediatelly.
593+
If n is zero, return empty bytes object immediately.
594594
595595
If n is positive, this function try to read `n` bytes, and may return
596596
less or equal bytes than requested, but at least one byte. If EOF was

Lib/concurrent/futures/process.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
# interpreter to exit when there are still idle processes in a
6464
# ProcessPoolExecutor's process pool (i.e. shutdown() was not called). However,
6565
# allowing workers to die with the interpreter has two undesirable properties:
66-
# - The workers would still be running during interpretor shutdown,
66+
# - The workers would still be running during interpreter shutdown,
6767
# meaning that they would fail in unpredictable ways.
6868
# - The workers could be killed while evaluating a work item, which could
6969
# be bad if the callable being evaluated has external side-effects e.g.

Lib/concurrent/futures/thread.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
# to exit when there are still idle threads in a ThreadPoolExecutor's thread
1717
# pool (i.e. shutdown() was not called). However, allowing workers to die with
1818
# the interpreter has two undesirable properties:
19-
# - The workers would still be running during interpretor shutdown,
19+
# - The workers would still be running during interpreter shutdown,
2020
# meaning that they would fail in unpredictable ways.
2121
# - The workers could be killed while evaluating a work item, which could
2222
# be bad if the callable being evaluated has external side-effects e.g.

Lib/distutils/tests/test_msvc9compiler.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ def test_reg_class(self):
125125
self.assertRaises(KeyError, Reg.get_value, 'xxx', 'xxx')
126126

127127
# looking for values that should exist on all
128-
# windows registeries versions.
128+
# windows registry versions.
129129
path = r'Control Panel\Desktop'
130130
v = Reg.get_value(path, 'dragfullwindows')
131131
self.assertIn(v, ('0', '1', '2'))

Lib/email/contentmanager.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ def _encode_base64(data, max_line_length):
141141
def _encode_text(string, charset, cte, policy):
142142
lines = string.encode(charset).splitlines()
143143
linesep = policy.linesep.encode('ascii')
144-
def embeded_body(lines): return linesep.join(lines) + linesep
144+
def embedded_body(lines): return linesep.join(lines) + linesep
145145
def normal_body(lines): return b'\n'.join(lines) + b'\n'
146146
if cte==None:
147147
# Use heuristics to decide on the "best" encoding.
@@ -152,7 +152,7 @@ def normal_body(lines): return b'\n'.join(lines) + b'\n'
152152
if (policy.cte_type == '8bit' and
153153
max(len(x) for x in lines) <= policy.max_line_length):
154154
return '8bit', normal_body(lines).decode('ascii', 'surrogateescape')
155-
sniff = embeded_body(lines[:10])
155+
sniff = embedded_body(lines[:10])
156156
sniff_qp = quoprimime.body_encode(sniff.decode('latin-1'),
157157
policy.max_line_length)
158158
sniff_base64 = binascii.b2a_base64(sniff)
@@ -171,7 +171,7 @@ def normal_body(lines): return b'\n'.join(lines) + b'\n'
171171
data = quoprimime.body_encode(normal_body(lines).decode('latin-1'),
172172
policy.max_line_length)
173173
elif cte == 'base64':
174-
data = _encode_base64(embeded_body(lines), policy.max_line_length)
174+
data = _encode_base64(embedded_body(lines), policy.max_line_length)
175175
else:
176176
raise ValueError("Unknown content transfer encoding {}".format(cte))
177177
return cte, data

Lib/email/generator.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ def flatten(self, msg, unixfrom=False, linesep=None):
9797
self._NL = policy.linesep
9898
self._encoded_NL = self._encode(self._NL)
9999
self._EMPTY = ''
100-
self._encoded_EMTPY = self._encode('')
100+
self._encoded_EMPTY = self._encode('')
101101
# Because we use clone (below) when we recursively process message
102102
# subparts, and because clone uses the computed policy (not None),
103103
# submessages will automatically get set to the computed policy when

Lib/email/header.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949

5050
# Find a header embedded in a putative header value. Used to check for
5151
# header injection attack.
52-
_embeded_header = re.compile(r'\n[^ \t]+:')
52+
_embedded_header = re.compile(r'\n[^ \t]+:')
5353

5454

5555

@@ -385,7 +385,7 @@ def encode(self, splitchars=';, \t', maxlinelen=None, linesep='\n'):
385385
if self._chunks:
386386
formatter.add_transition()
387387
value = formatter._str(linesep)
388-
if _embeded_header.search(value):
388+
if _embedded_header.search(value):
389389
raise HeaderParseError("header value appears to contain "
390390
"an embedded header: {!r}".format(value))
391391
return value

Lib/email/message.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1043,7 +1043,7 @@ def iter_attachments(self):
10431043
yield from parts
10441044
return
10451045
# Otherwise we more or less invert the remaining logic in get_body.
1046-
# This only really works in edge cases (ex: non-text relateds or
1046+
# This only really works in edge cases (ex: non-text related or
10471047
# alternatives) if the sending agent sets content-disposition.
10481048
seen = [] # Only skip the first example of each candidate type.
10491049
for part in parts:

Lib/http/client.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@
136136
#
137137
# VCHAR defined in http://tools.ietf.org/html/rfc5234#appendix-B.1
138138

139-
# the patterns for both name and value are more leniant than RFC
139+
# the patterns for both name and value are more lenient than RFC
140140
# definitions to allow for backwards compatibility
141141
_is_legal_header_name = re.compile(rb'[^:\s][^:\r\n]*').fullmatch
142142
_is_illegal_header_value = re.compile(rb'\n(?![ \t])|\r(?![ \t\n])').search

Lib/idlelib/README.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ pathbrowser.py # Create path browser window.
6565
percolator.py # Manage delegator stack (nim).
6666
pyparse.py # Give information on code indentation
6767
pyshell.py # Start IDLE, manage shell, complete editor window
68-
query.py # Query user for informtion
68+
query.py # Query user for information
6969
redirector.py # Intercept widget subcommands (for percolator) (nim).
7070
replace.py # Search and replace pattern in text.
7171
rpc.py # Commuicate between idle and user processes (nim).

Lib/idlelib/help.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -497,7 +497,7 @@ <h3>25.5.3.1. Command line usage<a class="headerlink" href="#command-line-usage"
497497
-c command run command in the shell window
498498
-d enable debugger and open shell window
499499
-e open editor window
500-
-h print help message with legal combinatios and exit
500+
-h print help message with legal combinations and exit
501501
-i open shell window
502502
-r file run file in shell window
503503
-s run $IDLESTARTUP or $PYTHONSTARTUP first, in shell window

Lib/idlelib/idle_test/test_paragraph.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ def test_find_paragraph(self):
159159
class ReformatFunctionTest(unittest.TestCase):
160160
"""Test the reformat_paragraph function without the editor window."""
161161

162-
def test_reformat_paragrah(self):
162+
def test_reformat_paragraph(self):
163163
Equal = self.assertEqual
164164
reform = fp.reformat_paragraph
165165
hw = "O hello world"

Lib/shutil.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ class ReadError(OSError):
6464

6565
class RegistryError(Exception):
6666
"""Raised when a registry operation with the archiving
67-
and unpacking registeries fails"""
67+
and unpacking registries fails"""
6868

6969

7070
def copyfileobj(fsrc, fdst, length=16*1024):

Lib/statistics.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -454,7 +454,7 @@ def bignum_nroot(x, n):
454454
"""Return the nth root of a positive huge number."""
455455
assert x > 0
456456
# I state without proof that ⁿ√x ≈ ⁿ√2·ⁿ√(x//2)
457-
# and that for sufficiently big x the error is acceptible.
457+
# and that for sufficiently big x the error is acceptable.
458458
# We now halve x until it is small enough to get the root.
459459
m = 0
460460
while True:

Lib/test/_test_multiprocessing.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
_multiprocessing = test.support.import_module('_multiprocessing')
2727
# Skip tests if sem_open implementation is broken.
2828
test.support.import_module('multiprocessing.synchronize')
29-
# import threading after _multiprocessing to raise a more revelant error
29+
# import threading after _multiprocessing to raise a more relevant error
3030
# message: "No module named _multiprocessing". _multiprocessing is not compiled
3131
# without thread support.
3232
import threading

Lib/test/datetimetester.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -3958,7 +3958,7 @@ def test_bug_1028306(self):
39583958
self.assertRaises(TypeError, lambda: as_date >= as_datetime)
39593959
self.assertRaises(TypeError, lambda: as_datetime >= as_date)
39603960

3961-
# Neverthelss, comparison should work with the base-class (date)
3961+
# Nevertheless, comparison should work with the base-class (date)
39623962
# projection if use of a date method is forced.
39633963
self.assertEqual(as_date.__eq__(as_datetime), True)
39643964
different_day = (as_date.day + 1) % 20 + 1

Lib/test/test_asyncio/test_locks.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,8 @@ def test_acquire_cancel(self):
130130
def test_cancel_race(self):
131131
# Several tasks:
132132
# - A acquires the lock
133-
# - B is blocked in aqcuire()
134-
# - C is blocked in aqcuire()
133+
# - B is blocked in acquire()
134+
# - C is blocked in acquire()
135135
#
136136
# Now, concurrently:
137137
# - B is cancelled

Lib/test/test_concurrent_futures.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
test.support.import_module('_multiprocessing')
55
# Skip tests if sem_open implementation is broken.
66
test.support.import_module('multiprocessing.synchronize')
7-
# import threading after _multiprocessing to raise a more revelant error
7+
# import threading after _multiprocessing to raise a more relevant error
88
# message: "No module named _multiprocessing". _multiprocessing is not compiled
99
# without thread support.
1010
test.support.import_module('threading')

Lib/test/test_descr.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -876,7 +876,7 @@ def foo(self):
876876
self.assertEqual(Frag().__int__(), 42)
877877
self.assertEqual(int(Frag()), 42)
878878

879-
def test_diamond_inheritence(self):
879+
def test_diamond_inheritance(self):
880880
# Testing multiple inheritance special cases...
881881
class A(object):
882882
def spam(self): return "A"

Lib/test/test_difflib.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -122,17 +122,17 @@ def test_added_tab_hint(self):
122122
"""
123123

124124
patch914575_from2 = """
125-
\t\tLine 1: preceeded by from:[tt] to:[ssss]
126-
\t\tLine 2: preceeded by from:[sstt] to:[sssst]
127-
\t \tLine 3: preceeded by from:[sstst] to:[ssssss]
125+
\t\tLine 1: preceded by from:[tt] to:[ssss]
126+
\t\tLine 2: preceded by from:[sstt] to:[sssst]
127+
\t \tLine 3: preceded by from:[sstst] to:[ssssss]
128128
Line 4: \thas from:[sst] to:[sss] after :
129129
Line 5: has from:[t] to:[ss] at end\t
130130
"""
131131

132132
patch914575_to2 = """
133-
Line 1: preceeded by from:[tt] to:[ssss]
134-
\tLine 2: preceeded by from:[sstt] to:[sssst]
135-
Line 3: preceeded by from:[sstst] to:[ssssss]
133+
Line 1: preceded by from:[tt] to:[ssss]
134+
\tLine 2: preceded by from:[sstt] to:[sssst]
135+
Line 3: preceded by from:[sstst] to:[ssssss]
136136
Line 4: has from:[sst] to:[sss] after :
137137
Line 5: has from:[t] to:[ss] at end
138138
"""

0 commit comments

Comments
 (0)