[issue22079] Ensure in PyType_Ready() that base class of static type is static

2022-01-24 Thread Petr Viktorin
Petr Viktorin added the comment: > Is there a reason to not add these fields to PyTypeObject? Can't say I haven't thought of that, but AFAIK it would mean breaking the C API substantially. Even if not it'd be a PEP-sized change, IMO. -- nosy: +petr.viktorin

[issue22079] Ensure in PyType_Ready() that base class of static type is static

2021-04-20 Thread STINNER Victor
STINNER Victor added the comment: I recently reworked type_new() and PyType_New() in bpo-43770. I wrote documentation for the type_ready_inherit_as_structs() helper function of PyType_Ready(): // For static types, inherit tp_as_xxx structures from the base class // if it's NULL. // // For

[issue22079] Ensure in PyType_Ready() that base class of static type is static

2021-04-20 Thread Stefan Behnel
Stefan Behnel added the comment: Coming back to this after a while. I would like to get rid of the work-around (read: huge hack) that we have in Cython for this check and thus would ask for the check to be removed in Py3.10. According to the discussion, no-one seemed to remember why it was

[issue22079] Ensure in PyType_Ready() that base class of static type is static

2020-05-12 Thread Stefan Behnel
Stefan Behnel added the comment: Since it's not clear from this ticket what the original problem was, is there a chance it could have been related to issue 35810? -- nosy: +scoder ___ Python tracker

[issue22079] Ensure in PyType_Ready() that base class of static type is static

2020-05-12 Thread Antoine Pitrou
Antoine Pitrou added the comment: The workaround that Cython had to added for this (temporarily enable Py_TPFLAGS_HEAPTYPE when calling PyType_Ready()) is fragile. It would be nice to rethink the approach here, or disable the check altogether. (or perhaps, expose another C API function -

[issue22079] Ensure in PyType_Ready() that base class of static type is static

2018-09-24 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: > It would be good if PyType_Ready() will check that base class of static type > is static. What's the rationale for this change? It's not explained in this bug report nor in the code. -- nosy: +jdemeyer ___

[issue22079] Ensure in PyType_Ready() that base class of static type is static

2016-06-26 Thread Xiang Zhang
Xiang Zhang added the comment: Oh yes. The mro list can be customized so we can not even guarantee the type appears at index 0 and object at index n-1. It seems we should still keep what it is now, iterating the whole mro list. Sorry that my previous comments seem to be noise. But maybe we

[issue22079] Ensure in PyType_Ready() that base class of static type is static

2016-06-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This is interesting question. It looks that base classes (as well as mro classes) may not go through PyType_Ready. There is no even a check that mro() returns only ancestor classes and contains the initial class itself. --

[issue22079] Ensure in PyType_Ready() that base class of static type is static

2016-06-26 Thread Xiang Zhang
Xiang Zhang added the comment: I thought that too at first. But if we use __bases__, can we still guarantee that 'all bases of statically allocated type should be statically allocated'? How about its grand bases? Is it possible that a statically allocated type inherit a dynamic type but does

[issue22079] Ensure in PyType_Ready() that base class of static type is static

2016-06-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Good point! tp_bases should be iterated instead of tp_mro in this check. -- resolution: fixed -> stage: resolved -> patch review status: closed -> open Added file: http://bugs.python.org/file43541/issue22079-tp_bases.patch

[issue22079] Ensure in PyType_Ready() that base class of static type is static

2016-06-25 Thread Xiang Zhang
Xiang Zhang added the comment: Of course, I know it. But doesn't the local variable `bases` refer to mro[1]? [1] https://hg.python.org/cpython/file/tip/Objects/typeobject.c#l4900 -- ___ Python tracker

[issue22079] Ensure in PyType_Ready() that base class of static type is static

2016-06-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: __bases__ != mro() -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue22079] Ensure in PyType_Ready() that base class of static type is static

