]> granicus.if.org Git - python/commitdiff
bpo-32746: Fix multiple typos (GH-5144)
authorLeo Arias <leo.arias@canonical.com>
Sun, 4 Feb 2018 00:36:10 +0000 (18:36 -0600)
committerTerry Jan Reedy <tjreedy@udel.edu>
Sun, 4 Feb 2018 00:36:10 +0000 (19:36 -0500)
Fix typos found by codespell in docs, docstrings, and comments.

22 files changed:
Doc/library/optparse.rst
Doc/library/ossaudiodev.rst
Lib/ctypes/_aix.py
Lib/email/_header_value_parser.py
Lib/idlelib/configdialog.py
Lib/opcode.py
Lib/test/datetimetester.py
Lib/test/test_cmd.py
Lib/test/test_concurrent_futures.py
Lib/test/test_generators.py
Lib/test/test_weakref.py
Lib/unittest/test/test_discovery.py
Modules/_asynciomodule.c
Modules/_datetimemodule.c
Modules/_hashopenssl.c
Modules/_pickle.c
Modules/md5module.c
Modules/socketmodule.c
Objects/obmalloc.c
Objects/tupleobject.c
Objects/typeobject.c
Python/getargs.c

index 2ef187db2dcbfa55b3e0863220555004cb45303c..337c7c2994169b07e9e17cde5c0c7ae4a1db40de 100644 (file)
@@ -567,7 +567,7 @@ An option group is obtained using the class :class:`OptionGroup`:
 
    where
 
-   * parser is the :class:`OptionParser` instance the group will be insterted in
+   * parser is the :class:`OptionParser` instance the group will be inserted in
      to
    * title is the group title
    * description, optional, is a long description of the group
index ec40c0b93abf7be646a24e9e8f4119e127d79f72..522bb7e092427bb342c633548002d9361df32fff 100644 (file)
@@ -14,7 +14,7 @@ the standard audio interface for Linux and recent versions of FreeBSD.
 .. Things will get more complicated for future Linux versions, since
    ALSA is in the standard kernel as of 2.5.x.  Presumably if you
    use ALSA, you'll have to make sure its OSS compatibility layer
-   is active to use ossaudiodev, but you're gonna need it for the vast
+   is active to use ossaudiodev, but you're going to need it for the vast
    majority of Linux audio apps anyway.
 
    Sounds like things are also complicated for other BSDs.  In response
@@ -447,4 +447,3 @@ The remaining methods are specific to audio mixing:
    microphone input::
 
       mixer.setrecsrc (1 << ossaudiodev.SOUND_MIXER_MIC)
-
index 61af9423ac548c1e5eca09cd74b4b3c197462fe2..463f60a2849f3669c3fb2ee466c06dd077d9c517 100644 (file)
@@ -32,7 +32,7 @@ as multiple shared libraries can be in the archive - even sharing the same name.
 In documentation the archive is also referred to as the "base" and the shared
 library object is referred to as the "member".
 
-For dlopen() on AIX (read initAndLoad()) the calls are similiar.
+For dlopen() on AIX (read initAndLoad()) the calls are similar.
 Default activity occurs when no path information is provided. When path
 information is provided dlopen() does not search any other directories.
 
@@ -90,7 +90,7 @@ def get_ld_header_info(p):
         if re.match("[0-9]", line):
             info.append(line)
         else:
-            # blank line (seperator), consume line and end for loop
+            # blank line (separator), consume line and end for loop
             break
     return info
 
index d2d1f5cb5f3d8ad47f2e2c1941579e1b02529873..d8becee19892c8fb6ed4d402251198c206da912b 100644 (file)
@@ -2745,8 +2745,8 @@ def _fold_mime_parameters(part, lines, maxlen, encoding):
 
     Using the decoded list of parameters and values, format them according to
     the RFC rules, including using RFC2231 encoding if the value cannot be
