Skip to content

Commit 5afc5bb

Browse files
[3.10] Fix typos in the Modules directory (GH-28761) (GH-28781)
(cherry picked from commit dd02a69) Co-authored-by: Christian Clauss <[email protected]> Automerge-Triggered-By: GH:gpshead
1 parent 35d4857 commit 5afc5bb

19 files changed

+21
-21
lines changed

Modules/_csv.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -489,7 +489,7 @@ dialect_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
489489
}
490490

491491
/* Since dialect is now a heap type, it inherits pickling method for
492-
* protocol 0 and 1 from object, therefore it needs to be overriden */
492+
* protocol 0 and 1 from object, therefore it needs to be overridden */
493493

494494
PyDoc_STRVAR(dialect_reduce_doc, "raises an exception to avoid pickling");
495495

Modules/_ctypes/callproc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -834,7 +834,7 @@ static int _call_function_pointer(int flags,
834834
# define HAVE_FFI_PREP_CIF_VAR_RUNTIME false
835835
# endif
836836

837-
/* Even on Apple-arm64 the calling convention for variadic functions conincides
837+
/* Even on Apple-arm64 the calling convention for variadic functions coincides
838838
* with the standard calling convention in the case that the function called
839839
* only with its fixed arguments. Thus, we do not need a special flag to be
840840
* set on variadic functions. We treat a function as variadic if it is called

Modules/_ctypes/cfield.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ PyCField_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
3535
* Expects the size, index and offset for the current field in *psize and
3636
* *poffset, stores the total size so far in *psize, the offset for the next
3737
* field in *poffset, the alignment requirements for the current field in
38-
* *palign, and returns a field desriptor for this field.
38+
* *palign, and returns a field descriptor for this field.
3939
*/
4040
/*
4141
* bitfields extension:

Modules/_ctypes/ctypes.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ typedef struct {
208208
PyObject *checker;
209209
int flags; /* calling convention and such */
210210

211-
/* pep3118 fields, pointers neeed PyMem_Free */
211+
/* pep3118 fields, pointers need PyMem_Free */
212212
char *format;
213213
int ndim;
214214
Py_ssize_t *shape;

Modules/_pickle.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4527,7 +4527,7 @@ dump(PicklerObject *self, PyObject *obj)
45274527
* call when setting the reducer_override attribute of the Pickler instance
45284528
* to a bound method of the same instance. This is important as the Pickler
45294529
* instance holds a reference to each object it has pickled (through its
4530-
* memo): thus, these objects wont be garbage-collected as long as the
4530+
* memo): thus, these objects won't be garbage-collected as long as the
45314531
* Pickler itself is not collected. */
45324532
Py_CLEAR(self->reducer_override);
45334533
return status;
@@ -6540,7 +6540,7 @@ do_setitems(UnpicklerObject *self, Py_ssize_t x)
65406540
return 0;
65416541
if ((len - x) % 2 != 0) {
65426542
PickleState *st = _Pickle_GetGlobalState();
6543-
/* Currupt or hostile pickle -- we never write one like this. */
6543+
/* Corrupt or hostile pickle -- we never write one like this. */
65446544
PyErr_SetString(st->UnpicklingError,
65456545
"odd number of items for SETITEMS");
65466546
return -1;

Modules/_sre.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* 2001-05-14 fl fixes for 1.5.2 compatibility
1616
* 2001-07-01 fl added BIGCHARSET support (from Martin von Loewis)
1717
* 2001-10-18 fl fixed group reset issue (from Matthew Mueller)
18-
* 2001-10-20 fl added split primitive; reenable unicode for 1.6/2.0/2.1
18+
* 2001-10-20 fl added split primitive; re-enable unicode for 1.6/2.0/2.1
1919
* 2001-10-21 fl added sub/subn primitive
2020
* 2001-10-24 fl added finditer primitive (for 2.2 only)
2121
* 2001-12-07 fl fixed memory leak in sub/subn (Guido van Rossum)

Modules/_testcapimodule.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5269,7 +5269,7 @@ encode_locale_ex(PyObject *self, PyObject *args)
52695269
PyErr_SetString(PyExc_ValueError, "unsupported error handler");
52705270
break;
52715271
default:
5272-
PyErr_SetString(PyExc_ValueError, "unknow error code");
5272+
PyErr_SetString(PyExc_ValueError, "unknown error code");
52735273
break;
52745274
}
52755275
return res;
@@ -5312,7 +5312,7 @@ decode_locale_ex(PyObject *self, PyObject *args)
53125312
PyErr_SetString(PyExc_ValueError, "unsupported error handler");
53135313
break;
53145314
default:
5315-
PyErr_SetString(PyExc_ValueError, "unknow error code");
5315+
PyErr_SetString(PyExc_ValueError, "unknown error code");
53165316
break;
53175317
}
53185318
return res;

Modules/_threadmodule.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1215,7 +1215,7 @@ where the corresponding signal handler will be executed.\n\
12151215
If *signum* is omitted, SIGINT is assumed.\n\
12161216
A subthread can use this function to interrupt the main thread.\n\
12171217
\n\
1218-
Note: the default signal hander for SIGINT raises ``KeyboardInterrupt``."
1218+
Note: the default signal handler for SIGINT raises ``KeyboardInterrupt``."
12191219
);
12201220

