cpython/Modules
Kumar Aditya 660f126f87
gh-129898: per-thread current task implementation in asyncio (#129899)
Store the current running task on the thread state, it makes it thread safe for the free-threading build and while improving performance as there is no lock contention, this effectively makes it lock free.
When accessing the current task of the current running loop in current thread, no locking is required and can be acessed without locking.
In the rare case of accessing current task of a loop running in a different thread, the stop the world pauses is used in free-threading builds to stop all other running threads and find the task for the specified loop.

This also makes it easier for external introspection to find the current task, and now it will be always correct.
2025-02-19 16:34:49 +00:00
..
_ctypes gh-128911: Use PyImport_ImportModuleAttr() function (#129657) 2025-02-05 11:03:58 +01:00
_decimal gh-130230: Fix crash in pow() with only Decimal third argument (GH-130237) 2025-02-18 09:46:48 +02:00
_hacl gh-127897: fix HACL* build on macOS/Catalina (GH-127932) 2024-12-17 22:14:16 -08:00
_io gh-111178: fix UBSan failures in Modules/_io/*.c (GH-129083) 2025-02-08 14:21:32 +01:00
_multiprocessing gh-111178: fix UBSan failures in Modules/_multiprocessing/semaphore.c (#129084) 2025-01-20 20:43:55 +00:00
_sqlite gh-129928: Rework sqlite3 error helpers (#129929) 2025-02-11 07:49:25 +00:00
_sre gh-129983: fix data race in compile_template in sre.c (#130015) 2025-02-12 18:34:44 +05:30
_ssl gh-111178: fix UBSan failures in Modules/_ssl/cert.c (GH-129088) 2025-01-30 11:11:37 +01:00
_testcapi gh-128911: Use PyImport_ImportModuleAttr() function (#129657) 2025-02-05 11:03:58 +01:00
_testinternalcapi Fixes loop variables to be the same types as their limit (GH-120958) 2024-06-24 17:11:47 +01:00
_testlimitedcapi gh-111495: Add PyFile tests (#129449) 2025-01-30 18:05:32 +01:00
_xxtestfuzz gh-121023: Improve _xxtestfuzz/README.rst (#121024) 2024-09-16 23:28:09 +03:00
cjkcodecs gh-128911: Add PyImport_ImportModuleAttr() function (#128912) 2025-01-30 11:17:29 +00:00
clinic gh-91048: fix thread safety for asyncio stack introspection APIs (#129399) 2025-02-06 21:33:52 +05:30
expat gh-126623: Update libexpat to 2.6.4, make future updates easier (GH-126792) 2024-11-13 18:31:20 +00:00
_abc.c gh-111178: fix UBSan failures in Modules/_abc.c (GH-128253) 2025-01-07 12:45:29 +01:00
_asynciomodule.c gh-129898: per-thread current task implementation in asyncio (#129899) 2025-02-19 16:34:49 +00:00
_bisectmodule.c gh-126035: add missing whitespace to *Py_EnterRecursiveCall() messages (#126036) 2024-10-27 22:55:48 +01:00
_bz2module.c gh-111178: fix UBSan failures in Modules/_bz2module.c (GH-128238) 2025-01-10 11:47:19 +01:00
_codecsmodule.c gh-124665: Add _PyCodec_UnregisterError and _codecs._unregister_error (#124677) 2024-09-29 02:25:23 +02:00
_collectionsmodule.c gh-111178: fix UBSan failures in Modules/_collectionsmodule.c (#129773) 2025-02-17 12:12:03 +00:00
_complex.h gh-61103: Support float and long double complex types in ctypes module (#121248) 2024-07-03 11:08:11 +02:00
_contextvarsmodule.c gh-116322: Add Py_mod_gil module slot (#116882) 2024-05-03 11:30:55 -04:00
_csv.c gh-129409: Fix Integer overflow - SEGV while writing data more than 2GB in CSV file (#129413) 2025-01-29 11:15:47 +00:00
_curses_panel.c gh-111178: fix UBSan failures in Modules/curses*.c (GH-128244) 2025-01-03 15:12:40 +01:00
_cursesmodule.c gh-128911: Add PyImport_ImportModuleAttr() function (#128912) 2025-01-30 11:17:29 +00:00
_datetimemodule.c gh-111178: fix UBSan failures in Modules/_datetimemodule.c (GH-129774) 2025-02-19 11:18:37 +00:00
_dbmmodule.c gh-111178: fix UBSan failures in Modules/_dbmmodule.c (#129775) 2025-02-10 11:02:47 +01:00
_elementtree.c gh-128911: Add PyImport_ImportModuleAttr() function (#128912) 2025-01-30 11:17:29 +00:00
_functoolsmodule.c gh-126133: Only use start year in PSF copyright, remove end years (#126236) 2024-11-12 15:59:19 +02:00
_gdbmmodule.c gh-111178: fix UBSan failures for gdbmobject (GH-128178) 2025-01-10 11:52:36 +01:00
_hashopenssl.c gh-128657: fix _hashopenssl ref/data race (GH-128886) 2025-02-07 18:47:45 -08:00
_heapqmodule.c Remove almost all unpaired backticks in docstrings (#119231) 2024-05-22 12:35:18 -04:00
_interpchannelsmodule.c gh-111178: fix UBSan failures in Modules/_interp*module.c (GH-129779) 2025-02-17 11:34:14 +01:00
_interpqueuesmodule.c gh-111178: fix UBSan failures in Modules/_interp*module.c (GH-129779) 2025-02-17 11:34:14 +01:00
_interpreters_common.h gh-76785: Improved Subinterpreters Compatibility with 3.12 (2/2) (gh-126707) 2024-11-12 10:41:51 -07:00
_interpretersmodule.c gh-111178: fix UBSan failures in Modules/_interp*module.c (GH-129779) 2025-02-17 11:34:14 +01:00
_json.c gh-111178: fix UBSan failures in Modules/_jsonmodule.c (GH-129781) 2025-02-17 14:51:18 +01:00
_localemodule.c Fix a typo in _localemodule.c (GH-130085) 2025-02-13 17:29:26 +00:00
_lsprof.c gh-111178: fix UBSan failures in Modules/_lsprof.c (GH-129782) 2025-02-17 14:53:03 +01:00
_lzmamodule.c gh-111178: fix UBSan failures in Modules/_lzmamodule.c (GH-129783) 2025-02-18 14:48:21 +01:00
_math.h gh-122681: remove m_atan2()/c_atan2() helpers (#122715) 2024-08-17 13:48:16 +05:30
_opcode.c gh-100239: replace BINARY_SUBSCR & family by BINARY_OP with oparg NB_SUBSCR (#129700) 2025-02-07 22:39:54 +00:00
_operator.c gh-128911: Add PyImport_ImportModuleAttr() function (#128912) 2025-01-30 11:17:29 +00:00
_pickle.c gh-130179: Fix persistent_{id,load}_attr reference leaks in _pickle (#130180) 2025-02-16 17:00:03 +03:00
_posixsubprocess.c gh-121381 Remove subprocess._USE_VFORK escape hatch (#121383) 2024-07-30 18:39:54 -07:00
_queuemodule.c gh-116322: Add Py_mod_gil module slot (#116882) 2024-05-03 11:30:55 -04:00
_randommodule.c gh-123497: New limit for Python integers on 64-bit platforms (GH-123724) 2024-09-29 10:40:20 +03:00
_scproxy.c gh-116322: Add Py_mod_gil module slot (#116882) 2024-05-03 11:30:55 -04:00
_ssl.c gh-129354: Use PyErr_FormatUnraisable() function (#129518) 2025-01-31 15:06:14 +01:00
_ssl.h GH-103092: isolate _ssl (#104725) 2023-05-22 06:14:48 +05:30
_ssl_data_34.h gh-127330: Update for OpenSSL 3.4 & document+improve the update process (GH-127331) 2024-11-28 13:29:27 +01:00
_ssl_data_111.h gh-127330: Update for OpenSSL 3.4 & document+improve the update process (GH-127331) 2024-11-28 13:29:27 +01:00
_ssl_data_300.h gh-127330: Update for OpenSSL 3.4 & document+improve the update process (GH-127331) 2024-11-28 13:29:27 +01:00
_stat.c Fix typos in docs, error messages and comments (#123336) 2024-08-28 14:41:04 +03:00
_statisticsmodule.c gh-116322: Add Py_mod_gil module slot (#116882) 2024-05-03 11:30:55 -04:00
_struct.c gh-125118: don't copy arbitrary values to _Bool in the struct module (GH-125169) 2024-10-10 14:42:03 +02:00
_suggestions.c gh-116322: Add Py_mod_gil module slot (#116882) 2024-05-03 11:30:55 -04:00
_sysconfig.c gh-116322: Add Py_mod_gil module slot (#116882) 2024-05-03 11:30:55 -04:00
_testbuffer.c gh-120674: Protect multi-line macros in _testbuffer.c and _testcapimodule.c (#120675) 2024-06-18 12:04:52 +00:00
_testcapi_feature_macros.inc gh-91325: Skip Stable ABI checks with Py_TRACE_REFS special build (GH-92046) 2024-01-29 16:45:31 +01:00
_testcapimodule.c GH-91079: Implement C stack limits using addresses, not counters. (GH-130007) 2025-02-19 11:44:57 +00:00
_testclinic.c gh-122943: Remove the object converter for var-positional parameter (GH-126560) 2024-11-08 05:41:54 +00:00
_testclinic_limited.c gh-116322: Rename PyModule_ExperimentalSetGIL to PyUnstable_Module_SetGIL (GH-118645) 2024-05-06 18:59:36 +02:00
_testexternalinspection.c GH-91048: Correct error path in testexternalinspection (#129557) 2025-02-13 01:07:01 +00:00
_testimportmultiple.c gh-116322: Add Py_mod_gil module slot (#116882) 2024-05-03 11:30:55 -04:00
_testinternalcapi.c GH-91079: Implement C stack limits using addresses, not counters. (GH-130007) 2025-02-19 11:44:57 +00:00
_testlimitedcapi.c gh-111495: Add PyFile tests (#129449) 2025-01-30 18:05:32 +01:00
_testmultiphase.c gh-116322: Rename PyModule_ExperimentalSetGIL to PyUnstable_Module_SetGIL (GH-118645) 2024-05-06 18:59:36 +02:00
_testsinglephase.c gh-123880: Allow recursive import of single-phase-init modules (GH-123950) 2024-09-20 10:27:34 +02:00
_threadmodule.c gh-129354: Use PyErr_FormatUnraisable() function (#129518) 2025-01-31 15:06:14 +01:00
_tkinter.c gh-124111: Update tkinter for compatibility with Tcl/Tk 9.0.0 (GH-124156) 2024-11-14 12:45:08 -06:00
_tracemalloc.c gh-128679: Redesign tracemalloc locking (#128888) 2025-01-15 20:22:44 +00:00
_typingmodule.c gh-123448: Move _PyNoDefault_Type to the static types array (#123449) 2024-08-28 18:27:40 -07:00
_uuidmodule.c gh-116322: Add Py_mod_gil module slot (#116882) 2024-05-03 11:30:55 -04:00
_weakref.c gh-120974: Make _asyncio._leave_task atomic in the free-threaded build (#122139) 2024-07-23 17:06:03 +00:00
_winapi.c gh-129354: Fix grammar in PyErr_FormatUnraisable() (#129475) 2025-01-31 09:45:35 +01:00
_zoneinfo.c gh-128911: Add PyImport_ImportModuleAttr() function (#128912) 2025-01-30 11:17:29 +00:00
addrinfo.h gh-95174: WASI: skip missing sockets functions (GH-95179) 2022-07-27 08:19:23 +02:00
arraymodule.c gh-111178: fix UBSan failures in Modules/arraymodule.c (GH-129772) 2025-02-08 14:26:14 +01:00
atexitmodule.c gh-129354: Fix grammar in PyErr_FormatUnraisable() (#129475) 2025-01-31 09:45:35 +01:00
binascii.c gh-118314: Fix padding edge case in binascii.a2b_base64 strict mode (GH-118320) 2024-05-07 11:18:45 +02:00
blake2module.c gh-111178: fix UBSan failures in Modules/{blake2,md5,sha1,sha2,sha3}module.c (GH-128248) 2025-01-27 14:50:58 +01:00
cmathmodule.c gh-120026: soft deprecate Py_HUGE_VAL macro (#120027) 2024-11-01 22:04:31 +00:00
config.c.in gh-126107: Remove copyright block from Modules/config.c.in (#126982) 2025-01-26 16:57:32 +00:00
errnomodule.c gh-126585: Add EHWPOISON error code (#126586) 2024-12-03 12:45:50 +00:00
faulthandler.c gh-128911: Add PyImport_ImportModuleAttr() function (#128912) 2025-01-30 11:17:29 +00:00
fcntlmodule.c gh-116622: Don't expose FICLONE ioctl on Android (#122522) 2024-08-01 00:23:10 +00:00
gc_weakref.txt Fix links to old SF bugs (#95648) 2022-08-04 18:12:35 +02:00
gcmodule.c gh-122943: Rework support of var-positional parameter in Argument Clinic (GH-122945) 2024-11-07 23:40:03 +02:00
getaddrinfo.c gh-108767: Replace ctype.h functions with pyctype.h functions (#108772) 2023-09-01 18:36:53 +02:00
getbuildinfo.c gh-106320: Remove private pylifecycle.h functions (#106400) 2023-07-04 09:41:43 +00:00
getnameinfo.c gh-95174: WASI: skip missing sockets functions (GH-95179) 2022-07-27 08:19:23 +02:00
getpath.c gh-129354: Fix grammar in PyErr_FormatUnraisable() (#129475) 2025-01-31 09:45:35 +01:00
getpath.py GH-128469: Revert "warn when libpython was loaded from outside the build directory (#128645)" (#129506) 2025-01-31 11:17:37 +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 gh-126316: Make grp.getgrall() thread-safe: add a mutex (#127055) 2024-11-21 15:47:24 +01:00
hashlib.h gh-111863: Rename Py_NOGIL to Py_GIL_DISABLED (#111864) 2023-11-20 15:52:00 +02:00
itertoolsmodule.c gh-111178: fix UBSan failures in Modules/itertoolsmodule.c (GH-129780) 2025-02-19 11:58:47 +01:00
ld_so_aix.in Issue #10656: Fix out-of-tree building on AIX 2016-11-20 07:56:37 +00:00
main.c gh-128130: Fix unhandled keyboard interrupt data race (gh-129975) 2025-02-13 12:29:03 -05:00
makesetup gh-116622: Rename build variable MODULE_LDFLAGS back to LIBPYTHON (#122764) 2024-08-09 00:00:55 +02:00
makexp_aix bpo-42087: Remove support for AIX 5.3 and below (GH-22830) 2020-11-16 16:16:10 +01:00
mathmodule.c gh-101410: support custom messages for domain errors in the math module (#124299) 2025-01-23 13:55:25 +00:00
md5module.c gh-111178: fix UBSan failures in Modules/{blake2,md5,sha1,sha2,sha3}module.c (GH-128248) 2025-01-27 14:50:58 +01:00
mmapmodule.c gh-111178: fix UBSan failures in Modules/mmapmodule.c (GH-129784) 2025-02-19 12:02:32 +01:00
overlapped.c gh-129354: Fix grammar in PyErr_FormatUnraisable() (#129475) 2025-01-31 09:45:35 +01:00
posixmodule.c gh-129539: Reorganize posixmodule.c header (#129558) 2025-02-02 09:16:48 +00:00
posixmodule.h gh-85283: Convert grp extension to the limited C API (#116611) 2024-03-12 00:46:53 +00:00
pwdmodule.c gh-116322: Add Py_mod_gil module slot (#116882) 2024-05-03 11:30:55 -04:00
pyexpat.c gh-129354: Use PyErr_FormatUnraisable() function (#129514) 2025-01-31 14:20:35 +01:00
readline.c gh-122431: Disallow negative values in readline.append_history_file (#122469) 2024-12-05 16:07:38 +00:00
README Issue #18093: Factor out the programs that embed the runtime 2014-07-25 21:52:14 +10:00
resource.c gh-116322: Add Py_mod_gil module slot (#116882) 2024-05-03 11:30:55 -04:00
rotatingtree.c gh-116181: Remove Py_BUILD_CORE_BUILTIN and Py_BUILD_CORE_MODULE in rotatingtree.c (#121260) 2024-07-03 13:05:05 +05:30
rotatingtree.h bpo-32150: Expand tabs to spaces in C files. (#4583) 2017-11-28 17:56:10 +02:00
selectmodule.c gh-128911: Add PyImport_ImportModuleAttr() function (#128912) 2025-01-30 11:17:29 +00:00
Setup GH-99108: Amend Modules/Setup (#123146) 2024-08-23 08:40:31 +02:00
Setup.bootstrap.in gh-121554: remove unnecessary internal functions in compile.c (#121555) 2024-07-10 23:48:37 +01:00
Setup.stdlib.in gh-93649: Add Modules/_testcapi/function.c file (#129521) 2025-01-31 16:02:50 +01:00
sha1module.c gh-111178: fix UBSan failures in Modules/{blake2,md5,sha1,sha2,sha3}module.c (GH-128248) 2025-01-27 14:50:58 +01:00
sha2module.c gh-111178: fix UBSan failures in Modules/{blake2,md5,sha1,sha2,sha3}module.c (GH-128248) 2025-01-27 14:50:58 +01:00
sha3module.c gh-111178: fix UBSan failures in Modules/{blake2,md5,sha1,sha2,sha3}module.c (GH-128248) 2025-01-27 14:50:58 +01:00
signalmodule.c gh-129354: Fix grammar in PyErr_FormatUnraisable() (#129475) 2025-01-31 09:45:35 +01:00
socketmodule.c gh-129354: Use PyErr_FormatUnraisable() function (#129656) 2025-02-04 16:21:10 +01:00
socketmodule.h gh-124944: Add socket.SO_ORIGINAL_DST (#124945) 2024-10-15 00:36:38 +02:00
symtablemodule.c gh-119933: Improve `SyntaxError` message for invalid type parameters expressions (#119976) 2024-06-17 06:51:03 -07:00
syslogmodule.c gh-129345: null check for indent syslogmodule (#129348) 2025-01-29 19:19:23 +05:30
termios.c gh-119770: Make termios ioctl() constants positive (#119840) 2024-05-31 17:18:40 +02:00
timemodule.c gh-128911: Add PyImport_ImportModuleAttr() function (#128912) 2025-01-30 11:17:29 +00:00
tkappinit.c gh-103538: Remove unused TK_AQUA code (GH-103539) 2023-05-10 18:53:13 +00:00
tkinter.h gh-103532: Remove TKINTER_PROTECT_LOADTK code (GH-103535) 2023-04-14 09:04:16 -05:00
unicodedata.c gh-115754: Use Py_GetConstant(Py_CONSTANT_EMPTY_STR) (#125194) 2024-10-09 17:15:23 +02:00
unicodedata_db.h closes gh-124016: update Unicode to 16.0.0 (#124017) 2024-09-13 07:47:04 -07:00
unicodename_db.h closes gh-124016: update Unicode to 16.0.0 (#124017) 2024-09-13 07:47:04 -07:00
winreparse.h bpo-31512: Add non-elevated symlink support for Windows (GH-3652) 2019-04-09 11:19:46 -07:00
xxlimited.c gh-116322: Add Py_mod_gil module slot (#116882) 2024-05-03 11:30:55 -04:00
xxlimited_35.c gh-116322: Add Py_mod_gil module slot (#116882) 2024-05-03 11:30:55 -04:00
xxmodule.c gh-116322: Add Py_mod_gil module slot (#116882) 2024-05-03 11:30:55 -04:00
xxsubtype.c gh-116322: Add Py_mod_gil module slot (#116882) 2024-05-03 11:30:55 -04:00
zlibmodule.c gh-111178: fix UBSan failures in Modules/zlibmodule.c (GH-128252) 2025-01-03 15:36:41 +01:00

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