-    expressed in 'encoding' and/or the paramter+value is too long to fit within
-    'maxlen'.
+    expressed in 'encoding' and/or the parameter+value is too long to fit
+    within 'maxlen'.
 
     """
     # Special case for RFC2231 encoding: start from decoded values and use
index 4e8394be928112bb3c9b6aa09c6af4a70c46ca89..231e14e55d47e314d54092a4748ba839abe84eee 100644 (file)
@@ -495,7 +495,7 @@ class FontPage(Frame):
         Changing any of the font vars invokes var_changed_font, which
         adds all 3 font options to changes and calls set_samples.
         Set_samples applies a new font constructed from the font vars to
-        font_sample and to highlight_sample on the hightlight page.
+        font_sample and to highlight_sample on the highlight page.
 
         Tabs: Enable users to change spaces entered for indent tabs.
         Changing indent_scale value with the mouse sets Var space_num,
@@ -646,7 +646,7 @@ class FontPage(Frame):
 
         Called on font initialization and change events.
         Accesses font_name, font_size, and font_bold Variables.
-        Updates font_sample and hightlight page highlight_sample.
+        Updates font_sample and highlight page highlight_sample.
         """
         font_name = self.font_name.get()
         font_weight = tkFont.BOLD if self.font_bold.get() else tkFont.NORMAL
index 8f45f0a666f1a2ac153a8a0989caa84a23192e74..368472d981162515e3934b63651eed7dcb2ec282 100644 (file)
@@ -142,7 +142,7 @@ name_op('LOAD_NAME', 101)       # Index in name list
 def_op('BUILD_TUPLE', 102)      # Number of tuple items
 def_op('BUILD_LIST', 103)       # Number of list items
 def_op('BUILD_SET', 104)        # Number of set items
-def_op('BUILD_MAP', 105)        # Number of dict entries (upto 255)
+def_op('BUILD_MAP', 105)        # Number of dict entries
 name_op('LOAD_ATTR', 106)       # Index in name list
 def_op('COMPARE_OP', 107)       # Comparison operator
 hascompare.append(107)
index a0883b9f421da6de98fc452ee4350ee9aaacbdae..8f9ebddff5a9ec0db3491bb73e4f067936c3b8c6 100644 (file)
@@ -1861,7 +1861,7 @@ class TestDateTime(TestDate):
 
         # Make sure comparison doesn't forget microseconds, and isn't done
         # via comparing a float timestamp (an IEEE double doesn't have enough
-        # precision to span microsecond resolution across years 1 thru 9999,
+        # precision to span microsecond resolution across years 1 through 9999,
         # so comparing via timestamp necessarily calls some distinct values
         # equal).
         dt1 = self.theclass(MAXYEAR, 12, 31, 23, 59, 59, 999998)
index 99a483be43b0fd24a99a6efa942db4bd7895624f..96e0c30da328cfc76694febb5f7639d9221564a4 100644 (file)
@@ -51,7 +51,7 @@ class samplecmdclass(cmd.Cmd):
 
     Test for the function completedefault():
     >>> mycmd.completedefault()
-    This is the completedefault methode
+    This is the completedefault method
     >>> mycmd.completenames("a")
     ['add']
 
@@ -140,7 +140,7 @@ class samplecmdclass(cmd.Cmd):
         print("Hello from postloop")
 
     def completedefault(self, *ignored):
-        print("This is the completedefault methode")
+        print("This is the completedefault method")
 
     def complete_command(self):
         print("complete command")
index 675cd7ae05e5fcccb5864637af332eb7c05fe211..18d0265f3f61a63ffdb39f30237972362648e0a3 100644 (file)
@@ -398,7 +398,7 @@ class ProcessPoolShutdownTest(ExecutorShutdownTest):
         queue_management_thread = executor._queue_management_thread
         del executor
 
-        # Make sure that all the executor ressources were properly cleaned by
+        # Make sure that all the executor resources were properly cleaned by
         # the shutdown process
         queue_management_thread.join()
         for p in processes.values():
@@ -886,24 +886,24 @@ class ExecutorDeadlockTest:
         # extensive testing for deadlock caused by crashes in a pool.
         self.executor.shutdown(wait=True)
         crash_cases = [
-            # Check problem occuring while pickling a task in
+            # Check problem occurring while pickling a task in
             # the task_handler thread
             (id, (ErrorAtPickle(),), PicklingError, "error at task pickle"),
-            # Check problem occuring while unpickling a task on workers
+            # Check problem occurring while unpickling a task on workers
             (id, (ExitAtUnpickle(),), BrokenProcessPool,
              "exit at task unpickle"),
             (id, (ErrorAtUnpickle(),), BrokenProcessPool,
              "error at task unpickle"),
             (id, (CrashAtUnpickle(),), BrokenProcessPool,
              "crash at task unpickle"),
-            # Check problem occuring during func execution on workers
+            # Check problem occurring during func execution on workers
             (_crash, (), BrokenProcessPool,
              "crash during func execution on worker"),
             (_exit, (), SystemExit,
              "exit during func execution on worker"),
             (_raise_error, (RuntimeError, ), RuntimeError,
              "error during func execution on worker"),
-            # Check problem occuring while pickling a task result
+            # Check problem occurring while pickling a task result
             # on workers
             (_return_instance, (CrashAtPickle,), BrokenProcessPool,
              "crash during result pickle on worker"),
@@ -911,7 +911,7 @@ class ExecutorDeadlockTest:
              "exit during result pickle on worker"),
             (_return_instance, (ErrorAtPickle,), PicklingError,
              "error during result pickle on worker"),
