-
-
Notifications
You must be signed in to change notification settings - Fork 31.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bpo-40170: Remove PyHeapType_GET_MEMBERS() macro #30942
Conversation
Remove the PyHeapType_GET_MEMBERS() macro. It was exposed in the public C API by mistake, it must only be used by Python internally. Use the PyTypeObject.tp_members member instead. Rename PyHeapType_GET_MEMBERS() to _PyHeapType_GET_MEMBERS() and move it to the internal C API.
A search for "PyHeapType_GET_MEMBERS" in top 5000 PyPI project returns no result: it doesn't seem to be used outside CPython internals. |
|
It doesn't seem like PyTorch is below top-5000 projects, but still using PyHeapType_GET_MEMBERS. This is why I have to re-add this macro either inside Pytorch or revert deletion commit. |
Please open a new issue for that. Please explain why PyTorch requires this function and elaborate on how it is used in PyTorch. Honestly, I don't understand the purpose of this function :-D |
What's New in Python 3.11 says:
Can you please elaborate why using the |
Remove the PyHeapType_GET_MEMBERS() macro. It was exposed in the
public C API by mistake, it must only be used by Python internally.
Use the PyTypeObject.tp_members member instead.
Rename PyHeapType_GET_MEMBERS() to _PyHeapType_GET_MEMBERS() and move
it to the internal C API.
https://bugs.python.org/issue40170