]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.9] Fix typos in the Modules directory (GH-28761). (GH-28791)
authorChristian Clauss <cclauss@me.com>
Thu, 7 Oct 2021 13:17:05 +0000 (15:17 +0200)
committerGitHub <noreply@github.com>
Thu, 7 Oct 2021 13:17:05 +0000 (06:17 -0700)
(cherry picked from commit dd02a696e55b450413e765e698e653d781ca4205)

Co-authored-by: Christian Clauss <cclauss@me.com>
Automerge-Triggered-By: GH:JulienPalard
15 files changed:
Modules/_ctypes/callproc.c
Modules/_ctypes/cfield.c
Modules/_ctypes/ctypes.h
Modules/_pickle.c
Modules/_sre.c
Modules/_testcapimodule.c
Modules/_tkinter.c
Modules/_tracemalloc.c
Modules/_zoneinfo.c
Modules/expat/xmlparse.c
Modules/gc_weakref.txt
Modules/getpath.c
Modules/sha1module.c
Modules/socketmodule.c
Modules/syslogmodule.c

index dafc51e5d3db735e8f24b2f8befd357d036368d6..9aff890afe9def689cd6828594508c183c8eb6c2 100644 (file)
@@ -838,7 +838,7 @@ static int _call_function_pointer(int flags,
 #      define HAVE_FFI_PREP_CIF_VAR_RUNTIME false
 #   endif
 
-    /* Even on Apple-arm64 the calling convention for variadic functions conincides
+    /* Even on Apple-arm64 the calling convention for variadic functions coincides
      * with the standard calling convention in the case that the function called
      * only with its fixed arguments.   Thus, we do not need a special flag to be
      * set on variadic functions.   We treat a function as variadic if it is called
index 7ebd4ba76afb72194eaf96df0a21dbd1c32dd21b..06b98a6d66fc3688b1ff9df106f9e72a9a90d708 100644 (file)
@@ -35,7 +35,7 @@ PyCField_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
  * Expects the size, index and offset for the current field in *psize and
  * *poffset, stores the total size so far in *psize, the offset for the next
  * field in *poffset, the alignment requirements for the current field in
- * *palign, and returns a field desriptor for this field.
+ * *palign, and returns a field descriptor for this field.
  */
 /*
  * bitfields extension:
index 3f20031d671a8a8f3920820417ce241d63789f1f..0f422113a89cbed8397ed941d57b60c49da22b87 100644 (file)
@@ -208,7 +208,7 @@ typedef struct {
     PyObject *checker;
     int flags;                  /* calling convention and such */
 
-    /* pep3118 fields, pointers neeed PyMem_Free */
+    /* pep3118 fields, pointers need PyMem_Free */
     char *format;
     int ndim;
     Py_ssize_t *shape;
index 8dea2c6ea0c203e92c05c3aef48ffe95fe1953cf..ff9402bd1606ea5778f8c7ff6f13c6d54dd6339e 100644 (file)
@@ -4531,7 +4531,7 @@ dump(PicklerObject *self, PyObject *obj)
      * call when setting the reducer_override attribute of the Pickler instance
      * to a bound method of the same instance. This is important as the Pickler
      * instance holds a reference to each object it has pickled (through its
-     * memo): thus, these objects wont be garbage-collected as long as the
+     * memo): thus, these objects won't be garbage-collected as long as the
      * Pickler itself is not collected. */
     Py_CLEAR(self->reducer_override);
     return status;
@@ -6587,7 +6587,7 @@ do_setitems(UnpicklerObject *self, Py_ssize_t x)
         return 0;
     if ((len - x) % 2 != 0) {
         PickleState *st = _Pickle_GetGlobalState();
-        /* Currupt or hostile pickle -- we never write one like this. */
+        /* Corrupt or hostile pickle -- we never write one like this. */
         PyErr_SetString(st->UnpicklingError,
                         "odd number of items for SETITEMS");
         return -1;
index bdc427822d7e10a6e65a154633c5d7f152104d21..8225c36da1a38968708c169ec31b391b8fe76354 100644 (file)
@@ -15,7 +15,7 @@
  * 2001-05-14 fl   fixes for 1.5.2 compatibility
  * 2001-07-01 fl   added BIGCHARSET support (from Martin von Loewis)
  * 2001-10-18 fl   fixed group reset issue (from Matthew Mueller)
- * 2001-10-20 fl   added split primitive; reenable unicode for 1.6/2.0/2.1
+ * 2001-10-20 fl   added split primitive; re-enable unicode for 1.6/2.0/2.1
  * 2001-10-21 fl   added sub/subn primitive
  * 2001-10-24 fl   added finditer primitive (for 2.2 only)
  * 2001-12-07 fl   fixed memory leak in sub/subn (Guido van Rossum)
index f6558caee9e3467b4102db4bebcb088c5716fa24..ae1284178dc60e1f6b7622f89f06bdaaf501971b 100644 (file)
@@ -5127,7 +5127,7 @@ encode_locale_ex(PyObject *self, PyObject *args)
         PyErr_SetString(PyExc_ValueError, "unsupported error handler");
         break;
     default:
-        PyErr_SetString(PyExc_ValueError, "unknow error code");
+        PyErr_SetString(PyExc_ValueError, "unknown error code");
         break;
     }
     return res;
