cpython/Modules
Neil Schemenauer 1b15c89a17
gh-115999: Specialize `STORE_ATTR` in free-threaded builds. (gh-127838)
* Add `_PyDictKeys_StringLookupSplit` which does locking on dict keys and
  use in place of `_PyDictKeys_StringLookup`.

* Change `_PyObject_TryGetInstanceAttribute` to use that function
  in the case of split keys.

* Add `unicodekeys_lookup_split` helper which allows code sharing
  between `_Py_dict_lookup` and `_PyDictKeys_StringLookupSplit`.

* Fix locking for `STORE_ATTR_INSTANCE_VALUE`.  Create
  `_GUARD_TYPE_VERSION_AND_LOCK` uop so that object stays locked and
  `tp_version_tag` cannot change.

* Pass `tp_version_tag` to `specialize_dict_access()`, ensuring
  the version we store on the cache is the correct one (in case of
  it changing during the specalize analysis).

* Split `analyze_descriptor` into `analyze_descriptor_load` and
  `analyze_descriptor_store` since those don't share much logic.
  Add `descriptor_is_class` helper function.

* In `specialize_dict_access`, double check `_PyObject_GetManagedDict()`
  in case we race and dict was materialized before the lock.

* Avoid borrowed references in `_Py_Specialize_StoreAttr()`.

* Use `specialize()` and `unspecialize()` helpers.

* Add unit tests to ensure specializing happens as expected in FT builds.

* Add unit tests to attempt to trigger data races (useful for running under TSAN).

