[issue34522] PyTypeObject's tp_base initialization bug

2019-01-07 Thread STINNER Victor
Change by STINNER Victor : -- nosy: +vstinner ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34522] PyTypeObject's tp_base initialization bug

2019-01-04 Thread Eric Snow
Change by Eric Snow : -- nosy: +eric.snow ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34522] PyTypeObject's tp_base initialization bug

2018-08-29 Thread Ronald Oussoren
Ronald Oussoren added the comment: Eddie, I have read the thread and still don't see why breaking existing code is a good thing to do. As I wrote earlier there are two issues you're trying to address with one patch: 1) Not all types in the CPython tree are initialised using PyType_Ready

[issue34522] PyTypeObject's tp_base initialization bug

2018-08-29 Thread Eddie Elizondo
Eddie Elizondo added the comment: @ronaldoussoren * This change currently works for all CPython. If you are using this pattern then you probably want to be using PyType_FromSpec rather than having a static PyTypeObject as discussed in PEP384: https://www.python.org/dev/peps/pep-0384. In

[issue34522] PyTypeObject's tp_base initialization bug

2018-08-29 Thread Ronald Oussoren
Ronald Oussoren added the comment: BTW. And that -1 was even before considering that PyVarObject_HEAD_INIT is not a type-object specific macro, but a macro to staticky initialize values of PyVarObject. -- ___ Python tracker

[issue34522] PyTypeObject's tp_base initialization bug

2018-08-29 Thread Ronald Oussoren
Ronald Oussoren added the comment: I was also talking about static C types, it is possible to write types with custom meta types in C code (even if that is even less common than using meta types in the first place). I have extensions where I use PyVarObject_HEAD_INIT without the first

[issue34522] PyTypeObject's tp_base initialization bug

2018-08-28 Thread Eddie Elizondo
Eddie Elizondo added the comment: @ronaldoussoren Please read the complete analysis from the mailing list: https://mail.python.org/pipermail/python-dev/2018-August/154946.html. The description here was just a rehash and I probably missed some context. Particularly, when I said:

[issue34522] PyTypeObject's tp_base initialization bug

2018-08-28 Thread Ronald Oussoren
Ronald Oussoren added the comment: (added "object model" reviewers to the nosy list) -- nosy: +benjamin.peterson, twouters ___ Python tracker ___

[issue34522] PyTypeObject's tp_base initialization bug

2018-08-28 Thread Ronald Oussoren
Ronald Oussoren added the comment: I don't agree with "This means that a PyTypeObject's ob_type should always be set by PyType_Ready.", and therefore don't agree with the change to PyVarObject_HEAD_INIT. In particular this is not correct when the type has a custom metatype (e.g. ob_type !=

[issue34522] PyTypeObject's tp_base initialization bug

2018-08-27 Thread Eddie Elizondo
Change by Eddie Elizondo : -- keywords: +patch pull_requests: +8432 stage: -> patch review ___ Python tracker ___ ___

[issue34522] PyTypeObject's tp_base initialization bug

2018-08-27 Thread Eddie Elizondo
New submission from Eddie Elizondo : >From the documentation, it says that PyType_Ready should be called on `ALL` >type objects to finish their initialization >(https://docs.python.org/3/c-api/type.html#c.PyType_Ready). This means that a >PyTypeObject's ob_type should always be set by