cpython/Modules
Victor Stinner c40e6d6ebb
[3.13][3.15] gh-143008: Fix race re-initializing TextIOWrapper (#151203) (#151227)
[3.15] gh-143008: Fix race re-initializing TextIOWrapper (#151203)

__init__() changes multiple variables and may be called more than once
from multiple threads.

(cherry picked from commit 0318867acf)

Co-authored-by: Cody Maloney <cmaloney@users.noreply.github.com>
2026-06-10 09:40:14 +00:00
..
_blake2 [3.13] gh-134696: align OpenSSL and HACL*-based hash functions constructors AC signatures (GH-134713) (#134962) 2025-06-01 10:27:02 +02:00
_ctypes [3.13] gh-150319: Replace all documentation which says "See PEP 585" (#150325) (#150814) 2026-06-02 22:26:33 +00:00
_decimal [3.13] gh-143331: Schedule to remove format "N" for Decimal (GH-143372) (#143477) 2026-01-06 14:02:32 +00:00
_hacl gh-99108: Refresh HACL*; update modules accordingly; fix namespacing (GH-117237) 2024-03-26 00:35:26 +00:00
_io [3.13][3.15] gh-143008: Fix race re-initializing TextIOWrapper (#151203) (#151227) 2026-06-10 09:40:14 +00:00
_multiprocessing [3.13] gh-150285: Fix too long docstrings in Argument Clinic code (GH-150338) (GH-150350) (GH-150473) (GH-150526) 2026-05-27 18:06:50 +00:00
_sqlite [3.13] gh-150913: Fix sqlite3.Blob validation for empty slice assignment (GH-150915) (GH-150925) 2026-06-04 13:59:11 +00:00
_sre [3.13] gh-150319: Replace all documentation which says "See PEP 585" (#150325) (#150814) 2026-06-02 22:26:33 +00:00
_ssl [3.13] gh-137583: Only lock the SSL context, not the SSL socket (GH-137588) (GH-137613) 2025-08-11 22:05:13 -04:00
_testcapi [3.13] gh-151130: Add more tests for PyWeakref_* C API (GH-151131) (GH-151141) (#151148) 2026-06-09 22:24:39 +02:00
_testinternalcapi [3.13] gh-135641: Fix flaky test_capi.test_lock_two_threads test case (gh-135642) (gh-135688) 2025-06-18 18:47:59 +00:00
_testlimitedcapi [3.13] gh-151130: Add more tests for PyWeakref_* C API (GH-151131) (GH-151141) (#151148) 2026-06-09 22:24:39 +02:00
_xxtestfuzz [3.13] gh-121023: Improve _xxtestfuzz/README.rst (GH-121024) (#124140) 2024-09-23 17:23:54 -07:00
cjkcodecs [3.13] gh-150285: Fix too long docstrings in Argument Clinic code (GH-150338) (GH-150350) (GH-150473) (GH-150526) 2026-05-27 18:06:50 +00:00
clinic [3.13] gh-90949: expose Expat API to tune exponential expansion protections (GH-139368) 2026-06-09 15:23:22 +01:00
expat [3.13] gh-149698: Update bundled expat to 2.8.1 (GH-149699) (#149827) 2026-05-14 15:24:39 +00:00
_abc.c [3.13] gh-150285: Fix too long docstrings in Argument Clinic code (GH-150338) (GH-150350) (GH-150473) (GH-150526) 2026-05-27 18:06:50 +00:00
_asynciomodule.c [3.13] gh-150319: Replace all documentation which says "See PEP 585" (#150325) (#150814) 2026-06-02 22:26:33 +00:00
_bisectmodule.c [3.13] gh-150285: Fix too long docstrings in Argument Clinic code (GH-150338) (GH-150350) (GH-150473) (GH-150526) 2026-05-27 18:06:50 +00:00
_bz2module.c [3.13] gh-150599: Prevent bz2 decompressor reuse after errors (GH-150600) 2026-06-08 10:55:32 +01:00
_codecsmodule.c [3.13] gh-150285: Fix too long docstrings in Argument Clinic code (GH-150338) (GH-150350) (GH-150473) (GH-150526) 2026-05-27 18:06:50 +00:00
_collectionsmodule.c [3.13] gh-150319: Replace all documentation which says "See PEP 585" (#150325) (#150814) 2026-06-02 22:26:33 +00:00
_contextvarsmodule.c gh-116322: Add Py_mod_gil module slot (#116882) 2024-05-03 11:30:55 -04:00
_csv.c [3.13] gh-145105: Fix crash in csv.reader with re-entrant iterator (GH-145106) (#148405) 2026-04-11 22:44:45 +00:00
_curses_panel.c [3.13] gh-150285: Fix too long docstrings in the curses module (GH-150286) (GH-150457) (GH-150469) 2026-05-26 09:58:11 +00:00
_cursesmodule.c [3.13] gh-150285: Fix too long docstrings in the curses module (GH-150286) (GH-150457) (GH-150469) 2026-05-26 09:58:11 +00:00
_datetimemodule.c [3.13] gh-150285: Fix too long docstrings in Argument Clinic code (GH-150338) (GH-150350) (GH-150473) (GH-150526) 2026-05-27 18:06:50 +00:00
_dbmmodule.c [3.13] gh-150285: Fix too long docstrings in Argument Clinic code (GH-150338) (GH-150350) (GH-150473) (GH-150526) 2026-05-27 18:06:50 +00:00
_elementtree.c [3.13] gh-149018: Use XML_SetHashSalt16Bytes in pyexpat/_elementtree when possible (GH-149023) 2026-06-09 14:45:59 +00:00
_functoolsmodule.c [3.13] gh-150319: Replace all documentation which says "See PEP 585" (#150325) (#150814) 2026-06-02 22:26:33 +00:00
_gdbmmodule.c [3.13] gh-150285: Fix too long docstrings in Argument Clinic code (GH-150338) (GH-150350) (GH-150473) (GH-150526) 2026-05-27 18:06:50 +00:00
_hashopenssl.c [3.13] gh-150285: Fix too long docstrings in Argument Clinic code (GH-150338) (GH-150350) (GH-150473) (GH-150526) 2026-05-27 18:06:50 +00:00
_heapqmodule.c [3.13] Fix comments for heapq.siftup_max (GH-135359) (#136233) 2025-07-03 10:15:01 +00:00
_interpchannelsmodule.c [3.13] gh-149921: Fix reference leaks in _interpchannels and _interpqueues modules (GH-149922) (#149954) 2026-05-17 13:36:32 +00:00
_interpqueuesmodule.c [3.13] gh-149921: Fix reference leaks in _interpchannels and _interpqueues modules (GH-149922) (#149954) 2026-05-17 13:36:32 +00:00
_interpreters_common.h [3.13] gh-76785: Expand How Interpreter Channels Handle Interpreter Finalization (gh-121811) 2024-07-15 20:15:47 +00:00
_interpretersmodule.c [3.13] gh-135839: Fix module_traverse and module_clear in subinterp modules (GH-135937) (GH-135943) 2025-08-04 14:34:47 +02:00
_json.c [3.13] gh-142831: Fix use-after-free in json encoder during re-entrant mutation (gh-142851) (#150079) 2026-05-19 20:33:22 -07:00
_localemodule.c [3.13] Fix unlikely potential reference leak in _locale._getdefaultlocale (GH-145250) (GH-145303) 2026-03-24 02:18:19 +00:00
_lsprof.c [3.13] gh-132250: Clear error in lsprof callback when method descriptor raises an excep… (GH-132251) (#132281) 2025-04-08 17:19:40 -04:00
_lzmamodule.c [3.13] gh-150285: Fix too long docstrings in Argument Clinic code (GH-150338) (GH-150350) (GH-150473) (GH-150526) 2026-05-27 18:06:50 +00:00
_math.h
_opcode.c [3.13] gh-150285: Fix too long docstrings in Argument Clinic code (GH-150338) (GH-150350) (GH-150473) (GH-150526) 2026-05-27 18:06:50 +00:00
_operator.c [3.13] gh-127065: Make methodcaller thread-safe in free threading build (GH-127109) (GH-127150) 2024-11-22 14:51:40 +00:00
_pickle.c [3.13] gh-146059: Call fast_save_leave() in pickle save_frozenset() (GH-146173) (#146474) 2026-03-27 08:47:53 +00:00
_posixsubprocess.c [3.13] gh-150285: Fix too long docstrings in Argument Clinic code (GH-150338) (GH-150350) (GH-150473) (GH-150526) 2026-05-27 18:06:50 +00:00
_queuemodule.c [3.13] gh-150319: Replace all documentation which says "See PEP 585" (#150325) (#150814) 2026-06-02 22:26:33 +00:00
_randommodule.c [3.13] Fix a compiler warning in _randommodule.c (GH-141058) (#141064) 2025-11-05 19:08:41 +00:00
_scproxy.c gh-116322: Add Py_mod_gil module slot (#116882) 2024-05-03 11:30:55 -04:00
_ssl.c [3.13] gh-150285: Fix too long docstrings in Argument Clinic code (GH-150338) (GH-150350) (GH-150473) (GH-150526) 2026-05-27 18:06:50 +00:00
_ssl.h GH-103092: isolate _ssl (#104725) 2023-05-22 06:14:48 +05:30
_ssl_data_31.h gh-103142: Upgrade binary builds and CI to OpenSSL 1.1.1u (#105174) 2023-06-01 09:42:18 -07:00
_ssl_data_111.h gh-103142: Upgrade binary builds and CI to OpenSSL 1.1.1u (#105174) 2023-06-01 09:42:18 -07:00
_ssl_data_300.h gh-103142: Upgrade binary builds and CI to OpenSSL 1.1.1u (#105174) 2023-06-01 09:42:18 -07:00
_stat.c [3.13] gh-108765: fix comment about macro definitions in _stat.c post GH-108854 (GH-136027) (#136044) 2025-06-27 15:39:18 +00:00
_statisticsmodule.c gh-116322: Add Py_mod_gil module slot (#116882) 2024-05-03 11:30:55 -04:00
_struct.c [3.13] gh-148529: Minor improvements of the struct module documentation (GH-148565) (GH-149072) 2026-04-27 20:22:47 +00:00
_suggestions.c [3.13] gh-131936: Strengthen check in _suggestions._generate_suggestions (GH-131945) (#131949) 2025-03-31 17:54:20 +00:00
_sysconfig.c gh-116322: Add Py_mod_gil module slot (#116882) 2024-05-03 11:30:55 -04:00
_testbuffer.c gh-116322: Rename PyModule_ExperimentalSetGIL to PyUnstable_Module_SetGIL (GH-118645) 2024-05-06 18:59:36 +02: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 [3.13] gh-151130: Add more tests for PyWeakref_* C API (GH-151131) (GH-151141) (#151148) 2026-06-09 22:24:39 +02:00
_testclinic.c [3.13] gh-132753: Argument Clinic: Fix support of c_default for the bool converter (GH-132754) (GH-132766) 2025-04-21 07:10:31 +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 [3.13] gh-130052: Fix search_map_for_section() error handling (GH-132594) (#132598) 2025-04-16 14:21:58 +00:00
_testimportmultiple.c gh-116322: Add Py_mod_gil module slot (#116882) 2024-05-03 11:30:55 -04:00
_testinternalcapi.c [3.13] gh-146615: Fix format specifiers in test cextensions (GH-146618) (GH-146653) 2026-03-31 08:38:59 +00:00
_testlimitedcapi.c [3.13] gh-151130: Add more tests for PyWeakref_* C API (GH-151131) (GH-151141) (#151148) 2026-06-09 22:24:39 +02:00
_testmultiphase.c [3.13] gh-150285: Fix too long docstrings in Argument Clinic code (GH-150338) (GH-150350) (GH-150473) (GH-150526) 2026-05-27 18:06:50 +00:00
_testsinglephase.c [3.13] gh-144601: Avoid sharing exception objects raised in a PyInit function across multiple interpreters (GH-144602) (GH-144880) 2026-02-16 16:05:55 +00:00
_threadmodule.c [3.13] gh-137017: Ensure Thread.is_alive() only returns False after the underlying OS thread exits (gh-137315) (gh-138917) 2025-09-15 14:28:05 +01:00
_tkinter.c [3.13] gh-150285: Fix too long docstrings in Argument Clinic code (GH-150338) (GH-150350) (GH-150473) (GH-150526) 2026-05-27 18:06:50 +00:00
_tracemalloc.c [3.13] gh-128679: Fix tracemalloc.stop() race conditions (#128897) 2025-01-18 23:39:07 +00:00
_typingmodule.c [3.13] gh-123448: Move _PyNoDefault_Type to the static types array (GH-123449) (#123450) 2024-08-28 18:57:28 -07:00
_uuidmodule.c [3.13] gh-132710: only use stable _uuid.generate_time_safe() to deduce MAC address (GH-132901) (#134704) 2025-08-05 07:56:03 +00:00
_weakref.c [3.13] gh-120974: Make _asyncio._leave_task atomic in the free-threaded build (GH-122139) (#122186) 2024-07-23 17:30:58 +00:00
_winapi.c [3.13] gh-151126: Add missing PyErr_NoMemory in _winapi module (GH-151154) (#151182) 2026-06-09 17:07:51 +00:00
_zoneinfo.c [3.13] gh-145883: Fix two heap-buffer-overflows in _zoneinfo (GH-145885) (#148086) 2026-04-04 17:14:19 +01:00
addrinfo.h
arraymodule.c [3.13] gh-150319: Replace all documentation which says "See PEP 585" (#150325) (#150814) 2026-06-02 22:26:33 +00:00
atexitmodule.c [3.13] gh-142881: Fix concurrent and reentrant call of atexit.unregister() (GH-142901) (GH-143722) 2026-01-12 10:05:09 +00:00
binascii.c [3.13] gh-148093: Raise binascii.Error from binascii.a2b_uu() on empty input (GH-149077) (GH-149349) 2026-05-04 10:06:25 +00:00
cmathmodule.c [3.13] gh-150285: Fix too long docstrings in Argument Clinic code (GH-150338) (GH-150350) (GH-150473) (GH-150526) 2026-05-27 18:06:50 +00:00
config.c.in gh-104169: Fix test_peg_generator after tokenizer refactoring (#110727) 2023-10-12 09:34:35 +02:00
errnomodule.c gh-116322: Add Py_mod_gil module slot (#116882) 2024-05-03 11:30:55 -04:00
faulthandler.c [3.13] gh-149590: Remove faulthandler_traverse (GH-150023) (#150087) 2026-05-19 15:04:13 +00:00
fcntlmodule.c [3.13] gh-140615: Update docstrings in the fcntl module (GH-140619) (GH-141231) (GH-141232) 2025-11-08 11:50:17 +00:00
gc_weakref.txt
gcmodule.c [3.13] gh-150285: Fix too long docstrings in Argument Clinic code (GH-150338) (GH-150350) (GH-150473) (GH-150526) 2026-05-27 18:06:50 +00: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
getpath.c [3.13] gh-121103: Put free-threaded libraries in lib/python3.14t (GH-121293) (#121631) 2024-07-11 21:00:28 +00:00
getpath.py [3.13] gh-121103: Put free-threaded libraries in lib/python3.14t (GH-121293) (#121631) 2024-07-11 21:00:28 +00:00
getpath_noop.c
grpmodule.c [3.13] gh-126316: Make grp.getgrall() thread-safe: add a mutex (#127055) (#127104) 2024-11-26 12:01:50 +01:00
hashlib.h [3.13] gh-134696: align OpenSSL and HACL*-based hash functions constructors AC signatures (GH-134713) (#134962) 2025-06-01 10:27:02 +02:00
itertoolsmodule.c [3.13] gh-150319: Replace all documentation which says "See PEP 585" (#150325) (#150814) 2026-06-02 22:26:33 +00:00
ld_so_aix.in
main.c [3.13] gh-145376: Fix various reference leaks (GH-145377) (#148661) 2026-05-12 18:35:27 +00:00
makesetup [3.13] gh-116622: Rename build variable MODULE_LDFLAGS back to LIBPYTHON (GH-122764) (GH-122842) 2024-08-09 14:45:04 -07:00
makexp_aix
mathmodule.c [3.13] Correct frexp() docs for zero and non-finite numbers (GH-149753) (GH-150654) 2026-05-31 07:58:24 +00:00
md5module.c [3.13] gh-145376: Fix crashes in md5module.c (GH-145422) (#145611) 2026-03-06 22:24:20 +00:00
mmapmodule.c [3.13] gh-138204: Forbid expansion of a shared anonymous mmap on Linux (GH-138220) (GH-138387) 2025-09-03 11:33:08 +03:00
overlapped.c [3.13] gh-150285: Fix too long docstrings in Argument Clinic code (GH-150338) (GH-150350) (GH-150473) (GH-150526) 2026-05-27 18:06:50 +00:00
posixmodule.c [3.13] gh-150319: Replace all documentation which says "See PEP 585" (#150325) (#150814) 2026-06-02 22:26:33 +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 [3.13] gh-149018: Use XML_SetHashSalt16Bytes in pyexpat/_elementtree when possible (GH-149023) 2026-06-09 14:45:59 +00:00
readline.c [3.13] gh-150372: Add missing null check on completer_word_break_characters in readline.c (GH-150251) (GH-150630) 2026-05-31 14:59:05 +03:00
README
resource.c [3.13] gh-137044: Support large limit values in getrlimit() and setrlimit() (GH-137338) (GH-137507) 2025-08-07 09:37:02 +00:00
rotatingtree.c [3.13] gh-116181: Remove Py_BUILD_CORE_BUILTIN and Py_BUILD_CORE_MODULE in rotatingtree.c (GH-121260) (#121307) 2024-07-03 07:59:26 +00:00
rotatingtree.h
selectmodule.c [3.13] gh-150285: Fix too long docstrings in Argument Clinic code (GH-150338) (GH-150350) (GH-150473) (GH-150526) 2026-05-27 18:06:50 +00:00
Setup gh-76785: Rename _xxsubinterpreters to _interpreters (gh-117791) 2024-04-24 16:18:24 +00:00
Setup.bootstrap.in gh-110721: Remove unused code from suggestions.c after moving PyErr_Display to use the traceback module (#113712) 2024-01-08 15:10:45 +00:00
Setup.stdlib.in [3.13] gh-151130: Add more tests for PyWeakref_* C API (GH-151131) (GH-151141) (#151148) 2026-06-09 22:24:39 +02:00
sha1module.c [3.13] gh-134696: align OpenSSL and HACL*-based hash functions constructors AC signatures (GH-134713) (#134962) 2025-06-01 10:27:02 +02:00
sha2module.c [3.13] gh-134696: align OpenSSL and HACL*-based hash functions constructors AC signatures (GH-134713) (#134962) 2025-06-01 10:27:02 +02:00
sha3module.c [3.13] gh-134696: align OpenSSL and HACL*-based hash functions constructors AC signatures (GH-134713) (#134962) 2025-06-01 10:27:02 +02:00
signalmodule.c [3.13] gh-150285: Fix too long docstrings in Argument Clinic code (GH-150338) (GH-150350) (GH-150473) (GH-150526) 2026-05-27 18:06:50 +00:00
socketmodule.c [3.13] gh-150406: Check result of PyThread_allocate_lock() for netdb_lock (GH-150407) (GH-150618) 2026-05-30 19:56:46 +03:00
socketmodule.h [3.13] gh-132429: Fix support of Bluetooth sockets on NetBSD and DragonFly BSD (GH-132431) (GH-132458) 2025-04-13 01:22:41 +03:00
symtablemodule.c [3.13] gh-139748: fix leaks in AC error paths when using unicode FS-b… (#139792) 2025-10-08 22:21:49 +05:30
syslogmodule.c [3.13] gh-130163: Fix crashes related to PySys_GetObject() (GH-130503) (GH-130556) 2025-02-25 22:50:26 +00:00
termios.c [3.13] gh-150285: Fix too long docstrings in Argument Clinic code (GH-150338) (GH-150350) (GH-150473) (GH-150526) 2026-05-27 18:06:50 +00:00
timemodule.c [3.13] gh-130617 : fix time_clockid_converter on DragonFlyBSD (GH-130634) (#130666) 2025-02-28 08:19:45 +00:00
tkappinit.c gh-103538: Remove unused TK_AQUA code (GH-103539) 2023-05-10 18:53:13 +00:00
tkinter.h
unicodedata.c [3.13] gh-149079: Fix O(n^2) canonical ordering in unicodedata.normalize() (GH-149080) (#150780) 2026-06-02 16:12:42 +00:00
unicodedata_db.h gh-96954: Fix make regen-unicodedata in out-of-tree builds (#112118) 2023-11-15 16:42:17 +00:00
unicodename_db.h [3.13] gh-80667: Fix lookup for Tangut ideographs in unicodedata (GH-144789) (GH-144871) (GH-144875) 2026-02-16 15:02:01 +00:00
winreparse.h
xxlimited.c [3.13] gh-134160: Use PyModuleDef.m_free in the example module xxlimited (GH-135174) (GH-135214) 2025-06-07 11:03:32 +02:00
xxlimited_35.c gh-116322: Add Py_mod_gil module slot (#116882) 2024-05-03 11:30:55 -04:00
xxmodule.c [3.13] gh-122040: reword Modules/xxmodule.c module-level comment (GH-132201) (#132207) 2025-04-07 08:27:34 +00:00
xxsubtype.c gh-116322: Add Py_mod_gil module slot (#116882) 2024-05-03 11:30:55 -04:00
zlibmodule.c [3.13] gh-150285: Fix too long docstrings in Argument Clinic code (GH-150338) (GH-150350) (GH-150473) (GH-150526) 2026-05-27 18:06:50 +00:00

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