[issue41798] [C API] Revisit usage of the PyCapsule C API with multi-phase initialization API

2021-01-25 Thread STINNER Victor
STINNER Victor added the comment: hai shi: "I have checked all capi instances have been allocated in the heap memory. So I think this bpo can be closed ;)" I also checks and I confirm that PyCapsule_New() is no longer used with a pointer pointing to static data. Well, there is one last

[issue41798] [C API] Revisit usage of the PyCapsule C API with multi-phase initialization API

2021-01-23 Thread hai shi
hai shi added the comment: I have checked all capi instances have been allocated in the heap memory. So I think this bpo can be closed ;) Thanks Erlend for your contribution. Thanks victor, petr for your review -- resolution: -> fixed stage: patch review -> resolved status: open ->

[issue41798] [C API] Revisit usage of the PyCapsule C API with multi-phase initialization API

2021-01-22 Thread STINNER Victor
STINNER Victor added the comment: New changeset 2f12a1b7ecc9e0cf39b4c6994473e6cb9989f81b by Hai Shi in branch 'master': bpo-41798: Allocate the _curses._C_API on the heap memory (GH-24186) https://github.com/python/cpython/commit/2f12a1b7ecc9e0cf39b4c6994473e6cb9989f81b --

[issue41798] [C API] Revisit usage of the PyCapsule C API with multi-phase initialization API

2021-01-20 Thread STINNER Victor
STINNER Victor added the comment: New changeset 61d26394f97306ab4890f1522f26ee6d17461e2b by Erlend Egeberg Aasland in branch 'master': bpo-41798: Allocate unicodedata CAPI on the heap (GH-24128) https://github.com/python/cpython/commit/61d26394f97306ab4890f1522f26ee6d17461e2b --

[issue41798] [C API] Revisit usage of the PyCapsule C API with multi-phase initialization API

2021-01-10 Thread hai shi
Change by hai shi : -- pull_requests: +23014 pull_request: https://github.com/python/cpython/pull/24186 ___ Python tracker ___ ___

[issue41798] [C API] Revisit usage of the PyCapsule C API with multi-phase initialization API

2021-01-06 Thread STINNER Victor
STINNER Victor added the comment: New changeset 1ab045933b90d1954af983cc08d1bf0bc46b6240 by Hai Shi in branch 'master': bpo-41798: Allocate the _datetime.datetime_CAPI on the heap memory (GH-24096) https://github.com/python/cpython/commit/1ab045933b90d1954af983cc08d1bf0bc46b6240 --

[issue41798] [C API] Revisit usage of the PyCapsule C API with multi-phase initialization API

2021-01-06 Thread STINNER Victor
STINNER Victor added the comment: New changeset f22b7ca1afd98a7381a9fe9e53bd6dfa2a5eba16 by Erlend Egeberg Aasland in branch 'master': bpo-41798: Allocate _socket module C API on the heap (GH-24126) https://github.com/python/cpython/commit/f22b7ca1afd98a7381a9fe9e53bd6dfa2a5eba16

[issue41798] [C API] Revisit usage of the PyCapsule C API with multi-phase initialization API

2021-01-06 Thread STINNER Victor
STINNER Victor added the comment: New changeset fe9f446afe46bd716592eda9fa2af8d9f46bbce4 by Erlend Egeberg Aasland in branch 'master': bpo-41798: Allocate _decimal extension module C API on the heap (GH-24117) https://github.com/python/cpython/commit/fe9f446afe46bd716592eda9fa2af8d9f46bbce4

[issue41798] [C API] Revisit usage of the PyCapsule C API with multi-phase initialization API

2021-01-05 Thread Erlend Egeberg Aasland
Change by Erlend Egeberg Aasland : -- pull_requests: +22958 pull_request: https://github.com/python/cpython/pull/24128 ___ Python tracker ___

[issue41798] [C API] Revisit usage of the PyCapsule C API with multi-phase initialization API

2021-01-05 Thread Erlend Egeberg Aasland
Change by Erlend Egeberg Aasland : -- pull_requests: +22956 pull_request: https://github.com/python/cpython/pull/24126 ___ Python tracker ___

[issue41798] [C API] Revisit usage of the PyCapsule C API with multi-phase initialization API

2021-01-05 Thread Christian Heimes
Christian Heimes added the comment: > BTW, do we still want to keep the socket CAPI for external users? Yes, at least for a while. socket.h is not part of the public include headers. It's still possible that the CAPI is used by an external project. --

[issue41798] [C API] Revisit usage of the PyCapsule C API with multi-phase initialization API

2021-01-05 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: > I'm also in the process of removing PySocketModuleAPI from _ssl.c. BTW, do we still want to keep the socket CAPI for external users? -- ___ Python tracker

[issue41798] [C API] Revisit usage of the PyCapsule C API with multi-phase initialization API

