Closed
Description
This issue implements a proposal related to PEP-489 and PEP-630.
Decision:
TODO:
- Implement the feature
- Use it in
_PyStgInfo_FromType_NoState()
in_ctypes.c
- Ensure no performance regression in
PyType_GetModuleByDef()
and other functions affected by this feature on Windows PGO builds
TODO (optional):
- Replace
PyType_GetModuleByDef()
indefdict_or()
(_collectionsmodule.c
) - Replace
_PyType_GetModuleByDef2()
in_decimal.c
- Remove
_PyType_GetModuleByDef2()
Has this already been discussed elsewhere?
I have already discussed this feature proposal on Discourse
Links to previous discussion of this feature:
Linked PRs
- gh-124153: Introduce PyType_GetBaseByToken function (PoC) #121079
- gh-124153: Implement
PyType_GetBaseByToken()
andPy_tp_token
slot #124163 - gh-124153: Remove
_PyType_GetModuleByDef2
private function #124261 - gh-124153: Clean up workarounds for
PyType_GetBaseByToken()
performance #124323 - gh-124153: Fix unstable optimization of
PyType_GetBaseByToken()
and friends #124488
Metadata
Metadata
Assignees
Labels
A feature request or enhancementA feature request or enhancement