gh-117398: datetime: Make use of C-API capsules for sub-interpreters by neonene · Pull Request #117413 · python/cpython · GitHub
Skip to content

gh-117398: datetime: Make use of C-API capsules for sub-interpreters - #117413

Closed
neonene wants to merge 16 commits into
python:mainfrom
neonene:capsule
Closed

gh-117398: datetime: Make use of C-API capsules for sub-interpreters#117413
neonene wants to merge 16 commits into
python:mainfrom
neonene:capsule

Conversation

@neonene

@neonene neonene commented Apr 1, 2024

Copy link
Copy Markdown
Contributor

Allow sub-interpreters to access their C-API by calling PyCapsule_Import function every time. Performance could be recovered by client's local caching. The _zoneinfo extension could also improve a few C-API accesses, if necessary.

UPDATE: Tuned for a sub-interpreter: #117413 (comment)

cc @erlend-aasland @ericsnowcurrently

Comment thread Include/datetime.h Outdated
Comment thread Include/datetime.h Outdated
@ericsnowcurrently

Copy link
Copy Markdown
Member

@neonene

neonene commented Apr 10, 2024

Copy link
Copy Markdown
Contributor Author

#117498 is a demo version of _datetime isolated with this way, which I think does not conflict with long-term approaches.

cc @pganssle

@neonene

neonene commented May 1, 2024

Copy link
Copy Markdown
Contributor Author

@neonene neonene closed this May 23, 2024
@neonene
neonene deleted the capsule branch May 23, 2024 14:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants