[issue46433] _PyType_GetModuleByDef optimization is incorrect

2022-02-11 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: > Do you plan to make the function public? It would be nice! See https://github.com/python/cpython/pull/31081 -- ___ Python tracker ___

[issue46433] _PyType_GetModuleByDef optimization is incorrect

2022-02-11 Thread STINNER Victor
STINNER Victor added the comment: > It also adds a precondition that's not feasible public API, which this was > meant to become Do you plan to make the function public? It would be nice! -- ___ Python tracker

[issue46433] _PyType_GetModuleByDef optimization is incorrect

2022-02-11 Thread Petr Viktorin
Change by Petr Viktorin : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue46433] _PyType_GetModuleByDef optimization is incorrect

2022-02-11 Thread Petr Viktorin
Petr Viktorin added the comment: New changeset 8b8673fe940c4ebc4512bff5af180b66def3d1ae by Petr Viktorin in branch '3.10': [3.10] bpo-46433: _PyType_GetModuleByDef: handle static types in MRO (GH-30696) (GH-31262)

[issue46433] _PyType_GetModuleByDef optimization is incorrect

2022-02-10 Thread Petr Viktorin
Petr Viktorin added the comment: Just 3.10, after all. 3.9 doesn't have the function yet. I did the backport, but I'd welcome a review by a fresh set of eyes! -- versions: -Python 3.9 ___ Python tracker

[issue46433] _PyType_GetModuleByDef optimization is incorrect

2022-02-10 Thread Petr Viktorin
Change by Petr Viktorin : -- pull_requests: +29429 stage: backport needed -> patch review pull_request: https://github.com/python/cpython/pull/31262 ___ Python tracker ___

[issue46433] _PyType_GetModuleByDef optimization is incorrect

2022-02-04 Thread Alex Waygood
Change by Alex Waygood : -- stage: patch review -> backport needed ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue46433] _PyType_GetModuleByDef optimization is incorrect

2022-02-04 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: Right, this of course affects 3.10 and 3.9. Let me know if you want me to do the backports :) (Updating version field for this ticket) -- versions: +Python 3.10, Python 3.9 ___ Python tracker

[issue46433] _PyType_GetModuleByDef optimization is incorrect

2022-02-04 Thread Petr Viktorin
Petr Viktorin added the comment: Almost. It's a bugfix so it needs backports to 3.10 & 3.9. Thanks for the reminder! I should get to them next week. -- status: pending -> open ___ Python tracker

[issue46433] _PyType_GetModuleByDef optimization is incorrect

2022-02-03 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: It looks like this can be closed. Petr? -- status: open -> pending ___ Python tracker ___ ___

[issue46433] _PyType_GetModuleByDef optimization is incorrect

2022-02-02 Thread miss-islington
miss-islington added the comment: New changeset 0ef08530124c5ca13a9394f4ac18bee8e6c66409 by Petr Viktorin in branch 'main': bpo-46433: _PyType_GetModuleByDef: handle static types in MRO (GH-30696) https://github.com/python/cpython/commit/0ef08530124c5ca13a9394f4ac18bee8e6c66409 --

[issue46433] _PyType_GetModuleByDef optimization is incorrect

2022-01-21 Thread STINNER Victor
STINNER Victor added the comment: An alternative would be to merge PyHeapTypeObject members into PyTypeObject. I don't get why there is a separated struture: PyTypeObject is excluded from the stable ABI. See my remark about that: https://bugs.python.org/issue22079#msg391464 Having a

[issue46433] _PyType_GetModuleByDef optimization is incorrect

2022-01-21 Thread STINNER Victor
STINNER Victor added the comment: Oh, it seems like I misunderstood type_ready_mro() change. The check is only done on static types type. The MRO of heap types is not checked. -- In my change, I wrote: // _PyType_GetModuleByDef() must only be called on a heap type created

[issue46433] _PyType_GetModuleByDef optimization is incorrect

2022-01-19 Thread Erlend E. Aasland
Change by Erlend E. Aasland : -- nosy: +erlendaasland ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46433] _PyType_GetModuleByDef optimization is incorrect

2022-01-19 Thread Petr Viktorin
Change by Petr Viktorin : -- keywords: +patch pull_requests: +28894 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30696 ___ Python tracker ___

[issue46433] _PyType_GetModuleByDef optimization is incorrect

2022-01-19 Thread Petr Viktorin
New submission from Petr Viktorin : I'm looking at the _PyType_GetModuleByDef optimization in https://github.com/python/cpython/pull/25504/files -- previously I assumed it's OK since it passed review. But it doesn't look correct: - in the `_PyType_HasFeature` assert, we should be looking at