-            # Check problem occuring while unpickling a task in
+            # Check problem occurring while unpickling a task in
             # the result_handler thread
             (_return_instance, (ErrorAtUnpickle,), BrokenProcessPool,
              "error during result unpickle in result_handler"),
index 3461f203deea5b1d3d94f8e38a12dc9de7fd388a..7360b34023d3d8f691583cc57805be9851efe52d 100644 (file)
@@ -1500,7 +1500,7 @@ class Knights:
                 succs[final].remove(corner)
                 add_to_successors(this)
 
-        # Generate moves 3 thru m*n-1.
+        # Generate moves 3 through m*n-1.
         def advance(len=len):
             # If some successor has only one exit, must take it.
             # Else favor successors with fewer exits.
@@ -1522,7 +1522,7 @@ class Knights:
                         yield i
                     add_to_successors(i)
 
-        # Generate moves 3 thru m*n-1.  Alternative version using a
+        # Generate moves 3 through m*n-1.  Alternative version using a
         # stronger (but more expensive) heuristic to order successors.
         # Since the # of backtracking levels is m*n, a poor move early on
         # can take eons to undo.  Smallest square board for which this
index 0384a9fdf0142c18bfdb5ed2cf7b8506a8b9a78d..9fa0bbd7808766d487d0dbb242a6b9e3d4a20603 100644 (file)
@@ -1637,7 +1637,7 @@ class MappingTestCase(TestBase):
         # has to keep looping to find the first object we delete.
         objs.reverse()
 
-        # Turn on mutation in C.__eq__.  The first time thru the loop,
+        # Turn on mutation in C.__eq__.  The first time through the loop,
         # under the iterkeys() business the first comparison will delete
         # the last item iterkeys() would see, and that causes a
         #     RuntimeError: dictionary changed size during iteration
index 48d8fe95bce2616873d959156b85b75ef92770d5..227b44a470269c0fc9f0366d2f05cd360fecb035 100644 (file)
@@ -199,8 +199,8 @@ class TestDiscovery(unittest.TestCase):
                          ['a_directory', 'test_directory', 'test_directory2'])
 
         # load_tests should have been called once with loader, tests and pattern
-        # (but there are no tests in our stub module itself, so thats [] at the
-        # time of call.
+        # (but there are no tests in our stub module itself, so that is [] at
+        # the time of call).
         self.assertEqual(Module.load_tests_args,
                          [(loader, [], 'test*')])
 
index a5cf687d8893ca89d7c3f5e06b751d1fc1d59911..e82425bf2fd7cdae3293a54bf17dc7c9aad33ace 100644 (file)
@@ -187,7 +187,7 @@ is_coroutine(PyObject *coro)
         return _is_coroutine(coro);
     }
 
-    /* either an error has occured or
+    /* either an error has occurred or
        type(coro) is in iscoroutine_typecache
     */
     return has_it;
index 4a33f2d8964201861e9ef34f93dfa202f7476e4e..b69fcdffcc920cda57cadc3b21fa0bd443c37adb 100644 (file)
@@ -3420,7 +3420,7 @@ Inconsistent:
     PyErr_SetString(PyExc_ValueError, "fromutc: tz.dst() gave"
                     "inconsistent results; cannot convert");
 
-    /* fall thru to failure */
+    /* fall through to failure */
 Fail:
     Py_XDECREF(off);
     Py_XDECREF(dst);
index 50fe9d5a10b64be7b98dfe67c2dd25bd5182d460..44d3f634fe4aacab3bd3c49505ff670182375cd9 100644 (file)
@@ -962,7 +962,7 @@ generate_hash_name_list(void)
  *  This macro generates constructor function definitions for specific
  *  hash algorithms.  These constructors are much faster than calling
  *  the generic one passing it a python string and are noticeably
- *  faster than calling a python new() wrapper.  Thats important for
+ *  faster than calling a python new() wrapper.  That is important for
  *  code that wants to make hashes of a bunch of small strings.
  *  The first call will lazy-initialize, which reports an exception
  *  if initialization fails.
