[issue38787] PEP 573: Module State Access from C Extension Methods

2020-11-25 Thread STINNER Victor
STINNER Victor added the comment: FYI Cython doesn't support this PEP yet: https://github.com/cython/cython/issues/3917 -- ___ Python tracker ___

[issue38787] PEP 573: Module State Access from C Extension Methods

2020-10-20 Thread Petr Viktorin
Petr Viktorin added the comment: Thanks Victor, Hai Shi, Pablo, Stefan, Dong-hee Na and Mariatta for reviews! I did not put all the details in the documentation because there are still feature gaps. So, a full write-up is now in the informational PEP 630. -- resolution: -> fixed

[issue38787] PEP 573: Module State Access from C Extension Methods

2020-09-04 Thread miss-islington
miss-islington added the comment: New changeset fbb9ee0a903fb9b7b4b807f85aed1de754da09e6 by Miss Islington (bot) in branch '3.9': [3.9] bpo-38787: Clarify docs for PyType_GetModule and warn against common mistake (GH-20215) (GH-21984)

[issue38787] PEP 573: Module State Access from C Extension Methods

2020-08-27 Thread Petr Viktorin
Petr Viktorin added the comment: New changeset d9a966ae08258da2ce2a432c943d8194760f09c4 by Petr Viktorin in branch 'master': bpo-38787: Clarify docs for PyType_GetModule and warn against common mistake (GH-20215)

[issue38787] PEP 573: Module State Access from C Extension Methods

2020-08-27 Thread miss-islington
Change by miss-islington : -- pull_requests: +21093 pull_request: https://github.com/python/cpython/pull/21984 ___ Python tracker ___

[issue38787] PEP 573: Module State Access from C Extension Methods

2020-05-23 Thread hai shi
Change by hai shi : -- pull_requests: +19609 pull_request: https://github.com/python/cpython/pull/20344 ___ Python tracker ___ ___

[issue38787] PEP 573: Module State Access from C Extension Methods

2020-05-19 Thread Petr Viktorin
Change by Petr Viktorin : -- pull_requests: +19510 pull_request: https://github.com/python/cpython/pull/20215 ___ Python tracker ___

[issue38787] PEP 573: Module State Access from C Extension Methods

2020-05-13 Thread STINNER Victor
STINNER Victor added the comment: New changeset 97e1568325e4d8eff2fc80eeb174b3f3e5d1c350 by Victor Stinner in branch 'master': bpo-38787: Fix Argument Clinic defining_class_converter (GH-20074) https://github.com/python/cpython/commit/97e1568325e4d8eff2fc80eeb174b3f3e5d1c350 --

[issue38787] PEP 573: Module State Access from C Extension Methods

2020-05-13 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +19380 pull_request: https://github.com/python/cpython/pull/20074 ___ Python tracker ___

[issue38787] PEP 573: Module State Access from C Extension Methods

2020-05-13 Thread hai shi
hai shi added the comment: > I guess I'll need to clarify the documentation here. > Call `PyType_GetModule` on the *defining class*, not on type(self). +1, I didn't notice this detail until I got the error. > The associated module is not inherited; each class in the MRO can be > > defined

[issue38787] PEP 573: Module State Access from C Extension Methods

2020-05-13 Thread Petr Viktorin
Petr Viktorin added the comment: I guess I'll need to clarify the documentation here. Call `PyType_GetModule` on the *defining class*, not on type(self). See the PEP for details. The associated module is not inherited; each class in the MRO can be defined in a different module. --

[issue38787] PEP 573: Module State Access from C Extension Methods

2020-05-12 Thread hai shi
hai shi added the comment: In PR19982, petr have mentioned that `PyType_GetModule` can not worked if the type is the subtype. I try to use pep573 in functools, I get the error info from testcases: == ERROR:

[issue38787] PEP 573: Module State Access from C Extension Methods

2020-05-12 Thread miss-islington
miss-islington added the comment: New changeset 4c9ea093cd752a6687864674d34250653653f743 by scoder in branch 'master': bpo-38787: Add PyCFunction_CheckExact() macro for exact type checks (GH-20024) https://github.com/python/cpython/commit/4c9ea093cd752a6687864674d34250653653f743 --