* Add `has_split_table` function to `_testinternalcapi`.
2024-12-19 10:21:17 -08:00
..
_ctypes gh-126742: Add _PyErr_SetLocaleString, use it for gdbm & dlerror messages (GH-126746) 2024-12-17 12:12:45 +01:00
_decimal gh-126133: Only use start year in PSF copyright, remove end years (#126236) 2024-11-12 15:59:19 +02:00
_hacl gh-127897: fix HACL* build on macOS/Catalina (GH-127932) 2024-12-17 22:14:16 -08:00
_io gh-128083: Fix macro redefinition warning in clinic. (GH-127950) 2024-12-19 15:00:30 +01:00
_multiprocessing gh-122943: Add the varpos parameter in _PyArg_UnpackKeywords (GH-126564) 2024-11-08 14:23:50 +02:00
_sqlite gh-126742: Add _PyErr_SetLocaleString, use it for gdbm & dlerror messages (GH-126746) 2024-12-17 12:12:45 +01:00
_sre gh-101955: Fix SystemError in possesive quantifier with alternative and group (GH-111362) 2024-11-18 13:43:44 +02:00
_ssl gh-122943: Add the varpos parameter in _PyArg_UnpackKeywords (GH-126564) 2024-11-08 14:23:50 +02:00
_testcapi GH-122548: Implement branch taken and not taken events for sys.monitoring (GH-122564) 2024-12-19 16:59:51 +00:00
_testinternalcapi
_testlimitedcapi gh-124502: Add PyUnicode_Equal() function (#124504) 2024-10-07 21:24:53 +00:00
_xxtestfuzz gh-121023: Improve `_xxtestfuzz/README.rst` (#121024) 2024-09-16 23:28:09 +03:00
cjkcodecs gh-122943: Add the varpos parameter in _PyArg_UnpackKeywords (GH-126564) 2024-11-08 14:23:50 +02:00
clinic gh-128083: Fix macro redefinition warning in clinic. (GH-127950) 2024-12-19 15:00:30 +01:00
expat gh-126623: Update libexpat to 2.6.4, make future updates easier (GH-126792) 2024-11-13 18:31:20 +00:00
README
Setup GH-99108: Amend Modules/Setup (#123146) 2024-08-23 08:40:31 +02:00
Setup.bootstrap.in
Setup.stdlib.in gh-111495: Add tests for `PyCodec_*` C API (#123343) 2024-09-29 15:22:39 +00:00
_abc.c
_asynciomodule.c gh-121621: clear running loop early in asyncio (#128004) 2024-12-18 14:25:03 +00:00
_bisectmodule.c gh-126035: add missing whitespace to *Py_EnterRecursiveCall() messages (#126036) 2024-10-27 22:55:48 +01:00
_bz2module.c
_codecsmodule.c gh-124665: Add `_PyCodec_UnregisterError` and `_codecs._unregister_error` (#124677) 2024-09-29 02:25:23 +02:00
_collectionsmodule.c gh-124153: Remove `_PyType_GetModuleByDef2` private function (GH-124261) 2024-09-26 18:21:11 +02: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
_csv.c gh-116738: Make `_csv` module thread-safe (#118344) 2024-10-11 23:25:36 +05:30
_curses_panel.c
_cursesmodule.c gh-126313: Fix a crash in curses.napms() due to incorrect error handling (GH-126351) 2024-11-03 15:08:34 +00:00
_datetimemodule.c gh-115754: Use Py_GetConstant(Py_CONSTANT_EMPTY_STR) (#125583) 2024-10-25 11:14:52 +02:00
_dbmmodule.c
_elementtree.c gh-111178: fix UBSan failures in `_elementtree.c` (#127982) 2024-12-16 14:40:26 +01: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-126742: Add _PyErr_SetLocaleString, use it for gdbm & dlerror messages (GH-126746) 2024-12-17 12:12:45 +01:00
_hashopenssl.c gh-126742: Add _PyErr_SetLocaleString, use it for gdbm & dlerror messages (GH-126746) 2024-12-17 12:12:45 +01:00
_heapqmodule.c
_interpchannelsmodule.c gh-76785: Improved Subinterpreters Compatibility with 3.12 (2/2) (gh-126707) 2024-11-12 10:41:51 -07:00
_interpqueuesmodule.c gh-76785: Improved Subinterpreters Compatibility with 3.12 (2/2) (gh-126707) 2024-11-12 10:41:51 -07: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-76785: Improved Subinterpreters Compatibility with 3.12 (2/2) (gh-126707) 2024-11-12 10:41:51 -07:00
_json.c gh-95382: Use cache for indentations in the JSON encoder (GH-118636) 2024-11-12 17:19:15 +00:00
_localemodule.c gh-126727: Fix locale.nl_langinfo(locale.ERA) (GH-126730) 2024-11-21 13:16:08 +02:00
_lsprof.c gh-126425: Refactor `_lsprof_Profiler_enable` (#126426) 2024-11-05 15:23:24 +03:00
_lzmamodule.c
_math.h gh-122681: remove m_atan2()/c_atan2() helpers (#122715) 2024-08-17 13:48:16 +05:30
_opcode.c gh-115999: Implement thread-local bytecode and enable specialization for `BINARY_OP` (#123926) 2024-11-04 11:13:32 -08:00
_operator.c gh-127065: Make methodcaller thread-safe and re-entrant (GH-127746) 2024-12-11 10:06:07 -05:00
_pickle.c gh-126992: Change pickle code to base 10 for load_long and load_int (GH-127042) 2024-12-11 12:37:59 +00:00
_posixsubprocess.c
_queuemodule.c
_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
_ssl.c gh-127257: ssl: Raise OSError for ERR_LIB_SYS (GH-127361) 2024-12-10 11:56:24 +01:00
_ssl.h
_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
_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
_testbuffer.c
_testcapi_feature_macros.inc
_testcapimodule.c gh-128008: Add `PyWeakref_IsDead()` (GH-128009) 2024-12-19 16:17:15 +01: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
_testexternalinspection.c gh-125604: Move _Py_AuditHookEntry, etc. Out of pycore_runtime.h (gh-125605) 2024-10-18 09:26:08 -06:00
_testimportmultiple.c gh-116322: Add Py_mod_gil module slot (#116882) 2024-05-03 11:30:55 -04:00
_testinternalcapi.c gh-115999: Specialize `STORE_ATTR` in free-threaded builds. (gh-127838) 2024-12-19 10:21:17 -08:00
_testlimitedcapi.c gh-111495: Add tests for `PyCodec_*` C API (#123343) 2024-09-29 15:22:39 +00:00
_testmultiphase.c
_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-59705: Set OS thread name when Thread.name is changed (#127702) 2024-12-10 17:33:11 +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
_typingmodule.c gh-123448: Move `_PyNoDefault_Type` to the static types array (#123449) 2024-08-28 18:27:40 -07:00
_uuidmodule.c
_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-126433: Fix compiler warnings on 32-bit Windows (#126444) 2024-11-05 16:05:13 +01:00
_zoneinfo.c gh-125243: Fix ZoneInfo data race in free threading build (#125281) 2024-10-13 16:17:51 -04:00
addrinfo.h
arraymodule.c
atexitmodule.c gh-126907: make `atexit` thread safe in free-threading (#127935) 2024-12-16 19:31:44 +00:00
binascii.c
blake2module.c gh-126433: Fix compiler warnings on 32-bit Windows (#126444) 2024-11-05 16:05:13 +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-104169: Fix test_peg_generator after tokenizer refactoring (#110727) 2023-10-12 09:34:35 +02:00
errnomodule.c gh-126585: Add EHWPOISON error code (#126586) 2024-12-03 12:45:50 +00:00
faulthandler.c
fcntlmodule.c
gc_weakref.txt
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
getbuildinfo.c
getnameinfo.c
getpath.c gh-115754: Use Py_GetConstant(Py_CONSTANT_EMPTY_STR) (#125583) 2024-10-25 11:14:52 +02:00
getpath.py GH-126985: Don't override venv detection with PYTHONHOME (#127968) 2024-12-15 21:12:13 +00:00
getpath_noop.c
grpmodule.c gh-126316: Make grp.getgrall() thread-safe: add a mutex (#127055) 2024-11-21 15:47:24 +01:00
hashlib.h
itertoolsmodule.c gh-126618: fix repr(itertools.count(sys.maxsize)) (#127048) 2024-12-02 14:14:40 +01:00
ld_so_aix.in
main.c gh-126742: Add _PyErr_SetLocaleString, use it for gdbm & dlerror messages (GH-126746) 2024-12-17 12:12:45 +01:00
makesetup gh-116622: Rename build variable MODULE_LDFLAGS back to LIBPYTHON (#122764) 2024-08-09 00:00:55 +02:00
makexp_aix
mathmodule.c gh-122943: Rework support of var-positional parameter in Argument Clinic (GH-122945) 2024-11-07 23:40:03 +02:00
md5module.c
mmapmodule.c gh-115754: Use Py_GetConstant(Py_CONSTANT_EMPTY_BYTES) (#125195) 2024-10-09 17:12:11 +02:00
overlapped.c
posixmodule.c gh-127688: Add `SCHED_DEADLINE` and `SCHED_NORMAL` constants to `os` module (GH-127689) 2024-12-19 14:51:21 +01:00
posixmodule.h
pwdmodule.c
pyexpat.c gh-126742: Add _PyErr_SetLocaleString, use it for gdbm & dlerror messages (GH-126746) 2024-12-17 12:12:45 +01:00
readline.c gh-122431: Disallow negative values in `readline.append_history_file` (#122469) 2024-12-05 16:07:38 +00:00
resource.c
rotatingtree.c
rotatingtree.h
selectmodule.c gh-127481: Add `EPOLLWAKEUP` to the `select` module (GH-127482) 2024-12-04 14:30:38 +01:00
sha1module.c
sha2module.c
sha3module.c gh-87138: convert SHA-3 object type to heap type (GH-127670) 2024-12-08 09:31:10 -08:00
signalmodule.c gh-123014: Disable pidfd API on older Android versions (#124458) 2024-09-25 16:23:30 +02:00
socketmodule.c gh-127072: Remove outdated `socket.NETLINK_*` constants. (GH-127256) 2024-11-27 06:53:41 +00:00
socketmodule.h gh-124944: Add socket.SO_ORIGINAL_DST (#124945) 2024-10-15 00:36:38 +02:00
symtablemodule.c
syslogmodule.c
termios.c
timemodule.c gh-52551: Use wcsftime() to implement time.strftime() on Windows (GH-125658) 2024-10-19 11:29:51 +03:00
tkappinit.c
tkinter.h
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
xxlimited_35.c
xxmodule.c
xxsubtype.c
zlibmodule.c gh-115754: Use Py_GetConstant(Py_CONSTANT_EMPTY_BYTES) (#125195) 2024-10-09 17:12:11 +02:00

README

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