index 05f9a023d922787bfa8e3eebd863c8a1e632f2c9..9525ad6d9661bcc8c22f8c8df163e52ccac01c78 100644 (file)
@@ -1015,7 +1015,7 @@ _Pickler_OpcodeBoundary(PicklerObject *self)
         if(_Pickler_CommitFrame(self)) {
             return -1;
         }
-        /* Flush the content of the commited frame to the underlying
+        /* Flush the content of the committed frame to the underlying
          * file and reuse the pickler buffer for the next frame so as
          * to limit memory usage when dumping large complex objects to
          * a file.
index 6b11f0bc0e3dd7a925c12d061e3474b438556dc9..b019f82876845bda385bc94f69c9ac795a17df70 100644 (file)
@@ -293,7 +293,7 @@ md5_done(struct md5_state *md5, unsigned char *out)
         md5->curlen = 0;
     }
 
-    /* pad upto 56 bytes of zeroes */
+    /* pad up to 56 bytes of zeroes */
     while (md5->curlen < 56) {
         md5->buf[md5->curlen++] = (unsigned char)0;
     }
index ab3465a95f0979f5dfd0138269181864b5bdf6d1..13936aa1558e16c8df76652b7204342515e49ef8 100644 (file)
@@ -6156,7 +6156,7 @@ socket_getaddrinfo(PyObject *self, PyObject *args, PyObject* kwargs)
     }
 #if defined(__APPLE__) && defined(AI_NUMERICSERV)
     if ((flags & AI_NUMERICSERV) && (pptr == NULL || (pptr[0] == '0' && pptr[1] == 0))) {
-        /* On OSX upto at least OSX 10.8 getaddrinfo crashes
+        /* On OSX up to at least OSX 10.8 getaddrinfo crashes
          * if AI_NUMERICSERV is set and the servname is NULL or "0".
          * This workaround avoids a segfault in libsystem.
          */
index 0b8816cc54f2a3f0b7e9c34755ab96d1cd2ca787..0e485d62114daf3bfe0b71d93033e173a09a1fed 100644 (file)
@@ -2469,7 +2469,7 @@ pool_is_in_list(const poolp target, poolp list)
  * checks.
  *
  * Return 0 if the memory debug hooks are not installed or no statistics was
- * writen into out, return 1 otherwise.
+ * written into out, return 1 otherwise.
  */
 int
 _PyObject_DebugMallocStats(FILE *out)
index 3a60946125133f32173ffc977692dd493d8682cd..39d43dd04a592dafd299569184d80d3e8f18fed5 100644 (file)
@@ -335,7 +335,7 @@ error:
 
 /* The addend 82520, was selected from the range(0, 1000000) for
    generating the greatest number of prime multipliers for tuples
-   upto length eight:
+   up to length eight:
 
      1082527, 1165049, 1082531, 1165057, 1247581, 1330103, 1082533,
      1330111, 1412633, 1165069, 1247599, 1495177, 1577699
index a22173878e8795001998d7394feeefb051c4efb9..1dd534866b4d65c27e9f37cc9e3fd905fb1e958c 100644 (file)
@@ -5112,7 +5112,7 @@ PyType_Ready(PyTypeObject *type)
     /* PyType_Ready is the closest thing we have to a choke point
      * for type objects, so is the best place I can think of to try
      * to get type objects into the doubly-linked list of all objects.
-     * Still, not all type objects go thru PyType_Ready.
+     * Still, not all type objects go through PyType_Ready.
      */
     _Py_AddToAllObjects((PyObject *)type, 0);
 #endif
index 56e60f6d207b2fc80af8de63d2fc397e3b772dff..97c1fe8f4c9da9d21fb76e7b5cdd672db2660f8b 100644 (file)
@@ -1784,7 +1784,7 @@ vgetargskeywords(PyObject *args, PyObject *kwargs, const char *format,
             }
         }
 
-        /* We are into optional args, skip thru to any remaining
+        /* We are into optional args, skip through to any remaining
          * keyword args */
         msg = skipitem(&format, p_va, flags);
         if (msg) {
@@ -2176,7 +2176,7 @@ vgetargskeywordsfast_impl(PyObject *const *args, Py_ssize_t nargs,
             return cleanreturn(1, &freelist);
         }
 
-        /* We are into optional args, skip thru to any remaining
+        /* We are into optional args, skip through to any remaining
          * keyword args */
         msg = skipitem(&format, p_va, flags);
         assert(msg == NULL);