[issue46538] [C API] Make the PyDescrObject structure opaque: PyDescr_NAME() and PyDescr_TYPE()

2022-01-26 Thread STINNER Victor
Change by STINNER Victor : -- title: [C API] Make the PyDescrObject structure opaque -> [C API] Make the PyDescrObject structure opaque: PyDescr_NAME() and PyDescr_TYPE() ___ Python tracker _

[issue46538] [C API] Make the PyDescrObject structure opaque

2022-01-26 Thread STINNER Victor
STINNER Victor added the comment: > The problem of the PyDescr_SET_NAME() and PyDescr_SET_Type() approach is that > SWIG code is outdated: it doesn't initialized the PyDescrObject.d_qualname > member added to Python 3.3 (bpo-13577, commit > 9d57481f043cb9b94bfc45c1ee041415d915cf8a). I check

[issue46538] [C API] Make the PyDescrObject structure opaque

2022-01-26 Thread STINNER Victor
STINNER Victor added the comment: Since making PyDescrObject opaque is not really worth it, I close this issue. I mean, it's worth it, but there are more important structures like PyObject, PyTypeObject or PyListObject. -- resolution: -> rejected stage: -> resolved status: open ->

[issue46538] [C API] Make the PyDescrObject structure opaque

2022-01-26 Thread STINNER Victor
Change by STINNER Victor : Added file: https://bugs.python.org/file50589/swig_pydescr_new.patch ___ Python tracker ___ ___ Python-bugs-list

[issue46538] [C API] Make the PyDescrObject structure opaque

2022-01-26 Thread STINNER Victor
Change by STINNER Victor : Removed file: https://bugs.python.org/file50588/swig_pydescr_new.patch ___ Python tracker ___ ___ Python-bugs-lis

[issue46538] [C API] Make the PyDescrObject structure opaque

2022-01-26 Thread STINNER Victor
STINNER Victor added the comment: swig_pydescr_new.patch: SWIG patch adding PyDescr_New() and using it. -- Added file: https://bugs.python.org/file50588/swig_pydescr_new.patch ___ Python tracker

[issue46538] [C API] Make the PyDescrObject structure opaque

2022-01-26 Thread STINNER Victor
STINNER Victor added the comment: pythoncapi_compat_pydescr_new.patch: pythoncapi_compat patch adding PyDescr_New() function with tests. -- Added file: https://bugs.python.org/file50587/pythoncapi_compat_pydescr_new.patch ___ Python tracker

[issue46538] [C API] Make the PyDescrObject structure opaque

2022-01-26 Thread STINNER Victor
STINNER Victor added the comment: pydescr_new.patch: Python patch adding the PyDescr_New() function. -- Added file: https://bugs.python.org/file50586/pydescr_new.patch ___ Python tracker

[issue46538] [C API] Make the PyDescrObject structure opaque

2022-01-26 Thread STINNER Victor
STINNER Victor added the comment: pydescr_set_type.patch: Python patch to add PyDescr_SET_TYPE() and PyDescr_SET_NAME() functions. -- keywords: +patch Added file: https://bugs.python.org/file50585/pydescr_set_type.patch ___ Python tracker

[issue46538] [C API] Make the PyDescrObject structure opaque

2022-01-26 Thread STINNER Victor
New submission from STINNER Victor : While working on the PEP 674 implementation, I noticed that PyDescr_NAME() and PyDescr_TYPE() macros are used as l-value by two projects: M2Crypto and mecab-python3. Both are code generated by SWIG. M2Crypto-0.38.0/src/SWIG/_m2crypto_wrap.c and mecab-pyth