[issue38787] PEP 573: Module State Access from C Extension Methods

2020-05-10 Thread Stefan Behnel
Change by Stefan Behnel : -- pull_requests: +19334 pull_request: https://github.com/python/cpython/pull/20024 ___ Python tracker ___

[issue38787] PEP 573: Module State Access from C Extension Methods

2020-05-10 Thread STINNER Victor
STINNER Victor added the comment: The posix/nt and _abc modules now use the PEP 573 APIs: * posix/nt: commit 1c2fa781560608aa4be50c748d4b3f403cfa5035 (bpo-40549) * _abc: commit 77c614624b6bf2145bef69830d0f499d8b55ec0c (bpo-40566) -- ___ Python

[issue38787] PEP 573: Module State Access from C Extension Methods

2020-05-10 Thread STINNER Victor
STINNER Victor added the comment: See also bpo-40574: segfault causing regression from PEP 573 implementation (PyQt5). -- ___ Python tracker ___

[issue38787] PEP 573: Module State Access from C Extension Methods

2020-05-07 Thread STINNER Victor
STINNER Victor added the comment: New changeset c068b53a0ca6ebf740d98e422569d2f705e54f93 by Hai Shi in branch 'master': bpo-38787: Update structures.rst docs (PEP 573) (GH-19980) https://github.com/python/cpython/commit/c068b53a0ca6ebf740d98e422569d2f705e54f93 --

[issue38787] PEP 573: Module State Access from C Extension Methods

2020-05-07 Thread hai shi
Change by hai shi : -- pull_requests: +19296 pull_request: https://github.com/python/cpython/pull/19980 ___ Python tracker ___ ___

[issue38787] PEP 573: Module State Access from C Extension Methods

2020-05-07 Thread STINNER Victor
STINNER Victor added the comment: New changeset e1becf46b4e3ba6d7d32ebf4bbd3e0804766a423 by Petr Viktorin in branch 'master': bpo-38787: C API for module state access from extension methods (PEP 573) (GH-19936)

[issue38787] PEP 573: Module State Access from C Extension Methods

2020-05-06 Thread hai shi
Change by hai shi : -- nosy: +shihai1991 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38787] PEP 573: Module State Access from C Extension Methods

2020-05-05 Thread STINNER Victor
STINNER Victor added the comment: See also bpo-40137: TODO list when PEP 573 "Module State Access from C Extension Methods" will be implemented. -- nosy: +vstinner ___ Python tracker

[issue38787] PEP 573: Module State Access from C Extension Methods

2020-05-05 Thread Petr Viktorin
Change by Petr Viktorin : -- pull_requests: +19251 pull_request: https://github.com/python/cpython/pull/19936 ___ Python tracker ___

[issue38787] PEP 573: Module State Access from C Extension Methods

2020-04-29 Thread Petr Viktorin
Petr Viktorin added the comment: I'm working on the implementation as my time allows, here: https://github.com/encukou/cpython/pull/3 . Would it help to create a proper PR for CPython now? That would mean I could no longer do rebases/force-pushes, so the commits would be less readable. But

[issue38787] PEP 573: Module State Access from C Extension Methods

2020-04-28 Thread Terry J. Reedy
Terry J. Reedy added the comment: The PEP is listed as accepted, with you as the BDFL-delegate, but it lacks a link to the public acceptance message (usually on pydev list). The PR was not rejected by a core dev but was closed without explanation by the author on the same day the last

[issue38787] PEP 573: Module State Access from C Extension Methods

2020-04-28 Thread Stefan Behnel
Stefan Behnel added the comment: What can we do to move this forward? I see that the original PR was closed in January. Is there or will there be a new one? Can I help with anything? -- ___ Python tracker

[issue38787] PEP 573: Module State Access from C Extension Methods

2019-11-13 Thread Marcel Plch
Change by Marcel Plch : -- keywords: +patch pull_requests: +16655 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17145 ___ Python tracker ___

[issue38787] PEP 573: Module State Access from C Extension Methods

2019-11-13 Thread Marcel Plch
New submission from Marcel Plch : Currently, there is not way to access per-module state from the methods of types defined in extension modules. This PEP provides a fix to this issue. PEP 573 - https://www.python.org/dev/peps/pep-0573/ Reference implementation -