2016-06-25 Thread Xiang Zhang
Xiang Zhang added the comment: In the mro list I think the first is always the type itself which has already been checked to be a statically allocated type if we can touch the loop. Starting from 0 checks it twice and it's not a base either. BTW, I don't receive an email from the tracker. :(

[issue22079] Ensure in PyType_Ready() that base class of static type is static

2016-06-24 Thread Xiang Zhang
Xiang Zhang added the comment: I think we can start from index 1 instead of 0. -- nosy: +xiang.zhang ___ Python tracker ___

[issue22079] Ensure in PyType_Ready() that base class of static type is static

2015-03-30 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22079 ___

[issue22079] Ensure in PyType_Ready() that base class of static type is static

2015-03-22 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22079 ___

[issue22079] Ensure in PyType_Ready() that base class of static type is static

2015-03-22 Thread Roundup Robot
Roundup Robot added the comment: New changeset aa79a04e9bf5 by Serhiy Storchaka in branch '2.7': Issue #22079: Py3k warning now is issued in PyType_Ready() instead of https://hg.python.org/cpython/rev/aa79a04e9bf5 New changeset 57a457ea84e4 by Serhiy Storchaka in branch '3.4': Issue #22079:

[issue22079] Ensure in PyType_Ready() that base class of static type is static

2015-02-27 Thread Matthias Klose
Matthias Klose added the comment: reopening, this breaks some stuff in several places ... https://bugs.launchpad.net/ubuntu/+source/terminator/+bug/1426294 -- nosy: +doko resolution: fixed - status: closed - open ___ Python tracker

[issue22079] Ensure in PyType_Ready() that base class of static type is static

2015-02-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This restriction was added because bad thing could happen when statically allocated class inherits dynamically allocated class. I don't remember the number of the issue where such example was exposed, may be Alex remember it. Likely pygobject creates

[issue22079] Ensure in PyType_Ready() that base class of static type is static

2015-02-05 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- assignee: - serhiy.storchaka resolution: - fixed stage: patch review - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22079

[issue22079] Ensure in PyType_Ready() that base class of static type is static

2015-01-28 Thread Roundup Robot
Roundup Robot added the comment: New changeset c087ac6fc171 by Serhiy Storchaka in branch '2.7': Issue #22079: PyType_Ready() now checks that statically allocated type has https://hg.python.org/cpython/rev/c087ac6fc171 New changeset 747855f29b9d by Serhiy Storchaka in branch '3.4': Issue

[issue22079] Ensure in PyType_Ready() that base class of static type is static

2015-01-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Ping. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22079 ___ ___ Python-bugs-list mailing list

[issue22079] Ensure in PyType_Ready() that base class of static type is static

2014-11-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Could anyone please make a review? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22079 ___ ___

[issue22079] Ensure in PyType_Ready() that base class of static type is static

2014-11-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is a patch. -- keywords: +needs review, patch stage: needs patch - patch review Added file: http://bugs.python.org/file37211/issue22079.patch ___ Python tracker rep...@bugs.python.org

[issue22079] Ensure in PyType_Ready() that base class of static type is static

2014-07-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: By static, you mean not a heap type? Yes. Sorry for bad wording. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22079 ___

[issue22079] Ensure in PyType_Ready() that base class of static type is static

2014-07-26 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: It would be good if PyType_Ready() will check that base class of static type is static. -- components: Interpreter Core messages: 224049 nosy: alex, haypo, serhiy.storchaka priority: normal severity: normal stage: needs patch status: open title:

[issue22079] Ensure in PyType_Ready() that base class of static type is static

2014-07-26 Thread Antoine Pitrou
Antoine Pitrou added the comment: By static, you mean not a heap type? -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22079 ___

[issue22079] Ensure in PyType_Ready() that base class of static type is static

2014-07-26 Thread Alex Gaynor
Alex Gaynor added the comment: Yup. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22079 ___ ___ Python-bugs-list mailing list Unsubscribe: