cpython/Doc/using
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
..
cmdline.rst GH-92584: Remove Installing Python Modules (Distutils version) (#108020) 2023-08-16 21:06:56 +00:00
configure.rst gh-108634: Py_TRACE_REFS uses a hash table (#108663) 2023-08-31 18:33:34 +02:00
editors.rst bpo-37610: improve Using Python doc wrt Editors & IDE (GH-14850) 2019-07-18 18:23:17 -07:00
index.rst bpo-43774: Document configure options (GH-25283) 2021-04-08 22:32:21 +02:00
mac.rst GH-92584: Redirect macOS package installation to the PPUG (#108044) 2023-08-16 20:42:23 +00:00
unix.rst DOC: remove reference to OpenSolaris (#102671) 2023-04-25 10:45:18 +00:00
venv-create.inc gh-95299: Stop installing setuptools as a part of ensurepip and venv (#101039) 2023-04-17 23:43:34 -05:00
win_installer.png Optimize images by IMGbot (GH-21348) 2022-02-04 15:49:43 +09:00
windows.rst GH-92584: Remove reference to Distutils in ``cx_Freeze``'s description (#108047) 2023-08-16 22:23:12 +02:00