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-109190: Copyedit 3.12 What's New: Improve the C-API deprecations section #109751

Merged
merged 9 commits into from
Sep 25, 2023

Conversation

AA-Turner
Copy link
Member

@AA-Turner AA-Turner commented Sep 22, 2023

  • Per @vstinner's note, move deprecations of ma_version_tag and immutable types / mutable bases to the C-API section
  • Introduce Pending Removal in Python 3.14 / Python 3.15 / Future Versions sections
  • Copy the list of deprecations from 3.13 What's New to these sections (with minor copyediting)

📚 Documentation preview 📚: https://cpython-previews--109751.org.readthedocs.build/

Comment on lines -1258 to -1259
* Creating :c:data:`immutable types <Py_TPFLAGS_IMMUTABLETYPE>` with mutable
bases using the C API (:gh:`95388`)
Copy link
Member Author

Choose a reason for hiding this comment

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

Note this entry was duplicated; I've only kept one of them

@AA-Turner AA-Turner changed the title GH-109190: Move C-API deprecations to the C-API section GH-109190: Copyedit 3.12 What's New: Improve the C-API deprecations section Sep 22, 2023
Copy link
Member

@vstinner vstinner left a comment

Choose a reason for hiding this comment

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

LGTM.

Thanks for going through all deprecated C API! I didn't realize that this list was so long!

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* :c:func:`!PyUnicode_AsEncodedUnicode`: use c:func:`PyCodec_Encode`
* :c:func:`PyUnicode_READY`: unneeded since Python 3.12
* :c:func:`!PyErr_Display`: use :c:func:`PyErr_DisplayException`
* :c:func:`!_PyErr_ChainExceptions`: use ``_PyErr_ChainExceptions1``
Copy link
Member

Choose a reason for hiding this comment

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

I am not sure about this. It is an internal convenient function, and it can be removed or changed in incompatible way without warning.

Copy link
Member Author

Choose a reason for hiding this comment

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

We're recommending a private replacement to a private function here, so I think it's fine. This isn't saying that readers should use the functions, just what the replacements for the deprecated versions are.

@hugovk hugovk enabled auto-merge (squash) September 25, 2023 12:34
@hugovk hugovk merged commit bccc1b7 into python:main Sep 25, 2023
@miss-islington
Copy link
Contributor

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

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Sep 25, 2023
…ions section (pythonGH-109751)

(cherry picked from commit bccc1b7)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
@bedevere-app
Copy link

bedevere-app bot commented Sep 25, 2023

GH-109830 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 Sep 25, 2023
@vstinner
Copy link
Member

Would you mind to copy the "Pending Removal xxx" sections of C API Changes to What's New In Python 3.13? (main branch)

@AA-Turner
Copy link
Member Author

Done: #109843

A

Yhg1s pushed a commit that referenced this pull request Sep 26, 2023
…tions section (GH-109751) (#109830)

* GH-109190: Copyedit 3.12 What's New: Improve the C-API deprecations section (GH-109751)
(cherry picked from commit bccc1b7)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>

* Remove the weakref get object functions

---------

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
csm10495 pushed a commit to csm10495/cpython that referenced this pull request Sep 28, 2023
…ions section (python#109751)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
@AA-Turner AA-Turner deleted the docs/whatsnew/c-api branch September 29, 2023 08:16
Glyphack pushed a commit to Glyphack/cpython that referenced this pull request Sep 2, 2024
…ions section (python#109751)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
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.

5 participants