@@ -5170,7 +5170,7 @@ decode_locale_ex(PyObject *self, PyObject *args)
         PyErr_SetString(PyExc_ValueError, "unsupported error handler");
         break;
     default:
-        PyErr_SetString(PyExc_ValueError, "unknow error code");
+        PyErr_SetString(PyExc_ValueError, "unknown error code");
         break;
     }
     return res;
index 19853ce49118209421dc077ba38c512f8bb7051e..e153047b778b72d18971c3c52792ac856ac8206a 100644 (file)
@@ -936,7 +936,7 @@ PyTclObject_str(PyTclObject *self)
         Py_INCREF(self->string);
         return self->string;
     }
-    /* XXX Could chache result if it is non-ASCII. */
+    /* XXX Could cache result if it is non-ASCII. */
     return unicodeFromTclObj(self->value);
 }
 
index 04f6c243b5ca4d1fdb539ffadb4ba8244846f875..90498fb7a7897d65e411f4ab26c102ffa8753fb2 100644 (file)
@@ -836,7 +836,7 @@ tracemalloc_clear_filename(void *value)
 static void
 tracemalloc_clear_traces(void)
 {
-    /* The GIL protects variables againt concurrent access */
+    /* The GIL protects variables against concurrent access */
     assert(PyGILState_Check());
 
     TABLES_LOCK();
index f655768496e132ac0e5e92e55e3b5e58ca977092..d7945d31affea377d85b65ba9664fb3928db8b34 100644 (file)
@@ -1347,7 +1347,7 @@ tzrule_transitions(_tzrule *rule, int year, int64_t *start, int64_t *end)
  * could technically be calculated from the timestamp, but given that the
  * callers of this function already have the year information accessible from
  * the datetime struct, it is taken as an additional parameter to reduce
- * unncessary calculation.
+ * unnecessary calculation.
  * */
 static _ttinfo *
 find_tzrule_ttinfo(_tzrule *rule, int64_t ts, unsigned char fold, int year)
index 5ba56eaea6357a22c36152be8ac0b25641208955..034a03c30851a18931555fdbd4b518bcda082b35 100644 (file)
@@ -3976,7 +3976,7 @@ initializeEncoding(XML_Parser parser) {
   const char *s;
 #ifdef XML_UNICODE
   char encodingBuf[128];
-  /* See comments abount `protoclEncodingName` in parserInit() */
+  /* See comments about `protoclEncodingName` in parserInit() */
   if (! parser->m_protocolEncodingName)
     s = NULL;
   else {
index b5b9f7b2e3d4dc676c91444be81f0886cf06720d..6d07cce12364317c524262e6eb431fbbb107192c 100644 (file)
@@ -50,7 +50,7 @@ CT while gc is running.
     https://www.python.org/sf/1055820
 
 shows how innocent it can be, and also how nasty.  Variants of the three
-focussed test cases attached to that bug report are now part of Python's
+focused test cases attached to that bug report are now part of Python's
 standard Lib/test/test_gc.py.
 
 Jim Fulton gave the best nutshell summary of the new (in 2.4 and 2.3.5)
index 728ecad052e142dd1433ee8da361f8a60e6ece30..5dbe57c95093adc2dfdc05257380829c87578d00 100644 (file)
@@ -1510,7 +1510,7 @@ calculate_path(PyCalculatePath *calculate, _PyPathConfig *pathconfig)
     }
 
     /* If a pyvenv.cfg configure file is found,
-       argv0_path is overriden with its 'home' variable. */
+       argv0_path is overridden with its 'home' variable. */
     status = calculate_read_pyenv(calculate);
     if (_PyStatus_EXCEPTION(status)) {
         return status;
index 9c75cc99dba77130dcf8b7b67679641a89d06b11..44fe8ef7b356f8a87608ca859beabfe204b8ee19 100644 (file)
@@ -269,7 +269,7 @@ sha1_done(struct sha1_state *sha1, unsigned char *out)
         sha1->curlen = 0;
     }
 
-    /* pad upto 56 bytes of zeroes */
+    /* pad up to 56 bytes of zeroes */
     while (sha1->curlen < 56) {
         sha1->buf[sha1->curlen++] = (unsigned char)0;
     }
index 0ac7fd0a607a05492836e9ac87b0cdf3f9fb149c..a22060d399082aca352bcb3ca843a5e9fd8db5d7 100644 (file)
@@ -965,7 +965,7 @@ sock_call_ex(PySocketSockObject *s,
                reading, but the data then discarded by the OS because of a
                wrong checksum.
 
-               Loop on select() to recheck for socket readyness. */
+               Loop on select() to recheck for socket readiness. */
             continue;
         }
 
index cdc94a60a373d78c6b1aa2515437001ac1735423..0f2fea15b3a6f0cd3251bd5c85cd3e3dc6b571f5 100644 (file)
@@ -183,7 +183,7 @@ syslog_syslog(PyObject * self, PyObject * args)
         PyObject *openargs;
 
         /* Continue even if PyTuple_New fails, because openlog(3) is optional.
-         * So, we can still do loggin in the unlikely event things are so hosed
+         * So, we can still do logging in the unlikely event things are so hosed
          * that we can't do this tuple.
          */
         if ((openargs = PyTuple_New(0))) {