Skip to content

Commit

Permalink
Fix miscellaneous typos (#4275)
Browse files Browse the repository at this point in the history
  • Loading branch information
luzpaz authored and serhiy-storchaka committed Nov 5, 2017
1 parent cf29653 commit a5293b4
Show file tree
Hide file tree
Showing 50 changed files with 82 additions and 82 deletions.
2 changes: 1 addition & 1 deletion Doc/library/asyncio-task.rst
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ Task
running in different threads. While a task waits for the completion of a
future, the event loop executes a new task.

The cancellation of a task is different from the cancelation of a
The cancellation of a task is different from the cancellation of a
future. Calling :meth:`cancel` will throw a
:exc:`~concurrent.futures.CancelledError` to the wrapped
coroutine. :meth:`~Future.cancelled` only returns ``True`` if the
Expand Down
2 changes: 1 addition & 1 deletion Doc/library/sys.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1336,7 +1336,7 @@ always available.
| | * ``None`` if this information is unknown |
+------------------+---------------------------------------------------------+
| :const:`version` | Name and version of the thread library. It is a string, |
| | or ``None`` if these informations are unknown. |
| | or ``None`` if this information is unknown. |
+------------------+---------------------------------------------------------+

.. versionadded:: 3.3
Expand Down
2 changes: 1 addition & 1 deletion Doc/library/unittest.mock.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2374,7 +2374,7 @@ Sealing mocks
any new attribute on the sealed mock. The sealing process is performed recursively.

If a mock instance is assigned to an attribute instead of being dynamically created
it wont be considered in the sealing chain. This allows to prevent seal from fixing
it won't be considered in the sealing chain. This allows to prevent seal from fixing
part of the mock object.

>>> mock = Mock()
Expand Down
2 changes: 1 addition & 1 deletion Doc/whatsnew/3.1.rst
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ modules. The :mod:`configparser` module uses them by default. This lets
configuration files be read, modified, and then written back in their original
order. The *_asdict()* method for :func:`collections.namedtuple` now
returns an ordered dictionary with the values appearing in the same order as
the underlying tuple indicies. The :mod:`json` module is being built-out with
the underlying tuple indices. The :mod:`json` module is being built-out with
an *object_pairs_hook* to allow OrderedDicts to be built by the decoder.
Support was also added for third-party tools like `PyYAML <http://pyyaml.org/>`_.

Expand Down
6 changes: 3 additions & 3 deletions Doc/whatsnew/3.3.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1504,7 +1504,7 @@ argument taking an iterable of handlers to be added to the root logger.
A class level attribute :attr:`~logging.handlers.SysLogHandler.append_nul` has
been added to :class:`~logging.handlers.SysLogHandler` to allow control of the
appending of the ``NUL`` (``\000``) byte to syslog records, since for some
deamons it is required while for others it is passed through to the log.
daemons it is required while for others it is passed through to the log.



Expand Down Expand Up @@ -2003,7 +2003,7 @@ sys
---

The :mod:`sys` module has a new :data:`~sys.thread_info` :term:`struct
sequence` holding informations about the thread implementation
sequence` holding information about the thread implementation
(:issue:`11223`).


Expand Down Expand Up @@ -2040,7 +2040,7 @@ class instance, are now classes and may be subclassed. (Contributed by Éric
Araujo in :issue:`10968`.)

The :class:`threading.Thread` constructor now accepts a ``daemon`` keyword
argument to override the default behavior of inheriting the ``deamon`` flag
argument to override the default behavior of inheriting the ``daemon`` flag
value from the parent thread (:issue:`6064`).

The formerly private function ``_thread.get_ident`` is now available as the
Expand Down
2 changes: 1 addition & 1 deletion Include/object.h
Original file line number Diff line number Diff line change
Expand Up @@ -604,7 +604,7 @@ introducing new functionality between major revisions (to avoid mid-version
changes in the PYTHON_API_VERSION).
Arbitration of the flag bit positions will need to be coordinated among
all extension writers who publically release their extensions (this will
all extension writers who publicly release their extensions (this will
be fewer than you might expect!)..
Most flags were removed as of Python 3.0 to make room for new flags. (Some
Expand Down
22 changes: 11 additions & 11 deletions Include/pymem.h
Original file line number Diff line number Diff line change
Expand Up @@ -132,11 +132,11 @@ PyAPI_FUNC(char *) _PyMem_Strdup(const char *str);
*/

#define PyMem_New(type, n) \
( ((size_t)(n) > PY_SSIZE_T_MAX / sizeof(type)) ? NULL : \
( (type *) PyMem_Malloc((n) * sizeof(type)) ) )
( ((size_t)(n) > PY_SSIZE_T_MAX / sizeof(type)) ? NULL : \
( (type *) PyMem_Malloc((n) * sizeof(type)) ) )
#define PyMem_NEW(type, n) \
( ((size_t)(n) > PY_SSIZE_T_MAX / sizeof(type)) ? NULL : \
( (type *) PyMem_MALLOC((n) * sizeof(type)) ) )
( ((size_t)(n) > PY_SSIZE_T_MAX / sizeof(type)) ? NULL : \
( (type *) PyMem_MALLOC((n) * sizeof(type)) ) )

/*
* The value of (p) is always clobbered by this macro regardless of success.
Expand All @@ -145,17 +145,17 @@ PyAPI_FUNC(char *) _PyMem_Strdup(const char *str);
* caller's memory error handler to not lose track of it.
*/
#define PyMem_Resize(p, type, n) \
( (p) = ((size_t)(n) > PY_SSIZE_T_MAX / sizeof(type)) ? NULL : \
(type *) PyMem_Realloc((p), (n) * sizeof(type)) )
( (p) = ((size_t)(n) > PY_SSIZE_T_MAX / sizeof(type)) ? NULL : \
(type *) PyMem_Realloc((p), (n) * sizeof(type)) )
#define PyMem_RESIZE(p, type, n) \
( (p) = ((size_t)(n) > PY_SSIZE_T_MAX / sizeof(type)) ? NULL : \
(type *) PyMem_REALLOC((p), (n) * sizeof(type)) )
( (p) = ((size_t)(n) > PY_SSIZE_T_MAX / sizeof(type)) ? NULL : \
(type *) PyMem_REALLOC((p), (n) * sizeof(type)) )

/* PyMem{Del,DEL} are left over from ancient days, and shouldn't be used
* anymore. They're just confusing aliases for PyMem_{Free,FREE} now.
*/
#define PyMem_Del PyMem_Free
#define PyMem_DEL PyMem_FREE
#define PyMem_Del PyMem_Free
#define PyMem_DEL PyMem_FREE

#ifndef Py_LIMITED_API
typedef enum {
Expand Down Expand Up @@ -212,7 +212,7 @@ PyAPI_FUNC(void) PyMem_SetAllocator(PyMemAllocatorDomain domain,
- PyObject_Malloc(), PyObject_Realloc() and PyObject_Free()
Newly allocated memory is filled with the byte 0xCB, freed memory is filled
with the byte 0xDB. Additionnal checks:
with the byte 0xDB. Additional checks:
- detect API violations, ex: PyObject_Free() called on a buffer allocated
by PyMem_Malloc()
Expand Down
2 changes: 1 addition & 1 deletion Lib/hashlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ def prf(msg, inner=inner, outer=outer):
from_bytes = int.from_bytes
while len(dkey) < dklen:
prev = prf(salt + loop.to_bytes(4, 'big'))
# endianess doesn't matter here as long to / from use the same
# endianness doesn't matter here as long to / from use the same
rkey = int.from_bytes(prev, 'big')
for i in range(iterations - 1):
prev = prf(prev)
Expand Down
2 changes: 1 addition & 1 deletion Lib/idlelib/NEWS.txt
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ extension.cfg. All take effect as soon as one clicks Apply or Ok.
'<<zoom-height>>'. Any (global) customizations made before 3.6.3 will
not affect their keyset-specific customization after 3.6.3. and vice
versa.
Inital patch by Charles Wohlganger, revised by Terry Jan Reedy.
Initial patch by Charles Wohlganger, revised by Terry Jan Reedy.

bpo-31051: Rearrange condigdialog General tab.
Sort non-Help options into Window (Shell+Editor) and Editor (only).
Expand Down
2 changes: 1 addition & 1 deletion Lib/idlelib/browser.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class ModuleBrowser:
"""Browse module classes and functions in IDLE.
"""
# This class is also the base class for pathbrowser.PathBrowser.
# Init and close are inherited, other methods are overriden.
# Init and close are inherited, other methods are overridden.
# PathBrowser.__init__ does not call __init__ below.

def __init__(self, master, path, *, _htest=False, _utest=False):
Expand Down
4 changes: 2 additions & 2 deletions Lib/idlelib/idle_test/test_replace.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,14 @@ def test_replace_simple(self):
replace()
equal(text.get('1.8', '1.12'), 'asdf')

# dont "match word" case
# don't "match word" case
text.mark_set('insert', '1.0')
pv.set('is')
rv.set('hello')
replace()
equal(text.get('1.2', '1.7'), 'hello')

# dont "match case" case
# don't "match case" case
pv.set('string')
rv.set('world')
replace()
Expand Down
2 changes: 1 addition & 1 deletion Lib/idlelib/paragraph.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ def reformat_comment(data, limit, comment_header):
newdata = reformat_paragraph(data, format_width)
# re-split and re-insert the comment header.
newdata = newdata.split("\n")
# If the block ends in a \n, we dont want the comment prefix
# If the block ends in a \n, we don't want the comment prefix
# inserted after it. (Im not sure it makes sense to reformat a
# comment block that is not made of complete lines, but whatever!)
# Can't think of a clean solution, so we hack away
Expand Down
2 changes: 1 addition & 1 deletion Lib/numbers.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class Complex(Number):
In short, those are: a conversion to complex, .real, .imag, +, -,
*, /, abs(), .conjugate, ==, and !=.
If it is given heterogenous arguments, and doesn't have special
If it is given heterogeneous arguments, and doesn't have special
knowledge about them, it should fall back to the builtin complex
type as described below.
"""
Expand Down
2 changes: 1 addition & 1 deletion Lib/subprocess.py
Original file line number Diff line number Diff line change
Expand Up @@ -751,7 +751,7 @@ def __init__(self, args, bufsize=-1, executable=None,
@property
def universal_newlines(self):
# universal_newlines as retained as an alias of text_mode for API
# compatability. bpo-31756
# compatibility. bpo-31756
return self.text_mode

@universal_newlines.setter
Expand Down
4 changes: 2 additions & 2 deletions Lib/test/pythoninfo.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
Collect various informations about Python to help debugging test failures.
Collect various information about Python to help debugging test failures.
"""
from __future__ import print_function
import errno
Expand Down Expand Up @@ -40,7 +40,7 @@ def add(self, key, value):

def get_infos(self):
"""
Get informations as a key:value dictionary where values are strings.
Get information as a key:value dictionary where values are strings.
"""
return {key: str(value) for key, value in self.info.items()}

Expand Down
2 changes: 1 addition & 1 deletion Lib/test/support/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2770,7 +2770,7 @@ def __init__(self):
import signal
self.signal = signal
self.signals = list(range(1, signal.NSIG))
# SIGKILL and SIGSTOP signals cannot be ignored nor catched
# SIGKILL and SIGSTOP signals cannot be ignored nor caught
for signame in ('SIGKILL', 'SIGSTOP'):
try:
signum = getattr(signal, signame)
Expand Down
4 changes: 2 additions & 2 deletions Lib/test/test_codecmaps_kr.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ class TestJOHABMap(multibytecodec_support.TestBase_Mapping,
encoding = 'johab'
mapfileurl = 'http://www.pythontest.net/unicode/JOHAB.TXT'
# KS X 1001 standard assigned 0x5c as WON SIGN.
# but, in early 90s that is the only era used johab widely,
# the most softwares implements it as REVERSE SOLIDUS.
# But the early 90s is the only era that used johab widely,
# most software implements it as REVERSE SOLIDUS.
# So, we ignore the standard here.
pass_enctest = [(b'\\', '\u20a9')]
pass_dectest = [(b'\\', '\u20a9')]
Expand Down
2 changes: 1 addition & 1 deletion Lib/test/test_exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -943,7 +943,7 @@ def test_recursion_normalizing_exception(self):
# equal to recursion_limit in PyErr_NormalizeException() and check
# that a ResourceWarning is printed.
# Prior to #22898, the recursivity of PyErr_NormalizeException() was
# controled by tstate->recursion_depth and a PyExc_RecursionErrorInst
# controlled by tstate->recursion_depth and a PyExc_RecursionErrorInst
# singleton was being used in that case, that held traceback data and
# locals indefinitely and would cause a segfault in _PyExc_Fini() upon
# finalization of these locals.
Expand Down
2 changes: 1 addition & 1 deletion Lib/test/test_hash.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ class StringlikeHashRandomizationTests(HashRandomizationTests):
[-678966196, 573763426263223372, -820489388, -4282905804826039665],
],
'siphash24': [
# NOTE: PyUCS2 layout depends on endianess
# NOTE: PyUCS2 layout depends on endianness
# seed 0, 'abc'
[1198583518, 4596069200710135518, 1198583518, 4596069200710135518],
# seed 42, 'abc'
Expand Down
2 changes: 1 addition & 1 deletion Lib/test/test_imp.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ def test_issue5604(self):
# Martin von Loewis note what shared library cannot have non-ascii
# character because init_xxx function cannot be compiled
# and issue never happens for dynamic modules.
# But sources modified to follow generic way for processing pathes.
# But sources modified to follow generic way for processing paths.

# the return encoding could be uppercase or None
fs_encoding = sys.getfilesystemencoding()
Expand Down
2 changes: 1 addition & 1 deletion Lib/test/test_ordered_dict.py
Original file line number Diff line number Diff line change
Expand Up @@ -683,7 +683,7 @@ def test_sizeof_exact(self):
nodesize = calcsize('Pn2P')

od = OrderedDict()
check(od, basicsize + 8*p + 8 + 5*entrysize) # 8byte indicies + 8*2//3 * entry table
check(od, basicsize + 8*p + 8 + 5*entrysize) # 8byte indices + 8*2//3 * entry table
od.x = 1
check(od, basicsize + 8*p + 8 + 5*entrysize)
od.update([(i, i) for i in range(3)])
Expand Down
2 changes: 1 addition & 1 deletion Lib/test/test_socket.py
Original file line number Diff line number Diff line change
Expand Up @@ -4675,7 +4675,7 @@ def testTimeoutZero(self):
'test needs signal.alarm()')
def testInterruptedTimeout(self):
# XXX I don't know how to do this test on MSWindows or any other
# plaform that doesn't support signal.alarm() or os.kill(), though
# platform that doesn't support signal.alarm() or os.kill(), though
# the bug should have existed on all platforms.
self.serv.settimeout(5.0) # must be longer than alarm
class Alarm(Exception):
Expand Down
2 changes: 1 addition & 1 deletion Lib/test/test_threading.py
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ def test_repr_daemon(self):
t.daemon = True
self.assertIn('daemon', repr(t))

def test_deamon_param(self):
def test_daemon_param(self):
t = threading.Thread()
self.assertFalse(t.daemon)
t = threading.Thread(daemon=False)
Expand Down
2 changes: 1 addition & 1 deletion Lib/test/test_unicode_file.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Test some Unicode file name semantics
# We dont test many operations on files other than
# We don't test many operations on files other than
# that their names can be used with Unicode characters.
import os, glob, time, shutil
import unicodedata
Expand Down
6 changes: 3 additions & 3 deletions Lib/test/test_unicode_file_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
'7_\u05d4\u05e9\u05e7\u05e6\u05e5\u05e1',
'8_\u66e8\u66e9\u66eb',
'9_\u66e8\u05e9\u3093\u0434\u0393\xdf',
# Specific code points: fn, NFC(fn) and NFKC(fn) all differents
# Specific code points: fn, NFC(fn) and NFKC(fn) all different
'10_\u1fee\u1ffd',
]

Expand All @@ -29,13 +29,13 @@
# U+2FAFF are not decomposed."
if sys.platform != 'darwin':
filenames.extend([
# Specific code points: NFC(fn), NFD(fn), NFKC(fn) and NFKD(fn) all differents
# Specific code points: NFC(fn), NFD(fn), NFKC(fn) and NFKD(fn) all different
'11_\u0385\u03d3\u03d4',
'12_\u00a8\u0301\u03d2\u0301\u03d2\u0308', # == NFD('\u0385\u03d3\u03d4')
'13_\u0020\u0308\u0301\u038e\u03ab', # == NFKC('\u0385\u03d3\u03d4')
'14_\u1e9b\u1fc1\u1fcd\u1fce\u1fcf\u1fdd\u1fde\u1fdf\u1fed',

# Specific code points: fn, NFC(fn) and NFKC(fn) all differents
# Specific code points: fn, NFC(fn) and NFKC(fn) all different
'15_\u1fee\u1ffd\ufad1',
'16_\u2000\u2000\u2000A',
'17_\u2001\u2001\u2001A',
Expand Down
2 changes: 1 addition & 1 deletion Lib/test/test_zipfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -1864,7 +1864,7 @@ class LzmaTestsWithRandomBinaryFiles(AbstractTestsWithRandomBinaryFiles,
compression = zipfile.ZIP_LZMA


# Privide the tell() method but not seek()
# Provide the tell() method but not seek()
class Tellable:
def __init__(self, fp):
self.fp = fp
Expand Down
2 changes: 1 addition & 1 deletion Lib/turtle.py
Original file line number Diff line number Diff line change
Expand Up @@ -2194,7 +2194,7 @@ def color(self, *args):
If turtleshape is a polygon, outline and interior of that polygon
is drawn with the newly set colors.
For mor info see: pencolor, fillcolor
For more info see: pencolor, fillcolor
Example (for a Turtle instance named turtle):
>>> turtle.color('red', 'green')
Expand Down
2 changes: 1 addition & 1 deletion Lib/unittest/test/test_case.py
Original file line number Diff line number Diff line change
Expand Up @@ -942,7 +942,7 @@ def testAssertCountEqual(self):
[], [divmod, 'x', 1, 5j, 2j, frozenset()])
# comparing dicts
self.assertCountEqual([{'a': 1}, {'b': 2}], [{'b': 2}, {'a': 1}])
# comparing heterogenous non-hashable sequences
# comparing heterogeneous non-hashable sequences
self.assertCountEqual([1, 'x', divmod, []], [divmod, [], 'x', 1])
self.assertRaises(self.failureException, self.assertCountEqual,
[], [divmod, [], 'x', 1, 5j, 2j, set()])
Expand Down
2 changes: 1 addition & 1 deletion Makefile.pre.in
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ profile-run-stamp:
# Remove profile generation binary since we are done with it.
$(MAKE) clean
# This is an expensive target to build and it does not have proper
# makefile dependancy information. So, we create a "stamp" file
# makefile dependency information. So, we create a "stamp" file
# to record its completion and avoid re-running it.
touch $@

Expand Down
10 changes: 5 additions & 5 deletions Misc/HISTORY
Original file line number Diff line number Diff line change
Expand Up @@ -9752,7 +9752,7 @@ Library
- Issue #11382: Trivial system calls, such as dup() or pipe(), needn't
release the GIL. Patch by Charles-François Natali.

- Issue #11223: Add threading._info() function providing informations about
- Issue #11223: Add threading._info() function providing information about
the thread implementation.

- Issue #11731: simplify/enhance email parser/generator API by introducing
Expand Down Expand Up @@ -29642,7 +29642,7 @@ of the object in the message.
- Fixed a bug in list.sort() that would occasionally dump core.

- Fixed a bug in PyNumber_Power() that caused numeric arrays to fail
when taken tothe real power.
when taken to the real power.

- Fixed a number of bugs in the file reading code, at least one of
which could cause a core dump on NT, and one of which would
Expand Down Expand Up @@ -29689,7 +29689,7 @@ thanks to Charles Waldman.
- Many nits fixed in the manuals, thanks to Fred Drake and many others
(especially Rob Hooft and Andrew Kuchling). The HTML version now uses
HTML markup instead of inline GIF images for tables; only two images
are left (for obsure bits of math). The index of the HTML version has
are left (for obscure bits of math). The index of the HTML version has
also been much improved. Finally, it is once again possible to
generate an Emacs info file from the library manual (but I don't
commit to supporting this in future versions).
Expand Down Expand Up @@ -30341,7 +30341,7 @@ http://grail.cnri.reston.va.us/python/essays/packages.html
for more info.

- Changes to standard library subdirectory names: those subdirectories
that are not packages have been renamed with a hypen in their name,
that are not packages have been renamed with a hyphen in their name,
e.g. lib-tk, lib-stdwin, plat-win, plat-linux2, plat-sunos5, dos-8x3.
The test suite is now a package -- to run a test, you must now use
"import test.test_foo".
Expand Down Expand Up @@ -34181,7 +34181,7 @@ You need STDWIN version 0.9.7 (released 30 June 1992) for the stdwin
interface

Dynamic loading is now supported for Sun (and other non-COFF systems)
throug dld-3.2.3, as well as for SGI (a new version of Jack Jansen's
through dld-3.2.3, as well as for SGI (a new version of Jack Jansen's
DL is out, 1.4)

The system-dependent code for the use of the select() system call is
Expand Down
Loading

0 comments on commit a5293b4

Please sign in to comment.