12211221
static lockobject *newlockobject(PyObject *module);

Modules/_tkinter.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -936,7 +936,7 @@ PyTclObject_str(PyTclObject *self)
936936
Py_INCREF(self->string);
937937
return self->string;
938938
}
939-
/* XXX Could chache result if it is non-ASCII. */
939+
/* XXX Could cache result if it is non-ASCII. */
940940
return unicodeFromTclObj(self->value);
941941
}
942942

Modules/_tracemalloc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -836,7 +836,7 @@ tracemalloc_clear_filename(void *value)
836836
static void
837837
tracemalloc_clear_traces(void)
838838
{
839-
/* The GIL protects variables againt concurrent access */
839+
/* The GIL protects variables against concurrent access */
840840
assert(PyGILState_Check());
841841

842842
TABLES_LOCK();

Modules/_zoneinfo.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1342,7 +1342,7 @@ tzrule_transitions(_tzrule *rule, int year, int64_t *start, int64_t *end)
13421342
* could technically be calculated from the timestamp, but given that the
13431343
* callers of this function already have the year information accessible from
13441344
* the datetime struct, it is taken as an additional parameter to reduce
1345-
* unncessary calculation.
1345+
* unnecessary calculation.
13461346
* */
13471347
static _ttinfo *
13481348
find_tzrule_ttinfo(_tzrule *rule, int64_t ts, unsigned char fold, int year)

Modules/expat/xmlparse.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3976,7 +3976,7 @@ initializeEncoding(XML_Parser parser) {
39763976
const char *s;
39773977
#ifdef XML_UNICODE
39783978
char encodingBuf[128];
3979-
/* See comments abount `protoclEncodingName` in parserInit() */
3979+
/* See comments about `protoclEncodingName` in parserInit() */
39803980
if (! parser->m_protocolEncodingName)
39813981
s = NULL;
39823982
else {

Modules/gc_weakref.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ CT while gc is running.
5050
https://www.python.org/sf/1055820
5151

5252
shows how innocent it can be, and also how nasty. Variants of the three
53-
focussed test cases attached to that bug report are now part of Python's
53+
focused test cases attached to that bug report are now part of Python's
5454
standard Lib/test/test_gc.py.
5555

5656
Jim Fulton gave the best nutshell summary of the new (in 2.4 and 2.3.5)

Modules/getpath.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1505,7 +1505,7 @@ calculate_path(PyCalculatePath *calculate, _PyPathConfig *pathconfig)
15051505
}
15061506

15071507
/* If a pyvenv.cfg configure file is found,
1508-
argv0_path is overriden with its 'home' variable. */
1508+
argv0_path is overridden with its 'home' variable. */
15091509
status = calculate_read_pyenv(calculate);
15101510
if (_PyStatus_EXCEPTION(status)) {
15111511
return status;

Modules/sha1module.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ sha1_done(struct sha1_state *sha1, unsigned char *out)
269269
sha1->curlen = 0;
270270
}
271271

272-
/* pad upto 56 bytes of zeroes */
272+
/* pad up to 56 bytes of zeroes */
273273
while (sha1->curlen < 56) {
274274
sha1->buf[sha1->curlen++] = (unsigned char)0;
275275
}

Modules/signalmodule.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1594,7 +1594,7 @@ signal_get_set_handlers(signal_state_t *state, PyObject *mod_dict)
15941594
Py_XDECREF(old_func);
15951595
}
15961596

1597-
// Instal Python SIGINT handler which raises KeyboardInterrupt
1597+
// Install Python SIGINT handler which raises KeyboardInterrupt
15981598
PyObject* sigint_func = get_handler(SIGINT);
15991599
if (sigint_func == state->default_handler) {
16001600
PyObject *int_handler = PyMapping_GetItemString(mod_dict,

Modules/socketmodule.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -927,7 +927,7 @@ sock_call_ex(PySocketSockObject *s,
927927
reading, but the data then discarded by the OS because of a
928928
wrong checksum.
929929
930-
Loop on select() to recheck for socket readyness. */
930+
Loop on select() to recheck for socket readiness. */
931931
continue;
932932
}
933933

Modules/syslogmodule.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ syslog_syslog(PyObject * self, PyObject * args)
183183
PyObject *openargs;
184184

185185
/* Continue even if PyTuple_New fails, because openlog(3) is optional.
186-
* So, we can still do loggin in the unlikely event things are so hosed
186+
* So, we can still do logging in the unlikely event things are so hosed
187187
* that we can't do this tuple.
188188
*/
189189
if ((openargs = PyTuple_New(0))) {

Modules/zlibmodule.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ typedef struct {
8282
Bytef *next_posi;
8383
} _Uint32Window;
8484

85-
/* Initialize the buffer with an inital buffer size.
85+
/* Initialize the buffer with an initial buffer size.
8686
8787
On success, return value >= 0
8888
On failure, return value < 0 */

0 commit comments

Comments
 (0)