mirror of
https://github.com/python/cpython.git
synced 2026-02-23 07:31:03 +00:00
Add `_Py_type_getattro_stackref`, a variant of type attribute lookup that returns `_PyStackRef` instead of `PyObject*`. This allows returning deferred references in the free-threaded build, reducing reference count contention when accessing type attributes. This significantly improves scaling of namedtuple instantiation across multiple threads. * Add blurb * Rename PyObject_GetAttrStackRef to _PyObject_GetAttrStackRef * Apply suggestion from @vstinner Co-authored-by: Victor Stinner <vstinner@python.org> * Apply suggestion from @vstinner Co-authored-by: Victor Stinner <vstinner@python.org> * format * Update Include/internal/pycore_function.h Co-authored-by: Victor Stinner <vstinner@python.org> --------- Co-authored-by: Victor Stinner <vstinner@python.org> |
||
|---|---|---|
| .. | ||
| clinic | ||
| complex.c | ||
| interpreter.c | ||
| parts.h | ||
| pytime.c | ||
| README.txt | ||
| set.c | ||
| test_cases.c.h | ||
| test_critical_sections.c | ||
| test_lock.c | ||
| test_targets.h | ||
| testbytecodes.c | ||
Tests in this directory are compiled into the _testinternalcapi extension. The main file for the extension is Modules/_testinternalcapimodule.c, which calls `_PyTestInternalCapi_Init_*` from these functions. See Modules/_testcapi/README.txt for guideline when writing C test code.