Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GH-121970: Rewrite the C-API annotations extension #121985

Merged
merged 9 commits into from
Jul 19, 2024

Conversation

AA-Turner
Copy link
Member

@AA-Turner AA-Turner commented Jul 18, 2024

I've tested the output before and after this commit, entirely equal save for a new link target in c-api/module.html#c.Py_mod_create.create_module and c-api/module.html#c.Py_mod_exec.exec_module (because we switch from patching in :noindex: to using the C Domain's supported :no-index-entry:).

This introduces some new dataclasses, removes the state stored in closures and the Annotated class instance, and does some small cleanups. Notably, stable_abi.dat is changed to storing the role name rather than the object type, which simplifies things a little.

A


📚 Documentation preview 📚: https://cpython-previews--121985.org.readthedocs.build/en/121985/c-api/index.html

@AA-Turner AA-Turner added needs backport to 3.12 bug and security fixes needs backport to 3.13 bugs and security fixes labels Jul 19, 2024
Copy link
Member

@encukou encukou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks for refreshing this extension!

Some nitpicks:

Doc/tools/extensions/c_annotations.py Outdated Show resolved Hide resolved
Doc/tools/extensions/c_annotations.py Outdated Show resolved Hide resolved
@AA-Turner AA-Turner enabled auto-merge (squash) July 19, 2024 11:57
@AA-Turner AA-Turner merged commit 22c9d9c into python:main Jul 19, 2024
33 checks passed
@miss-islington-app
Copy link

Thanks @AA-Turner for the PR 🌮🎉.. I'm working now to backport this PR to: 3.12, 3.13.
🐍🍒⛏🤖 I'm not a witch! I'm not a witch!

@miss-islington-app
Copy link

Sorry, @AA-Turner, I could not cleanly backport this to 3.13 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker 22c9d9c1fcc3bb6186524330b169eda6df450f1b 3.13

@miss-islington-app
Copy link

Sorry, @AA-Turner, I could not cleanly backport this to 3.12 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker 22c9d9c1fcc3bb6186524330b169eda6df450f1b 3.12

@AA-Turner AA-Turner added needs backport to 3.12 bug and security fixes and removed needs backport to 3.12 bug and security fixes labels Jul 19, 2024
@miss-islington-app
Copy link

Thanks @AA-Turner for the PR 🌮🎉.. I'm working now to backport this PR to: 3.12.
🐍🍒⛏🤖

@miss-islington-app
Copy link

Sorry, @AA-Turner, I could not cleanly backport this to 3.12 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker 22c9d9c1fcc3bb6186524330b169eda6df450f1b 3.12

AA-Turner added a commit to AA-Turner/cpython that referenced this pull request Jul 19, 2024
…onGH-121985)

(cherry picked from commit 22c9d9c)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
@bedevere-app
Copy link

bedevere-app bot commented Jul 19, 2024

GH-122025 is a backport of this pull request to the 3.12 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.12 bug and security fixes label Jul 19, 2024
AA-Turner added a commit to AA-Turner/cpython that referenced this pull request Jul 19, 2024
Co-authored-by: Petr Viktorin <encukou@gmail.com>
(cherry picked from commit 22c9d9c)
@bedevere-app
Copy link

bedevere-app bot commented Jul 19, 2024

GH-122027 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.13 bugs and security fixes label Jul 19, 2024
AA-Turner added a commit that referenced this pull request Jul 19, 2024
…#122025)

(cherry picked from commit 22c9d9c)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
AA-Turner added a commit that referenced this pull request Jul 19, 2024
…122027)

GH-121970: Rewrite the C-API annotations extension (#121985)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
(cherry picked from commit 22c9d9c)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir skip news
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants