cpython/Modules
Itamar Ostricher 85c7bf5bce
gh-103793: Defer formatting task name (#103767)
The default task name is "Task-<counter>" (if no name is passed in during Task creation).
This is initialized in `Task.__init__` (C impl) using string formatting, which can be quite slow.
Actually using the task name in real world code is not very common, so this is wasted init.

Let's defer this string formatting to the first time the name is read (in `get_name` impl),
so we don't need to pay the string formatting cost if the task name is never read.

We don't change the order in which tasks are assigned numbers (if they are) --
the number is set on task creation, as a PyLong instead of a formatted string.

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2023-04-29 08:20:09 -07:00
..
_blake2 gh-102027: Fix macro name (#102124) 2023-03-22 14:44:28 +01:00
_ctypes gh-103092: Isolate _ctypes, part 1 (#103893) 2023-04-27 14:57:54 +02:00
_decimal GH-101291: Rearrange the size bits in PyLongObject (GH-102464) 2023-03-22 14:49:51 +00:00
_hacl gh-99108: Import MD5 and SHA1 from HACL* (#102089) 2023-02-22 13:18:43 -08:00
_io gh-94673: Ensure Builtin Static Types are Readied Properly (gh-103940) 2023-04-27 16:19:43 -06:00
_multiprocessing gh-102255: Improve build support for Windows API partitions (GH-102256) 2023-03-09 21:09:12 +00:00
_sha3 gh-101476: Use _PyType_GetModuleState where applicable (#102188) 2023-02-24 21:16:29 +01:00
_sqlite gh-103489: Add get/set config methods to sqlite3.Connection (#103506) 2023-04-26 19:57:48 +00:00
_sre gh-99300: Use Py_NewRef() in Modules/ directory (#99468) 2022-11-14 13:44:56 +01:00
_ssl gh-102192: remove redundant exception fields from ssl module socket (#102466) 2023-03-16 16:41:10 +00:00
_testcapi Fix typos in faulthandler, testcapi error messages (#103020) 2023-03-25 14:27:02 -07:00
_xxtestfuzz gh-73691: Increase size limits in _xxtestfuzz (#99070) 2022-11-03 14:41:20 -07:00
cjkcodecs gh-103583: Isolate CJK codec modules (#103869) 2023-04-27 15:02:43 +02:00
clinic gh-94518: Port 23-argument `_posixsubprocess.fork_exec` to Argument Clinic (#94519) 2023-04-24 18:27:48 +00:00
expat gh-98739: Update libexpat from 2.4.9 to 2.5.0 (#98742) 2022-10-27 13:45:12 -07:00
README
Setup gh-99108: Add missing md5/sha1 defines to Modules/Setup (#102308) 2023-02-28 22:34:06 +01:00
Setup.bootstrap.in bpo-47152: Move sources of the _sre module into a subdirectory (GH-32290) 2022-04-04 10:53:26 +03:00
Setup.stdlib.in GH-94808: Cover `PyOS_mystrnicmp` and `PyOS_mystricmp` (gh-102469) 2023-03-22 20:35:27 +09:00
_abc.c gh-101476: Use _PyType_GetModuleState where applicable (#102188) 2023-02-24 21:16:29 +01:00
_asynciomodule.c gh-103793: Defer formatting task name (#103767) 2023-04-29 08:20:09 -07:00
_bisectmodule.c GH-102833: Mention the key function in the docstrings (GH-103009) 2023-03-25 02:19:20 -05:00
_bz2module.c bpo-23224: Fix segfaults and multiple leaks in the lzma and bz2 modules (GH-7822) 2023-02-23 06:00:58 -08:00
_codecsmodule.c bpo-15999: Accept arbitrary values for boolean parameters. (#15609) 2022-12-03 11:52:21 -08:00
_collectionsmodule.c gh-103092: Isolate `_collections` (#103093) 2023-04-12 18:21:28 +05:30
_contextvarsmodule.c
_cryptmodule.c closes bpo-44751: Move crypt.h include from public header to _cryptmodule (GH-27394) 2021-07-27 15:58:12 -07:00
_csv.c gh-67230: add quoting rules to csv module (GH-29469) 2023-04-12 15:32:30 -07:00
_curses_panel.c gh-98724: Fix warnings on Py_SETREF() usage (#99781) 2022-11-26 00:30:37 +01:00
_cursesmodule.c bpo-15999: Accept arbitrary values for boolean parameters. (#15609) 2022-12-03 11:52:21 -08:00
_datetimemodule.c GH-103944: Check error status when raising DeprecationWarning (#103949) 2023-04-28 15:44:13 -04:00
_dbmmodule.c gh-99300: Use Py_NewRef() in Modules/ directory (#99466) 2022-11-14 13:08:15 +01:00
_elementtree.c gh-92123: Adapt _elementtree to multi-phase init (PEP 489) (#101285) 2023-01-24 17:00:24 +01:00
_functoolsmodule.c gh-99537: Use Py_SETREF() function in C code (#99656) 2022-11-22 14:22:22 +01:00
_gdbmmodule.c gh-99426: Use PyUnicode_FromFormat() and PyErr_Format() instead of sprintf (GH-99427) 2022-11-14 15:25:34 +02:00
_hashopenssl.c gh-103256: Fix hmac algorithm to support fallback implementation (gh-103286) 2023-04-07 10:51:29 +09:00
_heapqmodule.c gh-99300: Use Py_NewRef() in Modules/ directory (#99466) 2022-11-14 13:08:15 +01:00
_json.c gh-99925: Fix inconsistency in `json.dumps()` error messages (GH-99926) 2022-12-20 12:54:56 +02:00
_localemodule.c gh-102255: Improve build support for Windows API partitions (GH-102256) 2023-03-09 21:09:12 +00:00
_lsprof.c gh-102192: Replace PyErr_Fetch/Restore etc by more efficient alternatives (in Modules/) (#102196) 2023-02-24 21:43:03 +00:00
_lzmamodule.c bpo-23224: Fix segfaults and multiple leaks in the lzma and bz2 modules (GH-7822) 2023-02-23 06:00:58 -08:00
_math.h gh-101678: refactor the math module to use special functions from c11 (GH-101679) 2023-02-09 00:40:52 -08:00
_opcode.c gh-94216: add pseudo instructions to the dis/opcodes modules (GH-94241) 2022-07-01 15:33:35 +01:00
_operator.c gh-101476: Use _PyType_GetModuleState where applicable (#102188) 2023-02-24 21:16:29 +01:00
_pickle.c gh-103092: Isolate `_pickle` module (#102982) 2023-04-04 15:38:54 +05:30
_posixsubprocess.c gh-94518: Port 23-argument `_posixsubprocess.fork_exec` to Argument Clinic (#94519) 2023-04-24 18:27:48 +00:00
_queuemodule.c bpo-46613: Add PyType_GetModuleByDef to the public API (GH-31081) 2022-02-11 17:22:11 +01:00
_randommodule.c gh-102255: Improve build support for Windows API partitions (GH-102256) 2023-03-09 21:09:12 +00:00
_scproxy.c gh-99537: Use Py_SETREF(var, NULL) in C code (#99687) 2022-11-23 14:57:50 +01:00
_ssl.c gh-103242: Migrate SSLContext.set_ecdh_curve not to use deprecated APIs (#103378) 2023-04-08 10:56:42 -07:00
_ssl.h gh-100062: Remove error code tables from _ssl and err_names_to_codes (GH-100063) 2023-04-03 23:44:00 +01:00
_ssl_data.h
_ssl_data_111.h bpo-43788: Generate version specific _ssl_data.h (GH-25300) 2021-04-09 08:02:00 -07:00
_ssl_data_300.h bpo-43788: Generate version specific _ssl_data.h (GH-25300) 2021-04-09 08:02:00 -07:00
_stat.c
_statisticsmodule.c Statistics inv_cdf sync with corresponding random module normal distributions (#95265) 2022-07-26 02:23:33 -05:00
_struct.c gh-98248: Normalizing the error messages in function struct.pack (GH-98252) 2022-12-04 20:24:18 +00:00
_testbuffer.c gh-99300: Replace Py_INCREF() with Py_NewRef() (#99513) 2022-11-16 10:39:47 +01:00
_testcapi_feature_macros.inc gh-91324: List feature macros in the stable ABI manifest, improve tests (GH-32415) 2022-04-28 16:30:28 +02:00
_testcapimodule.c gh-101659: Isolate "obmalloc" State to Each Interpreter (gh-101660) 2023-04-24 17:23:57 -06:00
_testclinic.c gh-64490: Fix bugs in argument clinic varargs processing (#32092) 2022-11-24 20:56:50 +01:00
_testimportmultiple.c
_testinternalcapi.c gh-101758: Add a Test For Single-Phase Init Modules in Multiple Interpreters (gh-101920) 2023-02-15 16:05:07 -07:00
_testmultiphase.c gh-98040: Remove just the `imp` module (#98573) 2023-04-28 16:17:58 -07:00
_testsinglephase.c gh-102251: Updates to test_imp Toward Fixing Some Refleaks (gh-102254) 2023-02-27 09:21:18 -07:00
_threadmodule.c gh-103712: Increase the length of the type name in AttributeError messages (#103713) 2023-04-24 08:23:08 -06:00
_tkinter.c gh-103532: Remove TKINTER_PROTECT_LOADTK code (GH-103535) 2023-04-14 09:04:16 -05:00
_tracemalloc.c gh-101430: Update tracemalloc to handle presize properly. (gh-101745) 2023-02-10 08:30:03 +09:00
_typingmodule.c gh-99300: Use Py_NewRef() in Modules/ directory (#99468) 2022-11-14 13:44:56 +01:00
_uuidmodule.c bpo-45847: Port _uuid to PY_STDLIB_MOD (GH-29741) 2021-11-24 10:20:37 +01:00
_weakref.c bpo-46937: convert remaining functions to AC in _weakref (GH-31705) 2022-03-07 18:57:45 +09:00
_winapi.c GH-75586: Make shutil.which() on Windows more consistent with the OS (GH-103179) 2023-04-04 23:24:13 +01:00
_xxinterpchannelsmodule.c gh-101659: Add _Py_AtExit() (gh-103298) 2023-04-05 18:42:02 -06:00
_xxsubinterpretersmodule.c gh-101659: Add _Py_AtExit() (gh-103298) 2023-04-05 18:42:02 -06:00
_zoneinfo.c gh-102192: Replace PyErr_Fetch/Restore etc by more efficient alternatives (in Modules/) (#102196) 2023-02-24 21:43:03 +00:00
addrinfo.h gh-95174: WASI: skip missing sockets functions (GH-95179) 2022-07-27 08:19:23 +02:00
arraymodule.c gh-102650: Remove duplicate include directives from multiple source files (#102651) 2023-03-13 13:25:17 -06:00
atexitmodule.c gh-101659: Add _Py_AtExit() (gh-103298) 2023-04-05 18:42:02 -06:00
audioop.c gh-99537: Use Py_SETREF() function in C code (#99656) 2022-11-22 14:22:22 +01:00
binascii.c bpo-15999: Accept arbitrary values for boolean parameters. (#15609) 2022-12-03 11:52:21 -08:00
cmathmodule.c Few coverage nitpicks for the cmath module (#102067) 2023-02-22 19:10:01 +00:00
config.c.in Add tests for the C tokenizer and expose it as a private module (GH-27924) 2021-08-24 17:50:05 +01:00
errnomodule.c gh-102255: Improve build support for Windows API partitions (GH-102256) 2023-03-09 21:09:12 +00:00
faulthandler.c Fix typos in faulthandler, testcapi error messages (#103020) 2023-03-25 14:27:02 -07:00
fcntlmodule.c gh-93475: Expose FICLONE and FICLONERANGE constants in fcntl (#93478) 2022-06-06 23:21:58 +02:00
gc_weakref.txt Fix links to old SF bugs (#95648) 2022-08-04 18:12:35 +02:00
gcmodule.c gh-101408: PyObject_GC_Resize should calculate preheader size. (gh-101741) 2023-04-23 11:18:49 -06:00
getaddrinfo.c gh-74895: getaddrinfo no longer raises OverflowError (#2435) 2023-02-13 17:37:34 -08:00
getbuildinfo.c gh-81057: Move Globals in Core Code to _PyRuntimeState (gh-99496) 2022-11-15 09:45:11 -07:00
getnameinfo.c gh-95174: WASI: skip missing sockets functions (GH-95179) 2022-07-27 08:19:23 +02:00
getpath.c gh-102281: Fix potential nullptr dereference + use of uninitialized memory (gh-102282) 2023-03-15 21:58:43 +09:00
getpath.py gh-101543: Ensure Windows registry path is only used when stdlib can't be found (GH-101544) 2023-02-06 15:55:32 +00:00
getpath_noop.c bpo-45582: Port getpath[p].c to Python (GH-29041) 2021-12-03 00:08:42 +00:00
grpmodule.c
hashlib.h hashlib: Fix old message about unicode objects. (GH-28653) 2021-10-01 14:38:49 +02:00
itertoolsmodule.c gh-101476: Add _PyType_GetModuleState (GH-101477) 2023-02-23 13:42:15 -08:00
ld_so_aix.in
main.c gh-81057: Move More Globals in Core Code to _PyRuntimeState (gh-99516) 2022-11-16 09:37:14 -07:00
makesetup gh-96269: static and shared ext need different deps (#96316) 2022-11-16 14:03:35 +01:00
makexp_aix
mathmodule.c Fix typo in math.log docstring (#103943) 2023-04-28 00:31:31 -07:00
md5module.c gh-101476: Use _PyType_GetModuleState where applicable (#102188) 2023-02-24 21:16:29 +01:00
mmapmodule.c gh-102255: Improve build support for Windows API partitions (GH-102256) 2023-03-09 21:09:12 +00:00
nismodule.c gh-99537: Use Py_SETREF(var, NULL) in C code (#99687) 2022-11-23 14:57:50 +01:00
ossaudiodev.c bpo-15999: Accept arbitrary values for boolean parameters. (#15609) 2022-12-03 11:52:21 -08:00
overlapped.c gh-99300: Use Py_NewRef() in Modules/ directory (#99469) 2022-11-14 16:21:23 +01:00
posixmodule.c gh-102765: Update ntpath.isdir/isfile/islink/exists to use GetFileInformationByName when available (GH-103485) 2023-04-27 14:23:26 +00:00
posixmodule.h bpo-41498: Fix build on platforms without sigset_t (GH-29770) 2021-11-25 12:28:41 +01:00
pwdmodule.c bpo-46670: Remove unused macros in the Modules directory (GH-31194) 2022-02-07 16:21:31 +01:00
pyexpat.c GH-101797: allocate `PyExpat_CAPI` capsule on heap (#101798) 2023-02-11 14:07:39 +05:30
readline.c gh-99300: Use Py_NewRef() in Modules/ directory (#99469) 2022-11-14 16:21:23 +01:00
resource.c gh-94512: Fix forced arg format in AC-processed resource (GH-94515) 2022-07-29 12:48:11 +01:00
rotatingtree.c
rotatingtree.h
selectmodule.c gh-102255: Improve build support for Windows API partitions (GH-102256) 2023-03-09 21:09:12 +00:00
sha1module.c gh-101476: Use _PyType_GetModuleState where applicable (#102188) 2023-02-24 21:16:29 +01:00
sha2module.c gh-101476: Use _PyType_GetModuleState where applicable (#102188) 2023-02-24 21:16:29 +01:00
signalmodule.c gh-102650: Remove duplicate include directives from multiple source files (#102651) 2023-03-13 13:25:17 -06:00
socketmodule.c gh-89415: Add source-specific multicast constants to socket module (#103684) 2023-04-26 21:05:55 -07:00
socketmodule.h gh-103092: Isolate `socket` module (#103094) 2023-04-09 06:33:52 +05:30
spwdmodule.c gh-91217: deprecate spwd (#91846) 2022-04-23 14:48:17 -07:00
symtablemodule.c gh-94673: Ensure Builtin Static Types are Readied Properly (gh-103940) 2023-04-27 16:19:43 -06:00
syslogmodule.c gh-99127: Allow some features of syslog to the main interpreter only (gh-99128) 2022-11-30 07:58:20 +09:00
termios.c GH-97001: Release GIL in termios extension (#99503) 2022-11-22 11:14:23 +01:00
timemodule.c gh-102255: Improve build support for Windows API partitions (GH-102256) 2023-03-09 21:09:12 +00:00
tkappinit.c gh-103532: Remove TKINTER_PROTECT_LOADTK code (GH-103535) 2023-04-14 09:04:16 -05:00
tkinter.h gh-103532: Remove TKINTER_PROTECT_LOADTK code (GH-103535) 2023-04-14 09:04:16 -05:00
unicodedata.c gh-101372: Fix unicodedata.is_normalized to properly handle the UCD 3… (gh-101388) 2023-02-06 13:58:00 +09:00
unicodedata_db.h closes gh-96734: Update to Unicode 15.0.0. (GH-96809) 2022-09-13 15:45:12 -07:00
unicodename_db.h closes gh-96734: Update to Unicode 15.0.0. (GH-96809) 2022-09-13 15:45:12 -07:00
winreparse.h
xxlimited.c gh-99300: Use Py_NewRef() in Modules/ directory (#99473) 2022-11-14 16:21:40 +01:00
xxlimited_35.c gh-99300: Use Py_NewRef() in Modules/ directory (#99473) 2022-11-14 16:21:40 +01:00
xxmodule.c gh-99300: Use Py_NewRef() in Modules/ directory (#99473) 2022-11-14 16:21:40 +01:00
xxsubtype.c gh-99300: Use Py_NewRef() in Modules/ directory (#99473) 2022-11-14 16:21:40 +01:00
zlibmodule.c gh-101322: Ensure test_zlib.ZlibDecompressorTest runs, fix errors in ZlibDecompressor (#101323) 2023-02-04 12:07:30 -08:00

README

Source files for standard library extension modules,
and former extension modules that are now builtin modules.