Skip to content

Commit

Permalink
Issue python#27895: Spelling fixes (Contributed by Ville Skyttä).
Browse files Browse the repository at this point in the history
  • Loading branch information
rhettinger committed Aug 30, 2016
1 parent 613debc commit 15f44ab
Show file tree
Hide file tree
Showing 72 changed files with 121 additions and 121 deletions.
2 changes: 1 addition & 1 deletion Doc/library/datetime.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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)).
Expand Down
2 changes: 1 addition & 1 deletion Doc/library/email.contentmanager.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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*.
2 changes: 1 addition & 1 deletion Doc/library/idle.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions Doc/library/smtpd.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion Doc/whatsnew/3.3.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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`.)

Expand Down
2 changes: 1 addition & 1 deletion Include/abstract.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion Include/bytesobject.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion Include/pymath.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Lib/asyncio/streams.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Lib/concurrent/futures/process.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion Lib/concurrent/futures/thread.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion Lib/distutils/tests/test_msvc9compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'))
Expand Down
6 changes: 3 additions & 3 deletions Lib/email/contentmanager.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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)
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Lib/email/generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions Lib/email/header.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]+:')



Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Lib/email/message.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion Lib/http/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Lib/idlelib/README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down
2 changes: 1 addition & 1 deletion Lib/idlelib/help.html
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,7 @@ <h3>25.5.3.1. Command line usage<a class="headerlink" href="#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
Expand Down
2 changes: 1 addition & 1 deletion Lib/idlelib/idle_test/test_paragraph.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ def test_find_paragraph(self):
class ReformatFunctionTest(unittest.TestCase):
"""Test the reformat_paragraph function without the editor window."""

def test_reformat_paragrah(self):
def test_reformat_paragraph(self):
Equal = self.assertEqual
reform = fp.reformat_paragraph
hw = "O hello world"
Expand Down
2 changes: 1 addition & 1 deletion Lib/shutil.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class ReadError(OSError):

class RegistryError(Exception):
"""Raised when a registry operation with the archiving
and unpacking registeries fails"""
and unpacking registries fails"""


def copyfileobj(fsrc, fdst, length=16*1024):
Expand Down
2 changes: 1 addition & 1 deletion Lib/statistics.py
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ def bignum_nroot(x, n):
"""Return the nth root of a positive huge number."""
assert x > 0
# I state without proof that ⁿ√x ≈ ⁿ√2·ⁿ√(x//2)
# and that for sufficiently big x the error is acceptible.
# and that for sufficiently big x the error is acceptable.
# We now halve x until it is small enough to get the root.
m = 0
while True:
Expand Down
2 changes: 1 addition & 1 deletion Lib/test/_test_multiprocessing.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
_multiprocessing = test.support.import_module('_multiprocessing')
# Skip tests if sem_open implementation is broken.
test.support.import_module('multiprocessing.synchronize')
# import threading after _multiprocessing to raise a more revelant error
# import threading after _multiprocessing to raise a more relevant error
# message: "No module named _multiprocessing". _multiprocessing is not compiled
# without thread support.
import threading
Expand Down
2 changes: 1 addition & 1 deletion Lib/test/datetimetester.py
Original file line number Diff line number Diff line change
Expand Up @@ -3958,7 +3958,7 @@ def test_bug_1028306(self):
self.assertRaises(TypeError, lambda: as_date >= as_datetime)
self.assertRaises(TypeError, lambda: as_datetime >= as_date)

# Neverthelss, comparison should work with the base-class (date)
# Nevertheless, comparison should work with the base-class (date)
# projection if use of a date method is forced.
self.assertEqual(as_date.__eq__(as_datetime), True)
different_day = (as_date.day + 1) % 20 + 1
Expand Down
4 changes: 2 additions & 2 deletions Lib/test/test_asyncio/test_locks.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,8 @@ def test_acquire_cancel(self):
def test_cancel_race(self):
# Several tasks:
# - A acquires the lock
# - B is blocked in aqcuire()
# - C is blocked in aqcuire()
# - B is blocked in acquire()
# - C is blocked in acquire()
#
# Now, concurrently:
# - B is cancelled
Expand Down
2 changes: 1 addition & 1 deletion Lib/test/test_concurrent_futures.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
test.support.import_module('_multiprocessing')
# Skip tests if sem_open implementation is broken.
test.support.import_module('multiprocessing.synchronize')
# import threading after _multiprocessing to raise a more revelant error
# import threading after _multiprocessing to raise a more relevant error
# message: "No module named _multiprocessing". _multiprocessing is not compiled
# without thread support.
test.support.import_module('threading')
Expand Down
2 changes: 1 addition & 1 deletion Lib/test/test_descr.py
Original file line number Diff line number Diff line change
Expand Up @@ -876,7 +876,7 @@ def foo(self):
self.assertEqual(Frag().__int__(), 42)
self.assertEqual(int(Frag()), 42)

def test_diamond_inheritence(self):
def test_diamond_inheritance(self):
# Testing multiple inheritance special cases...
class A(object):
def spam(self): return "A"
Expand Down
12 changes: 6 additions & 6 deletions Lib/test/test_difflib.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,17 +122,17 @@ def test_added_tab_hint(self):
"""

patch914575_from2 = """
\t\tLine 1: preceeded by from:[tt] to:[ssss]
\t\tLine 2: preceeded by from:[sstt] to:[sssst]
\t \tLine 3: preceeded by from:[sstst] to:[ssssss]
\t\tLine 1: preceded by from:[tt] to:[ssss]
\t\tLine 2: preceded by from:[sstt] to:[sssst]
\t \tLine 3: preceded by from:[sstst] to:[ssssss]
Line 4: \thas from:[sst] to:[sss] after :
Line 5: has from:[t] to:[ss] at end\t
"""

patch914575_to2 = """
Line 1: preceeded by from:[tt] to:[ssss]
\tLine 2: preceeded by from:[sstt] to:[sssst]
Line 3: preceeded by from:[sstst] to:[ssssss]
Line 1: preceded by from:[tt] to:[ssss]
\tLine 2: preceded by from:[sstt] to:[sssst]
Line 3: preceded by from:[sstst] to:[ssssss]
Line 4: has from:[sst] to:[sss] after :
Line 5: has from:[t] to:[ss] at end
"""
Expand Down
Loading

0 comments on commit 15f44ab

Please sign in to comment.