Skip to content

The tp_dictoffset and Py_TPFLAGS_MANAGED_WEAKREF flag #129912

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

Closed
nybblista opened this issue Feb 9, 2025 · 2 comments
Closed

The tp_dictoffset and Py_TPFLAGS_MANAGED_WEAKREF flag #129912

nybblista opened this issue Feb 9, 2025 · 2 comments
Labels
docs Documentation in the Doc dir

Comments

@nybblista
Copy link
Contributor

nybblista commented Feb 9, 2025

From the tp_dictoffset slot documentation:

"It is an error to set both the Py_TPFLAGS_MANAGED_WEAKREF bit and tp_dictoffset."

I think the Py_TPFLAGS_MANAGED_WEAKREF flag is being used incorrectly in this context. Do you mean the Py_TPFLAGS_MANAGED_DICT flag?

https://docs.python.org/3/c-api/typeobj.html#c.PyTypeObject.tp_dictoffset

Linked PRs

@nybblista nybblista added the docs Documentation in the Doc dir label Feb 9, 2025
@picnixz
Copy link
Member

picnixz commented Feb 9, 2025

I agree that it looks like a typo (cc @vstinner)

isatyamks added a commit to isatyamks/cpython that referenced this issue Feb 12, 2025
isatyamks added a commit to isatyamks/cpython that referenced this issue Feb 12, 2025
isatyamks added a commit to isatyamks/cpython that referenced this issue Feb 12, 2025
isatyamks added a commit to isatyamks/cpython that referenced this issue Feb 12, 2025
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Feb 12, 2025
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Feb 12, 2025
colesbury pushed a commit that referenced this issue Feb 12, 2025
) (gh-130060)

(cherry picked from commit 791cdfe)

Co-authored-by: Satyam Kumar <[email protected]>
colesbury pushed a commit that referenced this issue Feb 12, 2025
) (gh-130059)

(cherry picked from commit 791cdfe)

Co-authored-by: Satyam Kumar <[email protected]>
@colesbury
Copy link
Contributor

This is fixed now. Thanks for the bug report @nybblista and the PR @isatyamks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir
Projects
Status: Todo
Development

No branches or pull requests

3 participants