Issue 32459: Capsule API usage docs are incompatible with module reloading (etc) (original) (raw)

Issue32459

This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

This issue has been migrated to GitHub: https://github.com/python/cpython/issues/76640

classification

Title: Capsule API usage docs are incompatible with module reloading (etc)
Type: behavior Stage: needs patch
Components: Versions:

process

Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: Dormouse759, brett.cannon, eric.snow, ncoghlan, petr.viktorin
Priority: normal Keywords:

Created on 2017-12-31 05:27 by ncoghlan, last changed 2022-04-11 14:58 by admin.

Messages (1)
msg309266 - (view) Author: Alyssa Coghlan (ncoghlan) * (Python committer) Date: 2017-12-31 05:26
After commenting [1] on the fact that the current datetime module C API [2] is problematic due to its reliance on C level global variables, I discovered that this is actually the outcome of our recommended approach to using capsules to export a C API as function pointers: https://docs.python.org/3/extending/extending.html#providing-a-c-api-for-an-extension-module So we first need to fix the documentation to propose a reloading friendly way of using capsules in other extension modules, and then we can then propose updating the public datetime C API accordingly (probably by defining new macros that accept the capsule reference as their first argument). [1] https://bugs.python.org/issue10381#msg309214 [2] https://docs.python.org/3/c-api/datetime.html [3] https://docs.python.org/3/extending/extending.html#providing-a-c-api-for-an-extension-module
History
Date User Action Args
2022-04-11 14:58:56 admin set github: 76640
2018-01-09 10:25:18 petr.viktorin set nosy: + petr.viktorin, Dormouse759
2017-12-31 05:27:01 ncoghlan create