Message401399
I changed the issue title to restrict its scope: "[C API] Avoid accessing PyObject and PyVarObject members directly: add Py_SET_TYPE() and Py_IS_TYPE(), disallow Py_TYPE(obj)=type".
Making PyObject and PyVarObject structures opaque is a broader topic which should be splited into sub-issues.
"Py_TYPE(obj)=type;" is now disallowed. I consider that the work of this issue is now completed and I close the issue.
Thanks everyone who help to fix these tedious issues!
You can continue to use this issue if you need my help to adapt your C extensions to Py_SET_TYPE()/Py_SET_SIZE().
See also the upgrade_pythoncapi.py script of the pythoncapi_compat project which helps to port your C extensions without losing support for old Python versions:
https://github.com/pythoncapi/pythoncapi_compat
See also the Py_TYPE() change announcement on the capi-sig list:
https://mail.python.org/archives/list/capi-sig@python.org/thread/WGRLTHTHC32DQTACPPX36TPR2GLJAFRB/ |
|
Date |
User |
Action |
Args |
2021-09-08 16:32:16 | vstinner | set | recipients:
+ vstinner, nascheme, ronaldoussoren, serhiy.storchaka, steve.dower, hroncok, corona10, ZackerySpytz, pablogsal, WildCard65, BTaskaya, shihai1991, erlendaasland, kj |
2021-09-08 16:32:15 | vstinner | set | messageid: <1631118735.88.0.532274653046.issue39573@roundup.psfhosted.org> |
2021-09-08 16:32:15 | vstinner | link | issue39573 messages |
2021-09-08 16:32:15 | vstinner | create | |
|