Skip to content

gh-161078: Correct unstable C API PEP references - #161158

Open
TheLouisMahdi wants to merge 2 commits into
python:mainfrom
TheLouisMahdi:gh-161078-pep689
Open

TheLouisMahdi wants to merge 2 commits into
python:mainfrom
TheLouisMahdi:gh-161078-pep689

Conversation

@TheLouisMahdi

@TheLouisMahdi TheLouisMahdi commented Nov 2, 2026 •

Copy link
Copy Markdown

Summary

Correct the Unstable C API tier references from PEP 697 to PEP 689 in Doc/whatsnew/3.12.rst, including the associated internal label.

The separate PEP 697 entry remains unchanged.

Closes #161078.

Testing

  • Full Sphinx HTML documentation build with Python 3.12.16: passed with zero warnings or errors.
  • Official documentation dependencies installed from Doc/pylock.toml.
  • Verified PEP 689 and PEP 697 references.
  • Validated all 1,192 local HTML fragment links on the affected page.
  • git diff --check: passed.

Sol 6.1 High was used to assist with preparing the change and validation.

@python-cla-bot

python-cla-bot Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

All commit authors signed the Contributor License Agreement.

CLA signed

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-02T07:20:36.552569Z 32a8408 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@read-the-docs-community

read-the-docs-community Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

@Aniketsy Aniketsy left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks! LGTM 👍

@CAM-Gerlach CAM-Gerlach left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The change itself is correct, except that the existing ref target label should be moved to the correct location, rather than simply replaced, to avoid breaking existing users. Please apply it by clicking the "Apply suggestion" button, or via the Files pane.

It's not backportable all the way to the original version, but the What's New is often accessed from newer versions and remains present perpetually, so I don't think this error has to and don't see the harm there.

I am a bit concerned about how much genuine human input was present here, given the comments on # --please respond, as a human, not an agent, confirming you've personally taken responsibly for this. However, given it is a trivial, correct and not substantial enough to be copyrightable change, I'm not sure its enough of an issue in practice to block this on its own.

Comment thread Doc/whatsnew/3.12.rst
Comment on lines 1886 to 1888
(Contributed by Petr Viktorin in :gh:`101101`.)

* :pep:`697`: Add an API for extending types whose instance memory layout is

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
(Contributed by Petr Viktorin in :gh:`101101`.)
.. _whatsnew312-pep697:
* :pep:`697`: Add an API for extending types whose instance memory layout is

Move the existing ref target label to the correct place, and avoid breaking anyone currently relying on it.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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


Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Suggested change
(Contributed by Petr Viktorin in :gh:101101.)
.. _whatsnew312-pep697:

  • :pep:697: Add an API for extending types whose instance memory layout is
    Unable to apply suggestions when viewing a specific commit range.
    Move the existing ref target label to the correct place, and avoid breaking anyone currently relying on it.

Thanks for the detailed review. You're right about the existing reference target.

I've updated the patch to preserve whatsnew312-pep697 at the actual PEP 697 section while keeping whatsnew312-pep689 at the Unstable C API entry. This should preserve existing links while correcting the reference.

Regarding your concern about human involvement, I used AI assistance as disclosed in the PR description. I understand the change, have reviewed the patch, and take responsibility for the contribution.

Thanks again for pointing this out.

@CAM-Gerlach CAM-Gerlach added needs backport to 3.14 bugs and security fixes needs backport to 3.15 bugs and security fixes labels Nov 3, 2026
@CAM-Gerlach CAM-Gerlach moved this from Todo to In Progress in Docs PRs Nov 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting review docs Documentation in the Doc dir needs backport to 3.14 bugs and security fixes needs backport to 3.15 bugs and security fixes skip news

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

What's New in 3.12 credits the unstable C API tier to PEP 697 instead of PEP 689

4 participants