cpython/Objects
Serhiy Storchaka a005f323b7
[3.14] gh-144545: Improve handling of default values in Argument Clinic (GH-146016) (GH-146052)
* Add the c_init_default attribute which is used to initialize the C variable
  if the default is not explicitly provided.
* Add the c_default_init() method which is used to derive c_default from
  default if c_default is not explicitly provided.
* Explicit c_default and py_default are now almost always have precedence
  over the generated value.
* Add support for bytes literals as default values.
* Improve support for str literals as default values (support non-ASCII
  and non-printable characters and special characters like backslash or quotes).
* Fix support for str and bytes literals containing trigraphs, "/*" and "*/".
* Improve support for default values in converters "char" and "int(accept={str})".
* Converter "int(accept={str})" now requires 1-character string instead of
  integer as default value.
* Add support for non-None default values in converter "Py_buffer": NULL,
  str and bytes literals.
* Improve error handling for invalid default values.
* Rename Null to NullType for consistency.
(cherry picked from commit 99e2c5eccd)
2026-03-17 10:55:15 +00:00
..
clinic [3.14] gh-145713: make bytearray.resize thread-safe on free-threading (#145714) (#145799) 2026-03-13 20:34:24 +05:30
mimalloc [3.14] gh-145615: Fix mimalloc page leak in the free-threaded build (gh-145626) (#145691) 2026-03-09 14:17:57 -04:00
stringlib [3.14] gh-145092: Fix compiler warning for memchr() and wcschr() returning const pointer (GH-145093) (GH-145102) 2026-02-22 08:28:17 +00:00
abstract.c gh-131238: Remove includes from pycore_interp.h (#131495) 2025-03-20 11:35:23 +00:00
boolobject.c gh-111178: remove redundant casts for functions with correct signatures (#131673) 2025-04-01 17:18:11 +02:00
bytearrayobject.c [3.14] gh-145713: make bytearray.resize thread-safe on free-threading (#145714) (#145799) 2026-03-13 20:34:24 +05:30
bytes_methods.c gh-121165: protect macro expansion of ADJUST_INDICES with do-while(0) (#121166) 2024-07-02 16:27:51 +05:30
bytesobject.c [3.14] gh-140939: Fix memory leak in _PyBytes_FormatEx error path (GH-140957) (#141154) 2025-11-06 16:20:03 +00:00
call.c [3.14] gh-142737: Handle lost io.open in _Py_FindSourceFile (GH-142747) (GH-142773) 2025-12-15 23:30:00 +00:00
capsule.c gh-111178: fix UBSan failures in Objects/capsule.c (GH-128239) 2025-01-08 14:55:04 +01:00
cellobject.c gh-127271: Replace use of PyCell_GET/SET (gh-127272) 2024-12-03 10:33:06 -08:00
classobject.c [3.14] gh-135607: remove null checking of weakref list in dealloc of extension modules and objects (#135614) (#136119) 2025-06-30 15:59:22 +02:00
codeobject.c [3.14] gh-144981: Make PyUnstable_Code_SetExtra/GetExtra thread-safe (GH-144980) (#145052) 2026-03-05 08:26:09 -05:00
complexobject.c gh-111178: Change Argument Clinic signature for @classmethod (#131157) 2025-03-12 17:42:07 +01:00
descrobject.c GH-124715: Move trashcan mechanism into Py_Dealloc (GH-132280) 2025-04-30 11:37:53 +01:00
dictnotes.txt bpo-46845: Reduce dict size when all keys are Unicode (GH-31564) 2022-03-02 08:09:28 +09:00
dictobject.c [3.14] gh-130327: Always traverse managed dictionaries, even when inline values are available (GH-130469) (#145438) 2026-03-02 19:57:10 +00:00
enumobject.c gh-131525: Cache the result of tuple_hash (#131529) 2025-03-27 09:57:06 -04:00
exceptions.c GH-124715: Move trashcan mechanism into Py_Dealloc (GH-132280) 2025-04-30 11:37:53 +01:00
fileobject.c gh-111178: fix UBSan failures for PyStdPrinter_Object (#131607) 2025-03-24 10:57:14 +01:00
floatobject.c [3.14] gh-143006: Fix and optimize mixed comparison of float and int (GH-143084) (GH-143623) 2026-01-09 17:32:23 +00:00
frameobject.c [3.14] gh-144446: Fix some frame object thread-safety issues (gh-144479) (#144546) 2026-02-06 15:25:36 +00:00
funcobject.c [3.14] gh-144330: Initialize classmethod and staticmethod in new (#144498) 2026-02-06 10:21:02 +01:00
genericaliasobject.c [3.14] gh-143635: Fix crash in ga_repr_items_list (GH-143670) (#143851) 2026-01-15 04:16:46 +00:00
genobject.c [3.14] gh-142766: Clear frame when generator.close() is called (gh-142838) (#142899) 2025-12-17 18:33:15 +00:00
interpolationobject.c [3.14] gh-132661: Add default value (of "") for Interpolation.expression (GH-136441) (#136511) 2025-07-10 14:52:18 +00:00
iterobject.c gh-131666: mark anext_awaitable.close as a METH_NOARGS instead of METH_VARARGS (#131671) 2025-03-25 09:03:22 +05:30
listobject.c [3.14] gh-145036: Fix data race for list capacity in free-threading (GH-145365) (#145881) 2026-03-12 22:06:12 -04:00
listsort.txt GH-116939: Rewrite binarysort() (#116940) 2024-03-21 22:27:25 -05:00
lnotab_notes.txt gh-119786: add code object doc, inline locations.md into it (#126832) 2024-11-22 19:27:41 +00:00
longobject.c [3.14] gh-142554: avoid divmod crashes due to bad _pylong.int_divmod (GH-142673) (#142696) 2025-12-14 09:04:37 +00:00
memoryobject.c [3.14] gh-142664: fix PyObject_Hash invokation post GH-143217 (GH-143223) (#143224) 2025-12-27 14:55:45 +00:00
methodobject.c [3.14] gh-135607: remove null checking of weakref list in dealloc of extension modules and objects (#135614) (#136119) 2025-06-30 15:59:22 +02:00
moduleobject.c [3.14] gh-135607: remove null checking of weakref list in dealloc of extension modules and objects (#135614) (#136119) 2025-06-30 15:59:22 +02:00
namespaceobject.c [3.14] gh-143636: fix a crash when calling `__replace__ on invalid SimpleNamespace` instances (GH-143655) (#145938) 2026-03-14 10:35:41 +00:00
object.c [3.14] gh-102809: No longer mention Misc/gdbinit in the code (GH-143980) (#144044) 2026-01-19 18:01:21 +00:00
object_layout.md GH-115776: Allow any fixed sized object to have inline values (GH-123192) 2024-08-21 15:52:04 +01:00
object_layout_312.gv GH-115776: Embed the values array into the object, for "normal" Python objects. (GH-116115) 2024-04-02 11:59:21 +01:00
object_layout_312.png [3.14] gh-71648: Optimize PNG files (GH-138842) (GH-138851) 2025-10-07 20:52:12 +02:00
object_layout_313.gv GH-115776: Embed the values array into the object, for "normal" Python objects. (GH-116115) 2024-04-02 11:59:21 +01:00
object_layout_313.png [3.14] gh-71648: Optimize PNG files (GH-138842) (GH-138851) 2025-10-07 20:52:12 +02:00
object_layout_full_312.gv GH-96068: Document object layout (GH-96069) 2022-08-23 13:55:43 +01:00
object_layout_full_312.png [3.14] gh-71648: Optimize PNG files (GH-138842) (GH-138851) 2025-10-07 20:52:12 +02:00
object_layout_full_313.gv GH-115776: Embed the values array into the object, for "normal" Python objects. (GH-116115) 2024-04-02 11:59:21 +01:00
object_layout_full_313.png [3.14] gh-71648: Optimize PNG files (GH-138842) (GH-138851) 2025-10-07 20:52:12 +02:00
obmalloc.c [3.14] gh-145615: Fix mimalloc page leak in the free-threaded build (gh-145626) (#145691) 2026-03-09 14:17:57 -04:00
odictobject.c [3.14] gh-125996: fix thread safety of collections.OrderedDict (GH-133734) (#140053) 2025-10-13 23:25:24 +05:30
picklebufobject.c [3.14] gh-135607: remove null checking of weakref list in dealloc of extension modules and objects (#135614) (#136119) 2025-06-30 15:59:22 +02:00
rangeobject.c [3.14] GH-141312: Allow only integers to longrangeiter_setstate state (GH-141317) (GH-141559) 2025-11-15 21:30:25 +02:00
README Issue #18093: Factor out the programs that embed the runtime 2014-07-25 21:52:14 +10:00
setobject.c [3.14] gh-141805: Fix crash after concurrent addition objects with the same hash to set (GH-143815) (GH-143849) 2026-01-15 09:31:16 +02:00
sliceobject.c gh-111178: Fix function signatures for multiple tests (#131496) 2025-03-20 12:27:03 +01:00
structseq.c [3.14] gh-145376: Fix GC tracking in structseq.__replace__ (GH-145820) (#145922) 2026-03-16 14:38:15 +05:30
templateobject.c [3.14] gh-142433: Move deref to below the error when checking for laststring (GH-142402) (#142524) 2025-12-10 16:07:59 +00:00
tupleobject.c [3.14] GH-139951: Fix major GC performance regression. Backport of GH-140262 (GH-140447) 2025-10-23 15:26:58 +01:00
typeobject.c [3.14] gh-145685: Improve scaling of type attribute lookups (gh-145774) (#145874) 2026-03-12 14:33:05 -04:00
typeslots.inc Revert "gh-133395: add option for extension modules to specialize BINARY_OP/SUBSCR, apply to arrays (#133396)" (#133498) 2025-05-06 13:12:26 +03:00
typeslots.py gh-124153: Implement PyType_GetBaseByToken() and Py_tp_token slot (GH-124163) 2024-09-18 09:18:19 +02:00
typevarobject.c [3.14] gh-143089: Fix ParamSpec default examples to use list instead of tuple (GH-143179) (#143538) 2026-01-08 11:49:41 +00:00
unicodectype.c gh-82045: Correct and deduplicate "isprintable" docs; add test. (GH-130118) 2025-02-14 18:16:47 +01:00
unicodeobject.c [3.14] gh-144545: Improve handling of default values in Argument Clinic (GH-146016) (GH-146052) 2026-03-17 10:55:15 +00:00
unicodetype_db.h closes gh-124016: update Unicode to 16.0.0 (#124017) 2024-09-13 07:47:04 -07:00
unionobject.c [3.14] gh-140348: Fix using | on unusual objects plus Unions (GH-140383) (#140948) 2025-11-03 15:16:03 +00:00
weakrefobject.c gh-129354: Use PyErr_FormatUnraisable() function (#129511) 2025-01-31 13:16:08 +01:00

Source files for various builtin objects