-
-
Notifications
You must be signed in to change notification settings - Fork 34.3k
Open
Labels
interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)type-featureA feature request or enhancementA feature request or enhancement
Description
Feature or enhancement
Proposal:
To use _Py_DebugOffsets to perform version-independent read-only introspection of a Python process, struct offsets are required that aren't currently exposed:
tp_dictoffset-- where the dict pointer livestp_basicsize-- where inline values startht_cached_keys-- key ordering for inline values in heap types
The immediately motivating use case is implementing py-spy (read-only sampling profiler) support for Python 3.14 without continuing the prior practice of shipping bindgen wrappers for each supported version; dict introspection is required to read thread names from threading._active[tid]._name (which also requires looking through sys.modules to find the threading module), and for implementing --dump-locals.
Has this already been discussed elsewhere?
This is a minor feature, which does not need previous discussion elsewhere
Links to previous discussion of this feature:
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)type-featureA feature request or enhancementA feature request or enhancement