GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GH-109975: Copyedit 3.13 What's New: C API by AA-Turner · Pull Request #124313 · python/cpython

Conversation

@AA-Turner

@AA-Turner AA-Turner commented Sep 22, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

A copy-editing pass for C API. This one is quite large as we move the changes to, deprecated, and removed C API sub-sections from the 'porting' section to the 'C API' section, where they belong.

  • Per @serhiy-storchaka in GH-109975: Copyedit 3.13 What's New: Release Highlights #122958 (comment) I've organised each section by group (function, constant, macro, etc), and then alphabetically within that group.
  • I have highlighted some bigger APIs at the top of 'New features', though.
  • I've added a new sub-section for changes to the limited C API.
  • I haven't looked at c-api-pending-removal-in-XXX.rst as this PR was getting too large already, I'll do that after this PR and assess if anything pressing needs updating.

A

  • Issue: What's New in Python 3.13 (copyediting) #109975

📚 Documentation preview 📚: https://cpython-previews--124313.org.readthedocs.build/en/124313/whatsnew/3.13.html#c-api-changes

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@AA-Turner
Copyedit C API
1226212
@AA-Turner AA-Turner added docs Documentation in the Doc dir skip news needs backport to 3.13 only security fixes labels Sep 22, 2024
@AA-Turner
AA-Turner requested review from Yhg1s, encukou, hugovk and serhiy-storchaka September 22, 2024 06:03
@bedevere-app bedevere-app Bot added the awaiting core review label Sep 22, 2024
@bedevere-app bedevere-app Bot mentioned this pull request Sep 22, 2024
What's New in Python 3.13 (copyediting) #109975
Closed
AA-Turner
AA-Turner commented Sep 22, 2024
View reviewed changes
Comment thread Doc/whatsnew/3.13.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

serhiy-storchaka
serhiy-storchaka reviewed Sep 22, 2024
View reviewed changes

@serhiy-storchaka serhiy-storchaka left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Great work!

Some lines look too long, and some lines look unnecessary short. Could you please reformat the text using the recommended maximal line length (I think 79 from PEP 12 is applied here)?

Alphabetical order is perhaps necessary for such large number of changes, but in some cases I think that it would be better to group semantically close changes together. For example, PyObject_GenericHash and Py_HashPointer. Or PyMapping_GetOptionalItem, which is close to PyDict_* changes and to PyObject_GetOptionalAttr, and to PyMapping_HasKeyWithError. But I do not see a way how this can be improved.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread Doc/whatsnew/3.13.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Doc/whatsnew/3.13.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Doc/whatsnew/3.13.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Doc/whatsnew/3.13.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Doc/whatsnew/3.13.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Doc/whatsnew/3.13.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Doc/whatsnew/3.13.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Doc/whatsnew/3.13.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Doc/whatsnew/3.13.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Doc/whatsnew/3.13.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

AA-Turner added 2 commits September 23, 2024 05:42
@AA-Turner
Serhiy pt 1
ab9d1bf
@AA-Turner
Serhiy pt 2: Group related functions
6860674
* PyDict*: PyMapping_GetOptionalItem and PyObject_GetOptionalAttr
* Py_HashPointer and Py_HashPointer
AA-Turner
AA-Turner commented Sep 23, 2024
View reviewed changes

@AA-Turner AA-Turner left a comment

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Thanks for the review, I've pushed two commits.

Some lines look too long, and some lines look unnecessary short. Could you please reformat the text using the recommended maximal line length (I think 79 from PEP 12 is applied here)?

The devguide also says 79/80, but in a few places I've gone a couple of characters over to avoid a mostly empty orphan line.

I've rebalanced the particularly egregious case you pointed out, but breaking lines early is a somewhat intentional choice (some people call it semantic line breaks) where I break the line at punctuation or a clause in a sentence. This tends to lead to smaller diffs later down the line, as re-wrapping an entire paragraph for changing a single word can be avoided.

(This is of course only visible in the .rst -- the vast majority readers will never know which lines were broken where in the HTML or PDF output)

A

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread Doc/whatsnew/3.13.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

@AA-Turner
AA-Turner requested a review from serhiy-storchaka September 23, 2024 04:52
serhiy-storchaka
serhiy-storchaka approved these changes Sep 23, 2024
View reviewed changes
@bedevere-app bedevere-app Bot added awaiting merge and removed awaiting core review labels Sep 23, 2024
@AA-Turner
AA-Turner merged commit 9d0a752 into python:main Sep 23, 2024
@AA-Turner
AA-Turner deleted the docs/whatsnew/c-api branch September 23, 2024 13:28
@miss-islington-app

miss-islington-app Bot commented Sep 23, 2024

Copy link
Copy Markdown

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app bedevere-app Bot removed the awaiting merge label Sep 23, 2024
@miss-islington-app

miss-islington-app Bot commented Sep 23, 2024

Copy link
Copy Markdown

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 9d0a75269c6ae361b1ed5910c3b3424ed93b6f6d 3.13
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@miss-islington-app miss-islington-app Bot assigned AA-Turner Sep 23, 2024
AA-Turner added a commit to AA-Turner/cpython that referenced this pull request Sep 23, 2024
@AA-Turner
[3.13] pythonGH-109975: Copyedit 3.13 What's New: C API (pythonGH-124313
291f8a5
)

(cherry picked from commit 9d0a752)

Co-authored-by: Adam Turner <[email protected]>
@bedevere-app

bedevere-app Bot commented Sep 23, 2024

Copy link
Copy Markdown

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app bedevere-app Bot removed the needs backport to 3.13 only security fixes label Sep 23, 2024
Yhg1s pushed a commit that referenced this pull request Sep 23, 2024
@AA-Turner @encukou
[3.13] GH-109975: Copyedit 3.13 What's New: C API (GH-124313) (#124334)
86f30dd
* [3.13] GH-109975: Copyedit 3.13 What's New: C API (GH-124313)
(cherry picked from commit 9d0a752)

* gh-118915: Add/fix docs entries for some new 3.13 C API (GH-124134)

Co-authored-by: Adam Turner <[email protected]>
Co-authored-by: Petr Viktorin <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@serhiy-storchaka serhiy-storchaka serhiy-storchaka approved these changes
@encukou encukou Awaiting requested review from encukou
@hugovk hugovk Awaiting requested review from hugovk
@Yhg1s Yhg1s Awaiting requested review from Yhg1s
+1 more reviewer
@rruuaanng rruuaanng rruuaanng left review comments
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@AA-Turner AA-Turner

Labels

docs Documentation in the Doc dir skip news

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@AA-Turner @serhiy-storchaka @rruuaanng
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.