Skip to content

GH-109190: Copyedit 3.12 What's New: Improve the C-API deprecations section - #109751

Merged
hugovk merged 9 commits into
python:mainfrom
AA-Turner:docs/whatsnew/c-api
Sep 25, 2023
Merged

GH-109190: Copyedit 3.12 What's New: Improve the C-API deprecations section#109751
hugovk merged 9 commits into
python:mainfrom
AA-Turner:docs/whatsnew/c-api

Conversation

@AA-Turner

@AA-TurnerAA-Turner commented Sep 22, 2023

Copy link
Copy Markdown
Member
  • 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 threadDoc/whatsnew/3.12.rst
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
Copy Markdown
MemberAuthor

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-TurnerAA-Turner changed the title GH-109190: Move C-API deprecations to the C-API sectionGH-109190: Copyedit 3.12 What's New: Improve the C-API deprecations sectionSep 22, 2023

@vstinnervstinner 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.

LGTM.

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

Comment threadDoc/whatsnew/3.12.rst Outdated
Comment threadDoc/whatsnew/3.12.rst Outdated
Comment threadDoc/whatsnew/3.12.rst Outdated
Comment threadDoc/whatsnew/3.12.rst Outdated
Comment threadDoc/whatsnew/3.12.rst Outdated
Comment threadDoc/whatsnew/3.12.rst Outdated
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Comment threadDoc/whatsnew/3.12.rst
* :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
Copy Markdown
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
Copy Markdown
MemberAuthor

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.

Comment threadDoc/whatsnew/3.12.rst Outdated
@hugovk
hugovk enabled auto-merge (squash) September 25, 2023 12:34
@hugovk
hugovk merged commit bccc1b7 into python:mainSep 25, 2023
@miss-islington

Copy link
Copy Markdown
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
Copy Markdown

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

@bedevere-appbedevere-appBot removed the needs backport to 3.12 only security fixes label Sep 25, 2023
@vstinner

Copy link
Copy Markdown
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
Copy Markdown
MemberAuthor

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 freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docsDocumentation in the Doc dirskip news

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@AA-Turner@miss-islington@vstinner@hugovk@serhiy-storchaka