2021-01-05 Thread Erlend Egeberg Aasland
Change by Erlend Egeberg Aasland : -- pull_requests: +22947 pull_request: https://github.com/python/cpython/pull/24117 ___ Python tracker ___

[issue41798] [C API] Revisit usage of the PyCapsule C API with multi-phase initialization API

2021-01-05 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: > I'm also in the process of removing PySocketModuleAPI from _ssl.c. That's the only user of the API, right? In that case, I'll target _decimal instead. Hai Shi is working on _curses and _datetime, AFAIK. --

[issue41798] [C API] Revisit usage of the PyCapsule C API with multi-phase initialization API

2021-01-05 Thread Christian Heimes
Christian Heimes added the comment: PySocketModuleAPI.timeout_error now points to builtin TimeoutError exception. I'm also in the process of removing PySocketModuleAPI from _ssl.c. -- nosy: +christian.heimes ___ Python tracker

[issue41798] [C API] Revisit usage of the PyCapsule C API with multi-phase initialization API

2021-01-05 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: > Welcome to join this bpo, you can enhance those extension modules if you like > :) Thanks :) I'll take a look at socket first. -- ___ Python tracker

[issue41798] [C API] Revisit usage of the PyCapsule C API with multi-phase initialization API

2021-01-05 Thread hai shi
hai shi added the comment: > Hai Shi, do you mind if I have a go at the socket module CAPI capsule? Welcome to join this bpo, you can enhance those extension modules if you like :) -- ___ Python tracker

[issue41798] [C API] Revisit usage of the PyCapsule C API with multi-phase initialization API

2021-01-05 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: Hai Shi, do you mind if I have a go at the socket module CAPI capsule? -- nosy: +erlendaasland ___ Python tracker ___

[issue41798] [C API] Revisit usage of the PyCapsule C API with multi-phase initialization API

2021-01-04 Thread hai shi
Change by hai shi : -- pull_requests: +22927 pull_request: https://github.com/python/cpython/pull/24096 ___ Python tracker ___ ___

[issue41798] [C API] Revisit usage of the PyCapsule C API with multi-phase initialization API

2021-01-03 Thread STINNER Victor
STINNER Victor added the comment: New changeset 7c83eaa536d2f436ae46211ca48692f576c732f0 by Hai Shi in branch 'master': bpo-41798: pyexpat: Allocate the expat_CAPI on the heap memory (GH-24061) https://github.com/python/cpython/commit/7c83eaa536d2f436ae46211ca48692f576c732f0 --

[issue41798] [C API] Revisit usage of the PyCapsule C API with multi-phase initialization API

2021-01-02 Thread hai shi
Change by hai shi : -- keywords: +patch pull_requests: +22895 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24061 ___ Python tracker ___

[issue41798] [C API] Revisit usage of the PyCapsule C API with multi-phase initialization API

2020-11-09 Thread pkerling
Change by pkerling <9b6ab...@casix.org>: -- nosy: +pkerling ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue41798] [C API] Revisit usage of the PyCapsule C API with multi-phase initialization API

2020-10-26 Thread STINNER Victor
STINNER Victor added the comment: > Also note that the capsule generally needs to hold references to the objects > in exposes Oh right, that's a great advice! -- ___ Python tracker

[issue41798] [C API] Revisit usage of the PyCapsule C API with multi-phase initialization API

2020-10-20 Thread Petr Viktorin
Petr Viktorin added the comment: Also note that the capsule generally needs to hold references to the objects in exposes, and not rely on the module object to keep things alive. (Module objects with multi-phase init are not unique nor immortal.) _ctypes is an exception, since it doesn't have

[issue41798] [C API] Revisit usage of the PyCapsule C API with multi-phase initialization API

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

[issue41798] [C API] Revisit usage of the PyCapsule C API with multi-phase initialization API

2020-09-16 Thread Dong-hee Na
Change by Dong-hee Na : -- nosy: +corona10 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue41798] [C API] Revisit usage of the PyCapsule C API with multi-phase initialization API

2020-09-16 Thread STINNER Victor
STINNER Victor added the comment: > unicodedata: static variable Right now, it's ok-ish. Mohamed Koubaa is working on PR 22145 to pass a module state into internal functions, and so the PyCapsule pointer must be different in each module instance. --

[issue41798] [C API] Revisit usage of the PyCapsule C API with multi-phase initialization API

2020-09-16 Thread Petr Viktorin
Change by Petr Viktorin : -- nosy: +petr.viktorin ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue41798] [C API] Revisit usage of the PyCapsule C API with multi-phase initialization API

2020-09-16 Thread STINNER Victor
New submission from STINNER Victor : More and more extension modules are converted to the multi-phase initialization API (PEP 489) in bpo-1635741. The problem is that the usage of the PyCapsule C API is not adapted in these extensions, to isolate well capsule objects from other module