# HG changeset patch # Parent e0212060c80e96a8fb39d3542956fb49e583946c Issue #27076: Doc and comment spelling fixes Most fixes to Doc/ and Lib/ directories by Ville Skyttä. Issue #27076: Fix spelling in test function name diff -r e0212060c80e Doc/glossary.rst --- a/Doc/glossary.rst Fri May 20 17:44:44 2016 -0400 +++ b/Doc/glossary.rst Sat May 21 11:52:26 2016 +0000 @@ -177,7 +177,7 @@ A buffer is considered contiguous exactly if it is either *C-contiguous* or *Fortran contiguous*. Zero-dimensional buffers are C and Fortran contiguous. In one-dimensional arrays, the items - must be layed out in memory next to each other, in order of + must be laid out in memory next to each other, in order of increasing indexes starting from zero. In multidimensional C-contiguous arrays, the last index varies the fastest when visiting items in order of memory address. However, in diff -r e0212060c80e Doc/library/datetime.rst --- a/Doc/library/datetime.rst Fri May 20 17:44:44 2016 -0400 +++ b/Doc/library/datetime.rst Sat May 21 11:52:26 2016 +0000 @@ -2079,7 +2079,7 @@ Similar to ``%U`` and ``%W``, ``%V`` is only used in calculations when the day of the week and the ISO year (``%G``) are specified in a :meth:`strptime` format string. Also note that ``%G`` and ``%Y`` are not - interchangable. + interchangeable. .. rubric:: Footnotes diff -r e0212060c80e Doc/library/imaplib.rst --- a/Doc/library/imaplib.rst Fri May 20 17:44:44 2016 -0400 +++ b/Doc/library/imaplib.rst Sat May 21 11:52:26 2016 +0000 @@ -507,7 +507,7 @@ allowed creation of such tags, and popular IMAP servers, such as Gmail, accept and produce such flags. There are non-Python programs which also create such tags. Although it is an RFC violation and IMAP clients and - servers are supposed to be strict, imaplib nontheless continues to allow + servers are supposed to be strict, imaplib nonetheless continues to allow such tags to be created for backward compatibility reasons, and as of python 3.6, handles them if they are sent from the server, since this improves real-world compatibility. diff -r e0212060c80e Lib/_osx_support.py --- a/Lib/_osx_support.py Fri May 20 17:44:44 2016 -0400 +++ b/Lib/_osx_support.py Sat May 21 11:52:26 2016 +0000 @@ -151,7 +151,7 @@ # can only be found inside Xcode.app if the "Command Line Tools" # are not installed. # - # Futhermore, the compiler that can be used varies between + # Furthermore, the compiler that can be used varies between # Xcode releases. Up to Xcode 4 it was possible to use 'gcc-4.2' # as the compiler, after that 'clang' should be used because # gcc-4.2 is either not present, or a copy of 'llvm-gcc' that diff -r e0212060c80e Lib/asyncio/sslproto.py --- a/Lib/asyncio/sslproto.py Fri May 20 17:44:44 2016 -0400 +++ b/Lib/asyncio/sslproto.py Sat May 21 11:52:26 2016 +0000 @@ -604,7 +604,7 @@ self._wakeup_waiter() self._session_established = True # In case transport.write() was already called. Don't call - # immediatly _process_write_backlog(), but schedule it: + # immediately _process_write_backlog(), but schedule it: # _on_handshake_complete() can be called indirectly from # _process_write_backlog(), and _process_write_backlog() is not # reentrant. diff -r e0212060c80e Lib/cgi.py --- a/Lib/cgi.py Fri May 20 17:44:44 2016 -0400 +++ b/Lib/cgi.py Sat May 21 11:52:26 2016 +0000 @@ -184,7 +184,7 @@ # parse query string function called from urlparse, -# this is done in order to maintain backward compatiblity. +# this is done in order to maintain backward compatibility. def parse_qs(qs, keep_blank_values=0, strict_parsing=0): """Parse a query given as a string argument.""" diff -r e0212060c80e Lib/collections/__init__.py --- a/Lib/collections/__init__.py Fri May 20 17:44:44 2016 -0400 +++ b/Lib/collections/__init__.py Sat May 21 11:52:26 2016 +0000 @@ -365,7 +365,7 @@ >>> x, y = p # unpack like a regular tuple >>> x, y (11, 22) - >>> p.x + p.y # fields also accessable by name + >>> p.x + p.y # fields also accessible by name 33 >>> d = p._asdict() # convert to a dictionary >>> d['x'] diff -r e0212060c80e Lib/dis.py --- a/Lib/dis.py Fri May 20 17:44:44 2016 -0400 +++ b/Lib/dis.py Sat May 21 11:52:26 2016 +0000 @@ -296,7 +296,7 @@ argrepr = '' if arg is not None: # Set argval to the dereferenced value of the argument when - # availabe, and argrepr to the string representation of argval. + # available, and argrepr to the string representation of argval. # _disassemble_bytes needs the string repr of the # raw name index for LOAD_GLOBAL, LOAD_CONST, etc. argval = arg diff -r e0212060c80e Lib/distutils/msvc9compiler.py --- a/Lib/distutils/msvc9compiler.py Fri May 20 17:44:44 2016 -0400 +++ b/Lib/distutils/msvc9compiler.py Sat May 21 11:52:26 2016 +0000 @@ -51,7 +51,7 @@ # A map keyed by get_platform() return values to values accepted by # 'vcvarsall.bat'. Note a cross-compile may combine these (eg, 'x86_amd64' is -# the param to cross-compile on x86 targetting amd64.) +# the param to cross-compile on x86 targeting amd64.) PLAT_TO_VCVARS = { 'win32' : 'x86', 'win-amd64' : 'amd64', diff -r e0212060c80e Lib/distutils/tests/test_unixccompiler.py --- a/Lib/distutils/tests/test_unixccompiler.py Fri May 20 17:44:44 2016 -0400 +++ b/Lib/distutils/tests/test_unixccompiler.py Sat May 21 11:52:26 2016 +0000 @@ -126,7 +126,7 @@ self.assertEqual(self.cc.linker_so[0], 'my_cc') @unittest.skipUnless(sys.platform == 'darwin', 'test only relevant for OS X') - def test_osx_explict_ldshared(self): + def test_osx_explicit_ldshared(self): # Issue #18080: # ensure that setting CC env variable does not change # explicit LDSHARED setting for linker diff -r e0212060c80e Lib/email/_header_value_parser.py --- a/Lib/email/_header_value_parser.py Fri May 20 17:44:44 2016 -0400 +++ b/Lib/email/_header_value_parser.py Sat May 21 11:52:26 2016 +0000 @@ -2872,7 +2872,7 @@ _find_mime_parameters(ctype, value) return ctype ctype.append(token) - # XXX: If we really want to follow the formal grammer we should make + # XXX: If we really want to follow the formal grammar we should make # mantype and subtype specialized TokenLists here. Probably not worth it. if not value or value[0] != '/': ctype.defects.append(errors.InvalidHeaderDefect( diff -r e0212060c80e Lib/email/parser.py --- a/Lib/email/parser.py Fri May 20 17:44:44 2016 -0400 +++ b/Lib/email/parser.py Sat May 21 11:52:26 2016 +0000 @@ -23,7 +23,7 @@ textual representation of the message. The string must be formatted as a block of RFC 2822 headers and header - continuation lines, optionally preceeded by a `Unix-from' header. The + continuation lines, optionally preceded by a `Unix-from' header. The header block is terminated either by the end of the string or by a blank line. @@ -87,7 +87,7 @@ textual representation of the message. The input must be formatted as a block of RFC 2822 headers and header - continuation lines, optionally preceeded by a `Unix-from' header. The + continuation lines, optionally preceded by a `Unix-from' header. The header block is terminated either by the end of the input or by a blank line. diff -r e0212060c80e Lib/encodings/utf_16.py --- a/Lib/encodings/utf_16.py Fri May 20 17:44:44 2016 -0400 +++ b/Lib/encodings/utf_16.py Sat May 21 11:52:26 2016 +0000 @@ -73,7 +73,7 @@ self.decoder = None def getstate(self): - # additonal state info from the base class must be None here, + # additional state info from the base class must be None here, # as it isn't passed along to the caller state = codecs.BufferedIncrementalDecoder.getstate(self)[0] # additional state info we pass to the caller: diff -r e0212060c80e Lib/encodings/utf_32.py --- a/Lib/encodings/utf_32.py Fri May 20 17:44:44 2016 -0400 +++ b/Lib/encodings/utf_32.py Sat May 21 11:52:26 2016 +0000 @@ -68,7 +68,7 @@ self.decoder = None def getstate(self): - # additonal state info from the base class must be None here, + # additional state info from the base class must be None here, # as it isn't passed along to the caller state = codecs.BufferedIncrementalDecoder.getstate(self)[0] # additional state info we pass to the caller: diff -r e0212060c80e Lib/html/parser.py --- a/Lib/html/parser.py Fri May 20 17:44:44 2016 -0400 +++ b/Lib/html/parser.py Sat May 21 11:52:26 2016 +0000 @@ -143,7 +143,7 @@ # or there's more text incoming. If the latter is True, # we can't pass the text to handle_data in case we have # a charref cut in half at end. Try to determine if - # this is the case before proceding by looking for an + # this is the case before proceeding by looking for an # & near the end and see if it's followed by a space or ;. amppos = rawdata.rfind('&', max(i, n-34)) if (amppos >= 0 and diff -r e0212060c80e Lib/http/cookies.py --- a/Lib/http/cookies.py Fri May 20 17:44:44 2016 -0400 +++ b/Lib/http/cookies.py Sat May 21 11:52:26 2016 +0000 @@ -156,7 +156,7 @@ # a two-way quoting algorithm. Any non-text character is translated # into a 4 character sequence: a forward-slash followed by the # three-digit octal equivalent of the character. Any '\' or '"' is -# quoted with a preceeding '\' slash. +# quoted with a preceding '\' slash. # Because of the way browsers really handle cookies (as opposed to what # the RFC says) we also encode "," and ";". # diff -r e0212060c80e Lib/importlib/_bootstrap.py --- a/Lib/importlib/_bootstrap.py Fri May 20 17:44:44 2016 -0400 +++ b/Lib/importlib/_bootstrap.py Sat May 21 11:52:26 2016 +0000 @@ -1065,7 +1065,7 @@ def __import__(name, globals=None, locals=None, fromlist=(), level=0): """Import a module. - The 'globals' argument is used to infer where the import is occuring from + The 'globals' argument is used to infer where the import is occurring from to handle relative imports. The 'locals' argument is ignored. The 'fromlist' argument specifies what should exist as attributes on the module being imported (e.g. ``from module import ``). The 'level' diff -r e0212060c80e Lib/lib2to3/btm_utils.py --- a/Lib/lib2to3/btm_utils.py Fri May 20 17:44:44 2016 -0400 +++ b/Lib/lib2to3/btm_utils.py Sat May 21 11:52:26 2016 +0000 @@ -215,7 +215,7 @@ #reduce to None new_node = None elif repeater_node.children[0].value == '+': - #reduce to a single occurence i.e. do nothing + #reduce to a single occurrence i.e. do nothing pass else: #TODO: handle {min, max} repeaters diff -r e0212060c80e Lib/lib2to3/fixes/fix_metaclass.py --- a/Lib/lib2to3/fixes/fix_metaclass.py Fri May 20 17:44:44 2016 -0400 +++ b/Lib/lib2to3/fixes/fix_metaclass.py Sat May 21 11:52:26 2016 +0000 @@ -25,7 +25,7 @@ def has_metaclass(parent): """ we have to check the cls_node without changing it. - There are two possiblities: + There are two possibilities: 1) clsdef => suite => simple_stmt => expr_stmt => Leaf('__meta') 2) clsdef => simple_stmt => expr_stmt => Leaf('__meta') """ diff -r e0212060c80e Lib/lib2to3/patcomp.py --- a/Lib/lib2to3/patcomp.py Fri May 20 17:44:44 2016 -0400 +++ b/Lib/lib2to3/patcomp.py Sat May 21 11:52:26 2016 +0000 @@ -3,7 +3,7 @@ """Pattern compiler. -The grammer is taken from PatternGrammar.txt. +The grammar is taken from PatternGrammar.txt. The compiler compiles a pattern to a pytree.*Pattern instance. """ diff -r e0212060c80e Lib/locale.py --- a/Lib/locale.py Fri May 20 17:44:44 2016 -0400 +++ b/Lib/locale.py Sat May 21 11:52:26 2016 +0000 @@ -1455,7 +1455,7 @@ 0x1809: "en_IE", # English - Ireland 0x1c09: "en_ZA", # English - South Africa 0x2009: "en_JA", # English - Jamaica - 0x2409: "en_CB", # English - Carribbean + 0x2409: "en_CB", # English - Caribbean 0x2809: "en_BZ", # English - Belize 0x2c09: "en_TT", # English - Trinidad 0x3009: "en_ZW", # English - Zimbabwe diff -r e0212060c80e Lib/msilib/schema.py --- a/Lib/msilib/schema.py Fri May 20 17:44:44 2016 -0400 +++ b/Lib/msilib/schema.py Sat May 21 11:52:26 2016 +0000 @@ -731,7 +731,7 @@ ('CustomAction','Type','N',1,16383,None, None, None, None, 'The numeric custom action type, consisting of source location, code type, entry, option flags.',), ('CustomAction','Action','N',None, None, None, None, 'Identifier',None, 'Primary key, name of action, normally appears in sequence table unless private use.',), ('CustomAction','Source','Y',None, None, None, None, 'CustomSource',None, 'The table reference of the source of the code.',), -('CustomAction','Target','Y',None, None, None, None, 'Formatted',None, 'Excecution parameter, depends on the type of custom action',), +('CustomAction','Target','Y',None, None, None, None, 'Formatted',None, 'Execution parameter, depends on the type of custom action',), ('DrLocator','Signature_','N',None, None, None, None, 'Identifier',None, 'The Signature_ represents a unique file signature and is also the foreign key in the Signature table.',), ('DrLocator','Path','Y',None, None, None, None, 'AnyPath',None, 'The path on the user system. This is either a subpath below the value of the Parent or a full path. The path may contain properties enclosed within [ ] that will be expanded.',), ('DrLocator','Depth','Y',0,32767,None, None, None, None, 'The depth below the path to which the Signature_ is recursively searched. If absent, the depth is assumed to be 0.',), diff -r e0212060c80e Lib/numbers.py --- a/Lib/numbers.py Fri May 20 17:44:44 2016 -0400 +++ b/Lib/numbers.py Sat May 21 11:52:26 2016 +0000 @@ -35,7 +35,7 @@ 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. """ diff -r e0212060c80e Lib/pdb.py --- a/Lib/pdb.py Fri May 20 17:44:44 2016 -0400 +++ b/Lib/pdb.py Sat May 21 11:52:26 2016 +0000 @@ -300,7 +300,7 @@ # An 'Internal StopIteration' exception is an exception debug event # issued by the interpreter when handling a subgenerator run with - # 'yield from' or a generator controled by a for loop. No exception has + # 'yield from' or a generator controlled by a for loop. No exception has # actually occurred in this case. The debugger uses this debug event to # stop when the debuggee is returning from such generators. prefix = 'Internal ' if (not exc_traceback diff -r e0212060c80e Lib/pickle.py --- a/Lib/pickle.py Fri May 20 17:44:44 2016 -0400 +++ b/Lib/pickle.py Sat May 21 11:52:26 2016 +0000 @@ -1002,7 +1002,7 @@ meets this interface. Optional keyword arguments are *fix_imports*, *encoding* and - *errors*, which are used to control compatiblity support for + *errors*, which are used to control compatibility support for pickle stream generated by Python 2. If *fix_imports* is True, pickle will try to map the old Python 2 names to the new names used in Python 3. The *encoding* and *errors* tell pickle how diff -r e0212060c80e Lib/statistics.py --- a/Lib/statistics.py Fri May 20 17:44:44 2016 -0400 +++ b/Lib/statistics.py Sat May 21 11:52:26 2016 +0000 @@ -430,9 +430,9 @@ L = float(x) - float(interval)/2 # Uses bisection search to search for x in data with log(n) time complexity - # Find the position of leftmost occurence of x in data + # Find the position of leftmost occurrence of x in data l1 = _find_lteq(data, x) - # Find the position of rightmost occurence of x in data[l1...len(data)] + # Find the position of rightmost occurrence of x in data[l1...len(data)] # Assuming always l1 <= l2 l2 = _find_rteq(data, l1, x) cf = l1 diff -r e0212060c80e Lib/test/cfgparser.2 --- a/Lib/test/cfgparser.2 Fri May 20 17:44:44 2016 -0400 +++ b/Lib/test/cfgparser.2 Sat May 21 11:52:26 2016 +0000 @@ -282,7 +282,7 @@ # either /etc/hosts OR DNS or NIS depending on the settings of # /etc/host.config, /etc/nsswitch.conf # and the /etc/resolv.conf file. "host" therefore is system -# configuration dependant. This parameter is most often of use to +# configuration dependent. This parameter is most often of use to # prevent DNS lookups # in order to resolve NetBIOS names to IP Addresses. Use with care! # The example below excludes use of name resolution for machines that diff -r e0212060c80e Lib/test/datetimetester.py --- a/Lib/test/datetimetester.py Fri May 20 17:44:44 2016 -0400 +++ b/Lib/test/datetimetester.py Sat May 21 11:52:26 2016 +0000 @@ -1228,7 +1228,7 @@ #self.assertRaises(ValueError, t.strftime, "%#") #oh well, some systems just ignore those invalid ones. - #at least, excercise them to make sure that no crashes + #at least, exercise them to make sure that no crashes #are generated for f in ["%e", "%", "%#"]: try: @@ -2513,7 +2513,7 @@ self.theclass(bytes([1] * len(base)), 'EST') # A mixin for classes with a tzinfo= argument. Subclasses must define -# theclass as a class atribute, and theclass(1, 1, 1, tzinfo=whatever) +# theclass as a class attribute, and theclass(1, 1, 1, tzinfo=whatever) # must be legit (which is true for time and datetime). class TZInfoBase: diff -r e0212060c80e Lib/test/test_asyncio/test_subprocess.py --- a/Lib/test/test_asyncio/test_subprocess.py Fri May 20 17:44:44 2016 -0400 +++ b/Lib/test/test_asyncio/test_subprocess.py Sat May 21 11:52:26 2016 +0000 @@ -407,7 +407,7 @@ transport, protocol = yield from create proc = transport.get_extra_info('subprocess') - # kill the process (but asyncio is not notified immediatly) + # kill the process (but asyncio is not notified immediately) proc.kill() proc.wait() diff -r e0212060c80e Lib/test/test_capi.py --- a/Lib/test/test_capi.py Fri May 20 17:44:44 2016 -0400 +++ b/Lib/test/test_capi.py Sat May 21 11:52:26 2016 +0000 @@ -464,7 +464,7 @@ test and not for the other, there's a mismatch, and the test fails. ** Some format units have special funny semantics and it would - be difficult to accomodate them here. Since these are all + be difficult to accommodate them here. Since these are all well-established and properly skipped in skipitem() we can get away with not testing them--this test is really intended to catch *new* format units. diff -r e0212060c80e Lib/test/test_concurrent_futures.py --- a/Lib/test/test_concurrent_futures.py Fri May 20 17:44:44 2016 -0400 +++ b/Lib/test/test_concurrent_futures.py Sat May 21 11:52:26 2016 +0000 @@ -676,7 +676,7 @@ self.assertEqual(SUCCESSFUL_FUTURE.result(timeout=0), 42) def test_result_with_success(self): - # TODO(brian@sweetapp.com): This test is timing dependant. + # TODO(brian@sweetapp.com): This test is timing dependent. def notification(): # Wait until the main thread is waiting for the result. time.sleep(1) @@ -689,7 +689,7 @@ self.assertEqual(f1.result(timeout=5), 42) def test_result_with_cancel(self): - # TODO(brian@sweetapp.com): This test is timing dependant. + # TODO(brian@sweetapp.com): This test is timing dependent. def notification(): # Wait until the main thread is waiting for the result. time.sleep(1) diff -r e0212060c80e Lib/test/test_crypt.py --- a/Lib/test/test_crypt.py Fri May 20 17:44:44 2016 -0400 +++ b/Lib/test/test_crypt.py Sat May 21 11:52:26 2016 +0000 @@ -25,7 +25,7 @@ self.assertEqual(len(pw), method.total_size) def test_methods(self): - # Gurantee that METHOD_CRYPT is the last method in crypt.methods. + # Guarantee that METHOD_CRYPT is the last method in crypt.methods. self.assertTrue(len(crypt.methods) >= 1) self.assertEqual(crypt.METHOD_CRYPT, crypt.methods[-1]) diff -r e0212060c80e Lib/test/test_doctest.py --- a/Lib/test/test_doctest.py Fri May 20 17:44:44 2016 -0400 +++ b/Lib/test/test_doctest.py Sat May 21 11:52:26 2016 +0000 @@ -324,7 +324,7 @@ >>> test.lineno + e2.lineno 26 -If the docstring contains inconsistant leading whitespace in the +If the docstring contains inconsistent leading whitespace in the expected output of an example, then `DocTest` will raise a ValueError: >>> docstring = r''' diff -r e0212060c80e Lib/test/test_email/test__header_value_parser.py --- a/Lib/test/test_email/test__header_value_parser.py Fri May 20 17:44:44 2016 -0400 +++ b/Lib/test/test_email/test__header_value_parser.py Sat May 21 11:52:26 2016 +0000 @@ -2498,7 +2498,7 @@ # Note that it is undefined what we should do for error recovery when # there are duplicate parameter names or duplicate parts in a split # part. We choose to ignore all duplicate parameters after the first - # and to take duplicate or missing rfc 2231 parts in apperance order. + # and to take duplicate or missing rfc 2231 parts in appearance order. # This is backward compatible with get_param's behavior, but the # decisions are arbitrary. diff -r e0212060c80e Lib/test/test_email/test_contentmanager.py --- a/Lib/test/test_email/test_contentmanager.py Fri May 20 17:44:44 2016 -0400 +++ b/Lib/test/test_email/test_contentmanager.py Sat May 21 11:52:26 2016 +0000 @@ -621,7 +621,7 @@ self.assertEqual(m.get_content(), content) def test_set_application_octet_stream_with_8bit_cte(self): - # In 8bit mode, univeral line end logic applies. It is up to the + # In 8bit mode, universal line end logic applies. It is up to the # application to make sure the lines are short enough; we don't check. m = self._make_message() content = b'b\xFFgus\tcon\nt\rent\n' + b'z'*60 + b'\n' diff -r e0212060c80e Lib/test/test_functools.py --- a/Lib/test/test_functools.py Fri May 20 17:44:44 2016 -0400 +++ b/Lib/test/test_functools.py Sat May 21 11:52:26 2016 +0000 @@ -1506,7 +1506,7 @@ object]) # MutableSequence below is registered directly on D. In other words, it - # preceeds MutableMapping which means single dispatch will always + # precedes MutableMapping which means single dispatch will always # choose MutableSequence here. class D(c.defaultdict): pass diff -r e0212060c80e Lib/test/test_generators.py --- a/Lib/test/test_generators.py Fri May 20 17:44:44 2016 -0400 +++ b/Lib/test/test_generators.py Sat May 21 11:52:26 2016 +0000 @@ -1351,7 +1351,7 @@ # For each square, compute a bit vector of the columns and # diagonals it covers, and for each row compute a function that - # generates the possiblities for the columns in that row. + # generates the possibilities for the columns in that row. self.rowgenerators = [] for i in rangen: rowuses = [(1 << j) | # column ordinal diff -r e0212060c80e Lib/test/test_hashlib.py --- a/Lib/test/test_hashlib.py Fri May 20 17:44:44 2016 -0400 +++ b/Lib/test/test_hashlib.py Sat May 21 11:52:26 2016 +0000 @@ -449,7 +449,7 @@ pbkdf2_results = { "sha1": [ - # offical test vectors from RFC 6070 + # official test vectors from RFC 6070 (bytes.fromhex('0c60c80f961f0e71f3a9b524af6012062fe037a6'), None), (bytes.fromhex('ea6c014dc72d6f8ccd1ed92ace1d41f0d8de8957'), None), (bytes.fromhex('4b007901b765489abead49d926f721d065a429c1'), None), diff -r e0212060c80e Lib/test/test_http_cookiejar.py --- a/Lib/test/test_http_cookiejar.py Fri May 20 17:44:44 2016 -0400 +++ b/Lib/test/test_http_cookiejar.py Sat May 21 11:52:26 2016 +0000 @@ -1729,7 +1729,7 @@ key = "%s_after" % cookie.value counter[key] = counter[key] + 1 - # a permanent cookie got lost accidently + # a permanent cookie got lost accidentally self.assertEqual(counter["perm_after"], counter["perm_before"]) # a session cookie hasn't been cleared self.assertEqual(counter["session_after"], 0) diff -r e0212060c80e Lib/test/test_httpservers.py --- a/Lib/test/test_httpservers.py Fri May 20 17:44:44 2016 -0400 +++ b/Lib/test/test_httpservers.py Sat May 21 11:52:26 2016 +0000 @@ -100,7 +100,7 @@ def do_EXPLAINERROR(self): self.send_error(999, "Short Message", - "This is a long \n explaination") + "This is a long \n explanation") def do_CUSTOM(self): self.send_response(999) diff -r e0212060c80e Lib/test/test_itertools.py --- a/Lib/test/test_itertools.py Fri May 20 17:44:44 2016 -0400 +++ b/Lib/test/test_itertools.py Sat May 21 11:52:26 2016 +0000 @@ -635,7 +635,7 @@ # Mode 0 is efficient. It uses an incompletely consumed input # iterator to build a cycle object and then passes in state with # a list of previously consumed values. There is no data - # overlap bewteen the two. + # overlap between the two. c = cycle('defg') c.__setstate__((list('abc'), 0)) self.assertEqual(take(20, c), list('defgabcdefgabcdefgab')) diff -r e0212060c80e Lib/test/test_linecache.py --- a/Lib/test/test_linecache.py Fri May 20 17:44:44 2016 -0400 +++ b/Lib/test/test_linecache.py Sat May 21 11:52:26 2016 +0000 @@ -192,7 +192,7 @@ self.assertEqual( True, linecache.lazycache(NONEXISTENT_FILENAME, globals())) self.assertEqual(1, len(linecache.cache[NONEXISTENT_FILENAME])) - # Note here that we're looking up a non existant filename with no + # Note here that we're looking up a nonexistent filename with no # globals: this would error if the lazy value wasn't resolved. self.assertEqual(lines, linecache.getlines(NONEXISTENT_FILENAME)) diff -r e0212060c80e Lib/test/test_lzma.py --- a/Lib/test/test_lzma.py Fri May 20 17:44:44 2016 -0400 +++ b/Lib/test/test_lzma.py Sat May 21 11:52:26 2016 +0000 @@ -1211,7 +1211,7 @@ self.assertEqual(f.read(), uncompressed) def test_encoding_error_handler(self): - # Test wih non-default encoding error handler. + # Test with non-default encoding error handler. with BytesIO(lzma.compress(b"foo\xffbar")) as bio: with lzma.open(bio, "rt", encoding="ascii", errors="ignore") as f: self.assertEqual(f.read(), "foobar") diff -r e0212060c80e Lib/test/test_memoryio.py --- a/Lib/test/test_memoryio.py Fri May 20 17:44:44 2016 -0400 +++ b/Lib/test/test_memoryio.py Sat May 21 11:52:26 2016 +0000 @@ -376,7 +376,7 @@ # Pickle expects the class to be on the module level. Here we use a # little hack to allow the PickleTestMemIO class to derive from - # self.ioclass without having to define all combinations explictly on + # self.ioclass without having to define all combinations explicitly on # the module-level. import __main__ PickleTestMemIO.__module__ = '__main__' diff -r e0212060c80e Lib/test/test_pdb.py --- a/Lib/test/test_pdb.py Fri May 20 17:44:44 2016 -0400 +++ b/Lib/test/test_pdb.py Sat May 21 11:52:26 2016 +0000 @@ -823,7 +823,7 @@ """ def test_pdb_next_command_in_generator_for_loop(): - """The next command on returning from a generator controled by a for loop. + """The next command on returning from a generator controlled by a for loop. >>> def test_gen(): ... yield 0 diff -r e0212060c80e Lib/test/test_pydoc.py --- a/Lib/test/test_pydoc.py Fri May 20 17:44:44 2016 -0400 +++ b/Lib/test/test_pydoc.py Sat May 21 11:52:26 2016 +0000 @@ -734,7 +734,7 @@ finally: sys.path[:] = saved_paths - @unittest.skip('causes undesireable side-effects (#20128)') + @unittest.skip('causes undesirable side-effects (#20128)') def test_modules(self): # See Helper.listmodules(). num_header_lines = 2 @@ -750,7 +750,7 @@ self.assertGreaterEqual(num_lines, expected) - @unittest.skip('causes undesireable side-effects (#20128)') + @unittest.skip('causes undesirable side-effects (#20128)') def test_modules_search(self): # See Helper.listmodules(). expected = 'pydoc - ' diff -r e0212060c80e Lib/test/test_set.py --- a/Lib/test/test_set.py Fri May 20 17:44:44 2016 -0400 +++ b/Lib/test/test_set.py Sat May 21 11:52:26 2016 +0000 @@ -1859,7 +1859,7 @@ # http://en.wikipedia.org/wiki/Cuboctahedron # 8 triangular faces and 6 square faces - # 12 indentical vertices each connecting a triangle and square + # 12 identical vertices each connecting a triangle and square g = cube(3) cuboctahedron = linegraph(g) # V( --> {V1, V2, V3, V4} diff -r e0212060c80e Lib/test/test_socket.py --- a/Lib/test/test_socket.py Fri May 20 17:44:44 2016 -0400 +++ b/Lib/test/test_socket.py Sat May 21 11:52:26 2016 +0000 @@ -198,7 +198,7 @@ clientTearDown () Any new test functions within the class must then define - tests in pairs, where the test name is preceeded with a + tests in pairs, where the test name is preceded with a '_' to indicate the client portion of the test. Ex: def testFoo(self): @@ -4999,7 +4999,7 @@ def compareSockets(self, org, other): # socket sharing is expected to work only for blocking socket - # since the internal python timout value isn't transfered. + # since the internal python timeout value isn't transferred. self.assertEqual(org.gettimeout(), None) self.assertEqual(org.gettimeout(), other.gettimeout()) diff -r e0212060c80e Lib/test/test_telnetlib.py --- a/Lib/test/test_telnetlib.py Fri May 20 17:44:44 2016 -0400 +++ b/Lib/test/test_telnetlib.py Sat May 21 11:52:26 2016 +0000 @@ -241,8 +241,8 @@ self.assertEqual(data, want) def test_read_eager(self): - # read_eager and read_very_eager make the same gaurantees - # (they behave differently but we only test the gaurantees) + # read_eager and read_very_eager make the same guarantees + # (they behave differently but we only test the guarantees) self._read_eager('read_eager') self._read_eager('read_very_eager') # NB -- we need to test the IAC block which is mentioned in the diff -r e0212060c80e Lib/test/test_winsound.py --- a/Lib/test/test_winsound.py Fri May 20 17:44:44 2016 -0400 +++ b/Lib/test/test_winsound.py Sat May 21 11:52:26 2016 +0000 @@ -158,7 +158,7 @@ ) def test_alias_fallback(self): - # In the absense of the ability to tell if a sound was actually + # In the absence of the ability to tell if a sound was actually # played, this test has two acceptable outcomes: success (no error, # sound was theoretically played; although as issue #19987 shows # a box without a soundcard can "succeed") or RuntimeError. Any diff -r e0212060c80e Lib/test/tokenize_tests-latin1-coding-cookie-and-utf8-bom-sig.txt --- a/Lib/test/tokenize_tests-latin1-coding-cookie-and-utf8-bom-sig.txt Fri May 20 17:44:44 2016 -0400 +++ b/Lib/test/tokenize_tests-latin1-coding-cookie-and-utf8-bom-sig.txt Sat May 21 11:52:26 2016 +0000 @@ -2,7 +2,7 @@ # IMPORTANT: this file has the utf-8 BOM signature '\xef\xbb\xbf' # at the start of it. Make sure this is preserved if any changes # are made! Also note that the coding cookie above conflicts with -# the presense of a utf-8 BOM signature -- this is intended. +# the presence of a utf-8 BOM signature -- this is intended. # Arbitrary encoded utf-8 text (stolen from test_doctest2.py). x = 'ЉЊЈЁЂ' diff -r e0212060c80e Lib/threading.py --- a/Lib/threading.py Fri May 20 17:44:44 2016 -0400 +++ b/Lib/threading.py Sat May 21 11:52:26 2016 +0000 @@ -1063,7 +1063,7 @@ # Issue #18808: wait for the thread state to be gone. # At the end of the thread's life, after all knowledge of the thread # is removed from C data structures, C code releases our _tstate_lock. - # This method passes its arguments to _tstate_lock.aquire(). + # This method passes its arguments to _tstate_lock.acquire(). # If the lock is acquired, the C code is done, and self._stop() is # called. That sets ._is_stopped to True, and ._tstate_lock to None. lock = self._tstate_lock diff -r e0212060c80e Lib/tkinter/ttk.py --- a/Lib/tkinter/ttk.py Fri May 20 17:44:44 2016 -0400 +++ b/Lib/tkinter/ttk.py Sat May 21 11:52:26 2016 +0000 @@ -1016,7 +1016,7 @@ """Begin autoincrement mode: schedules a recurring timer event that calls method step every interval milliseconds. - interval defaults to 50 milliseconds (20 steps/second) if ommited.""" + interval defaults to 50 milliseconds (20 steps/second) if omitted.""" self.tk.call(self._w, "start", interval) diff -r e0212060c80e Lib/traceback.py --- a/Lib/traceback.py Fri May 20 17:44:44 2016 -0400 +++ b/Lib/traceback.py Sat May 21 11:52:26 2016 +0000 @@ -136,7 +136,7 @@ return list(TracebackException(etype, value, None).format_exception_only()) -# -- not offical API but folk probably use these two functions. +# -- not official API but folk probably use these two functions. def _format_final_exc_line(etype, value): valuestr = _some_str(value) @@ -418,13 +418,13 @@ - :attr:`stack` A `StackSummary` representing the traceback. - :attr:`exc_type` The class of the original traceback. - :attr:`filename` For syntax errors - the filename where the error - occured. + occurred. - :attr:`lineno` For syntax errors - the linenumber where the error - occured. + occurred. - :attr:`text` For syntax errors - the text where the error - occured. + occurred. - :attr:`offset` For syntax errors - the offset into the text where the - error occured. + error occurred. - :attr:`msg` For syntax errors - the compiler error message. """ diff -r e0212060c80e Lib/unittest/loader.py --- a/Lib/unittest/loader.py Fri May 20 17:44:44 2016 -0400 +++ b/Lib/unittest/loader.py Sat May 21 11:52:26 2016 +0000 @@ -387,7 +387,7 @@ if tests is not None: yield tests if not should_recurse: - # Either an error occured, or load_tests was used by the + # Either an error occurred, or load_tests was used by the # package. return # Handle the contents. diff -r e0212060c80e Lib/unittest/result.py --- a/Lib/unittest/result.py Fri May 20 17:44:44 2016 -0400 +++ b/Lib/unittest/result.py Sat May 21 11:52:26 2016 +0000 @@ -148,7 +148,7 @@ self.skipped.append((test, reason)) def addExpectedFailure(self, test, err): - """Called when an expected failure/error occured.""" + """Called when an expected failure/error occurred.""" self.expectedFailures.append( (test, self._exc_info_to_string(err, test))) diff -r e0212060c80e Lib/unittest/test/test_case.py --- a/Lib/unittest/test/test_case.py Fri May 20 17:44:44 2016 -0400 +++ b/Lib/unittest/test/test_case.py Sat May 21 11:52:26 2016 +0000 @@ -942,7 +942,7 @@ [], [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()]) diff -r e0212060c80e Lib/wsgiref/headers.py --- a/Lib/wsgiref/headers.py Fri May 20 17:44:44 2016 -0400 +++ b/Lib/wsgiref/headers.py Sat May 21 11:52:26 2016 +0000 @@ -69,7 +69,7 @@ Return None if the header is missing instead of raising an exception. Note that if the header appeared multiple times, the first exactly which - occurrance gets returned is undefined. Use getall() to get all + occurrence gets returned is undefined. Use getall() to get all the values matching a header field name. """ return self.get(name) diff -r e0212060c80e Mac/README --- a/Mac/README Fri May 20 17:44:44 2016 -0400 +++ b/Mac/README Sat May 21 11:52:26 2016 +0000 @@ -56,7 +56,7 @@ See the section _`Building and using a universal binary of Python on Mac OS X` for more information. -* ``--with-univeral-archs=VALUE`` +* ``--with-universal-archs=VALUE`` Specify the kind of universal binary that should be created. This option is only valid when ``--enable-universalsdk`` is specified. The default is diff -r e0212060c80e Makefile.pre.in --- a/Makefile.pre.in Fri May 20 17:44:44 2016 -0400 +++ b/Makefile.pre.in Sat May 21 11:52:26 2016 +0000 @@ -1453,7 +1453,7 @@ # the Makefile in Mac # # -# This target is here for backward compatiblity, previous versions of Python +# This target is here for backward compatibility, previous versions of Python # hadn't integrated framework installation in the normal install process. frameworkinstall: install diff -r e0212060c80e Misc/HISTORY --- a/Misc/HISTORY Fri May 20 17:44:44 2016 -0400 +++ b/Misc/HISTORY Sat May 21 11:52:26 2016 +0000 @@ -26799,7 +26799,7 @@ python parser. Corresponding standard library modules token and symbol defines the numeric values of tokens and non-terminal symbols. -* The posix module has aquired new functions setuid(), setgid(), +* The posix module has acquired new functions setuid(), setgid(), execve(), and exec() has been renamed to execv(). * The array module is extended with 8-byte object swaps, the 'i' @@ -26813,7 +26813,7 @@ * For select.select(), a timeout (4th) argument of None means the same as leaving the timeout argument out. -* Module strop (and hence standard library module string) has aquired +* Module strop (and hence standard library module string) has acquired a new function: rindex(). Thanks to Amrit Prem! * Module regex defines a new function symcomp() which uses an extended @@ -27959,7 +27959,7 @@ to give more useful results for negative operands - Changed/added range checks for long/plain integer shifts - Options found after "-c command" are now passed to the command in sys.argv - (note subtle incompatiblity with "python -c command -- -options"!) + (note subtle incompatibility with "python -c command -- -options"!) - Module stdwin is better protected against touching objects after they've been closed; menus can now also be closed explicitly - Stdwin now uses its own exception (stdwin.error) diff -r e0212060c80e Misc/NEWS --- a/Misc/NEWS Fri May 20 17:44:44 2016 -0400 +++ b/Misc/NEWS Sat May 21 11:52:26 2016 +0000 @@ -2803,7 +2803,7 @@ - Issue #23704: collections.deque() objects now support methods for index(), insert(), and copy(). This allows deques to be registered as a - MutableSequence and it improves their substitutablity for lists. + MutableSequence and it improves their substitutability for lists. - Issue #23715: :func:`signal.sigwaitinfo` and :func:`signal.sigtimedwait` are now retried when interrupted by a signal not in the *sigset* parameter, if @@ -8040,7 +8040,7 @@ internal XML encoding is not UTF-8 or US-ASCII. It also now accepts bytes and strings larger than 2 GiB. -- Issue #6083: Fix multiple segmentation faults occured when PyArg_ParseTuple +- Issue #6083: Fix multiple segmentation faults occurred when PyArg_ParseTuple parses nested mutating sequence. - Issue #5289: Fix ctypes.util.find_library on Solaris. diff -r e0212060c80e Modules/_datetimemodule.c --- a/Modules/_datetimemodule.c Fri May 20 17:44:44 2016 -0400 +++ b/Modules/_datetimemodule.c Sat May 21 11:52:26 2016 +0000 @@ -219,7 +219,7 @@ return _days_in_month[month]; } -/* year, month -> number of days in year preceeding first day of month */ +/* year, month -> number of days in year preceding first day of month */ static int days_before_month(int year, int month) { diff -r e0212060c80e Modules/_pickle.c --- a/Modules/_pickle.c Fri May 20 17:44:44 2016 -0400 +++ b/Modules/_pickle.c Sat May 21 11:52:26 2016 +0000 @@ -6614,7 +6614,7 @@ other custom object that meets this interface. Optional keyword arguments are *fix_imports*, *encoding* and *errors*, -which are used to control compatiblity support for pickle stream +which are used to control compatibility support for pickle stream generated by Python 2. If *fix_imports* is True, pickle will try to map the old Python 2 names to the new names used in Python 3. The *encoding* and *errors* tell pickle how to decode 8-bit string @@ -7156,7 +7156,7 @@ other custom object that meets this interface. Optional keyword arguments are *fix_imports*, *encoding* and *errors*, -which are used to control compatiblity support for pickle stream +which are used to control compatibility support for pickle stream generated by Python 2. If *fix_imports* is True, pickle will try to map the old Python 2 names to the new names used in Python 3. The *encoding* and *errors* tell pickle how to decode 8-bit string @@ -7210,7 +7210,7 @@ representation are ignored. Optional keyword arguments are *fix_imports*, *encoding* and *errors*, -which are used to control compatiblity support for pickle stream +which are used to control compatibility support for pickle stream generated by Python 2. If *fix_imports* is True, pickle will try to map the old Python 2 names to the new names used in Python 3. The *encoding* and *errors* tell pickle how to decode 8-bit string diff -r e0212060c80e Modules/sha256module.c --- a/Modules/sha256module.c Fri May 20 17:44:44 2016 -0400 +++ b/Modules/sha256module.c Sat May 21 11:52:26 2016 +0000 @@ -100,7 +100,7 @@ * algorithms in a highly modular and flexible manner. * * The library is free for all purposes without any express - * gurantee it works. + * guarantee it works. * * Tom St Denis, tomstdenis@iahu.ca, http://libtom.org */ diff -r e0212060c80e Modules/sha512module.c --- a/Modules/sha512module.c Fri May 20 17:44:44 2016 -0400 +++ b/Modules/sha512module.c Sat May 21 11:52:26 2016 +0000 @@ -111,7 +111,7 @@ * algorithms in a highly modular and flexible manner. * * The library is free for all purposes without any express - * gurantee it works. + * guarantee it works. * * Tom St Denis, tomstdenis@iahu.ca, http://libtom.org */ diff -r e0212060c80e Python/fileutils.c --- a/Python/fileutils.c Fri May 20 17:44:44 2016 -0400 +++ b/Python/fileutils.c Sat May 21 11:52:26 2016 +0000 @@ -176,7 +176,7 @@ #endif error: - /* if an error occured, force the ASCII encoding */ + /* if an error occurred, force the ASCII encoding */ return 1; } diff -r e0212060c80e Python/peephole.c --- a/Python/peephole.c Fri May 20 17:44:44 2016 -0400 +++ b/Python/peephole.c Sat May 21 11:52:26 2016 +0000 @@ -342,7 +342,7 @@ appear before MAKE_FUNCTION; in this case both opcodes are skipped. EXTENDED_ARG preceding any other opcode causes the optimizer to bail. - Optimizations are restricted to simple transformations occuring within a + Optimizations are restricted to simple transformations occurring within a single basic block. All transformations keep the code size the same or smaller. For those that reduce size, the gaps are initially filled with NOPs. Later those NOPs are removed and the jump addresses retargeted in diff -r e0212060c80e Python/pythonrun.c --- a/Python/pythonrun.c Fri May 20 17:44:44 2016 -0400 +++ b/Python/pythonrun.c Sat May 21 11:52:26 2016 +0000 @@ -1425,7 +1425,7 @@ #endif /* USE_STACKCHECK */ -/* Deprecated C API functions still provided for binary compatiblity */ +/* Deprecated C API functions still provided for binary compatibility */ #undef PyParser_SimpleParseFile PyAPI_FUNC(node *) diff -r e0212060c80e configure.ac --- a/configure.ac Fri May 20 17:44:44 2016 -0400 +++ b/configure.ac Sat May 21 11:52:26 2016 +0000 @@ -542,7 +542,7 @@ # # SGI compilers allow the specification of the both the ABI and the # ISA on the command line. Depending on the values of these switches, -# different and often incompatable code will be generated. +# different and often incompatible code will be generated. # # The SGI_ABI variable can be used to modify the CC and LDFLAGS and # thus supply support for various ABI/ISA combinations. The MACHDEP