GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — GH-95245: Document use of `MANAGED` flags instead of offsets. by markshannon · Pull Request #96044 · python/cpython Conversation
|
|
|
||
| The legacy offsets :c:member:`~PyTypeObject.tp_dictoffset` and | ||
| :c:member:`~PyTypeObject.tp_weaklistoffset` are still supported, but extensions are | ||
| strongly encouraged to use ``Py_TPFLAGS_MANAGED_DICT`` and |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Can Py_TPFLAGS_MANAGED_DICT and Py_TPFLAGS_MANAGED_WEAKREF link to their definition in typeobj.rst below?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
:c:member:~PyTypeObject.tp_dictoffset` converts to a link to
https://docs.python.org/3/c-api/typeobj.html#c.PyTypeObject.tp_dictoffset
I don't think I can link into the table.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| | | | __ge__ | | | | | | ||
| +------------------------------------------------+-----------------------------------+-------------------+---+---+---+---+ | ||
| | :c:member:`~PyTypeObject.tp_weaklistoffset` | :c:type:`Py_ssize_t` | | | X | | ? | | ||
| | (:c:member:`~PyTypeObject.tp_weaklistoffset`) | :c:type:`Py_ssize_t` | | | X | | ? | |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
The parentheses indicate deprecation? Should we maybe say "(Deprecated in Python 3.12)" instead?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
The docs are always relevant to the current version, so it is implicit that this applies to 3.12.
This isn't a formal deprecation, more of a hint not to use these fields.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| | | | __delete__ | | | | | | ||
| +------------------------------------------------+-----------------------------------+-------------------+---+---+---+---+ | ||
| | :c:member:`~PyTypeObject.tp_dictoffset` | :c:type:`Py_ssize_t` | | | X | | ? | | ||
| | (:c:member:`~PyTypeObject.tp_dictoffset`) | :c:type:`Py_ssize_t` | | | X | | ? | |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Same as above regarding deprecation.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.