Skip to content

It's unclear how to set __weaklistoffset__ Python 3.11 and below #110803

@encukou

Description

@encukou

PyType_Slot can’t set tp_weaklistoffset, the 3.12 documentation suggests usingPy_TPFLAGS_MANAGED_WEAKREF: Type Objects. But this tp flag is only available in 3.12. So how would one use it in 3.12 and use multiphase init with tp_weaklistoffset for older Pythons?

It's unclear in the current docs. IMO the 3.11 version was clear, but that hint is now effectively soft-deprecated.

Linked PRs

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions