cpython/Objects
Victor Stinner 13a00078b8
gh-108634: Py_TRACE_REFS uses a hash table (#108663)
Python built with "configure --with-trace-refs" (tracing references)
is now ABI compatible with Python release build and debug build.
Moreover, it now also supports the Limited API.

Change Py_TRACE_REFS build:

* Remove _PyObject_EXTRA_INIT macro.
* The PyObject structure no longer has two extra members (_ob_prev
  and _ob_next).
* Use a hash table (_Py_hashtable_t) to trace references (all
  objects): PyInterpreterState.object_state.refchain.
* Py_TRACE_REFS build is now ABI compatible with release build and
  debug build.
* Limited C API extensions can now be built with Py_TRACE_REFS:
  xxlimited, xxlimited_35, _testclinic_limited.
* No longer rename PyModule_Create2() and PyModule_FromDefAndSpec2()
  functions to PyModule_Create2TraceRefs() and
  PyModule_FromDefAndSpec2TraceRefs().
* _Py_PrintReferenceAddresses() is now called before
  finalize_interp_delete() which deletes the refchain hash table.
* test_tracemalloc find_trace() now also filters by size to ignore
  the memory allocated by _PyRefchain_Trace().

Test changes for Py_TRACE_REFS:

* Add test.support.Py_TRACE_REFS constant.
* Add test_sys.test_getobjects() to test sys.getobjects() function.
* test_exceptions skips test_recursion_normalizing_with_no_memory()
  and test_memory_error_in_PyErr_PrintEx() if Python is built with
  Py_TRACE_REFS.
* test_repl skips test_no_memory().
* test_capi skisp test_set_nomemory().
2023-08-31 18:33:34 +02:00
..
clinic gh-108635: Make parameters of some implementations of special methods positional-only (GH-108636) 2023-08-29 17:55:56 +03:00
stringlib gh-106320: Remove private AC converter functions (#108505) 2023-08-26 04:05:17 +02:00
README
abstract.c gh-101162: Forbid using issubclass() with GenericAlias as the 1st arg (GH-103369) 2023-08-11 22:12:11 +03:00
boolobject.c GH-84436: Skip refcounting for known immortals (GH-107605) 2023-08-04 16:24:50 -07:00
bytearrayobject.c gh-106320: Remove private _PyEval function (#108433) 2023-08-24 20:25:22 +02:00
bytes_methods.c gh-104922: remove PY_SSIZE_T_CLEAN (#106315) 2023-07-02 15:07:46 +09:00
bytesobject.c gh-108444: Replace _PyLong_AsInt() with PyLong_AsInt() (#108459) 2023-08-25 01:01:30 +02:00
call.c gh-106320: Remove _PyFunction_Vectorcall() API (#107071) 2023-07-22 21:44:33 +00:00
capsule.c gh-108240: Add pycore_capsule.h internal header file (#108596) 2023-08-29 01:20:02 +00:00
cellobject.c gh-99300: Use Py_NewRef() in Objects/ directory (#99332) 2022-11-10 16:27:32 +01:00
classobject.c gh-106320: Remove private _PyEval function (#108433) 2023-08-24 20:25:22 +02:00
codeobject.c gh-105481: remove regen-opcode. Generated _PyOpcode_Caches in regen-cases. (#108367) 2023-08-23 18:39:00 +01:00
complexobject.c gh-106869: Use new PyMemberDef constant names (#106871) 2023-07-25 15:28:30 +02:00
descrobject.c gh-84805: Autogenerate signature for METH_NOARGS and METH_O extension functions (GH-107794) 2023-08-11 18:08:38 +03: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 gh-106320: Remove private _PyEval function (#108433) 2023-08-24 20:25:22 +02:00
enumobject.c gh-106320: Create pycore_modsupport.h header file (#106355) 2023-07-03 09:39:11 +00:00
exception_handling_notes.txt GH-105848: Simplify the arrangement of CALL's stack (GH-107788) 2023-08-09 18:19:39 +00:00
exceptions.c gh-106869: Use new PyMemberDef constant names (#106871) 2023-07-25 15:28:30 +02:00
fileobject.c gh-108444: Replace _PyLong_AsInt() with PyLong_AsInt() (#108459) 2023-08-25 01:01:30 +02:00
floatobject.c gh-106320: Remove private AC converter functions (#108505) 2023-08-26 04:05:17 +02:00
frame_layout.md GH-96421: Insert shim frame on entry to interpreter (GH-96319) 2022-11-10 12:34:57 +00:00
frameobject.c gh-105481: remove regen-opcode. Generated _PyOpcode_Caches in regen-cases. (#108367) 2023-08-23 18:39:00 +01:00
funcobject.c gh-108253: Fix reads of uninitialized memory in funcobject.c (#108383) 2023-08-23 22:36:19 +00:00
genericaliasobject.c gh-106320: Remove private _PyEval function (#108433) 2023-08-24 20:25:22 +02:00
genobject.c GH-108035: Remove the `_PyCFrame` struct as it is no longer needed for performance. (GH-108036) 2023-08-17 11:16:03 +01:00
interpreteridobject.c gh-101524: Only Use Public C-API in the _xxsubinterpreters Module (gh-107359) 2023-07-27 15:30:16 -06:00
iterobject.c gh-106320: Remove private _PyEval function (#108433) 2023-08-24 20:25:22 +02:00
listobject.c gh-106320: Remove private _PyEval function (#108433) 2023-08-24 20:25:22 +02:00
listsort.txt Fix typos in the Objects directory (GH-28766) 2021-10-06 16:57:10 -07:00
lnotab_notes.txt Note that lnotab_notes.txt is only valid before 3.11 (#107961) 2023-08-15 20:27:35 +00:00
locations.md GH-88116: Use a compact format to represent end line and column offsets. (GH-91666) 2022-04-21 16:10:37 +01:00
longobject.c gh-108444: Add PyLong_AsInt() public function (#108445) 2023-08-24 23:55:30 +02:00
memoryobject.c gh-106320: Remove private _PyManagedBuffer_Type (#108431) 2023-08-24 19:07:54 +02:00
methodobject.c gh-84805: Autogenerate signature for METH_NOARGS and METH_O extension functions (GH-107794) 2023-08-11 18:08:38 +03:00
moduleobject.c gh-108308: Use PyDict_GetItemRef() in moduleobject.c (#108381) 2023-08-23 21:57:40 +00:00
namespaceobject.c gh-106869: Use new PyMemberDef constant names (#106871) 2023-07-25 15:28:30 +02:00
object.c gh-108634: Py_TRACE_REFS uses a hash table (#108663) 2023-08-31 18:33:34 +02:00
object_layout.md fix typos (#106247) 2023-06-30 13:00:22 +09:00
object_layout_312.gv GH-96068: Document object layout (GH-96069) 2022-08-23 13:55:43 +01:00
object_layout_312.png GH-96068: Document object layout (GH-96069) 2022-08-23 13:55:43 +01: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 GH-96068: Document object layout (GH-96069) 2022-08-23 13:55:43 +01:00
obmalloc.c gh-106320: Remove private _PyObject C API (#107147) 2023-07-23 20:09:08 +00:00
odictobject.c gh-106320: Remove private _PyErr_ChainExceptions() (#108713) 2023-08-31 13:53:19 +02:00
picklebufobject.c gh-104922: remove PY_SSIZE_T_CLEAN (#106315) 2023-07-02 15:07:46 +09:00
rangeobject.c gh-106320: Remove private _PyEval function (#108433) 2023-08-24 20:25:22 +02:00
setobject.c gh-108634: Py_TRACE_REFS uses a hash table (#108663) 2023-08-31 18:33:34 +02:00
sliceobject.c gh-108634: Py_TRACE_REFS uses a hash table (#108663) 2023-08-31 18:33:34 +02:00
structseq.c gh-108634: Py_TRACE_REFS uses a hash table (#108663) 2023-08-31 18:33:34 +02:00
tupleobject.c gh-106320: Remove private _PyEval function (#108433) 2023-08-24 20:25:22 +02:00
typeobject.c gh-108634: Py_TRACE_REFS uses a hash table (#108663) 2023-08-31 18:33:34 +02:00
typeslots.inc bpo-41073: PyType_GetSlot() can now accept static types. (GH-21931) 2020-11-10 12:53:46 -08:00
typeslots.py bpo-41073: PyType_GetSlot() can now accept static types. (GH-21931) 2020-11-10 12:53:46 -08:00
typevarobject.c gh-108635: Make parameters of some implementations of special methods positional-only (GH-108636) 2023-08-29 17:55:56 +03:00
unicodectype.c bpo-46670: Remove unused macros in the Objects directory (GH-31193) 2022-02-07 16:21:41 +01:00
unicodeobject.c gh-107913: Fix possible losses of OSError error codes (GH-107930) 2023-08-27 00:35:06 +03:00
unicodetype_db.h bpo-47243: Duplicate entry in 'Objects/unicodetype_db.h' (GH-32376) 2022-09-28 06:57:14 -07:00
unionobject.c gh-106869: Use new PyMemberDef constant names (#106871) 2023-07-25 15:28:30 +02:00
weakrefobject.c gh-106320: Remove private _PyErr_ChainExceptions() (#108713) 2023-08-31 13:53:19 +02:00

README

Source files for various builtin objects