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-109190: Copyedit 3.12 What's New: Deprecations by AA-Turner · Pull Request #109766 · python/cpython

Conversation

@AA-Turner

@AA-Turner AA-Turner commented Sep 22, 2023 •
edited by hugovk
Loading

Uh oh!

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

Copy link
Copy Markdown
Member

Sorry in advance for the large PR.

The main change here is ensuring that every deprecated API is listed under the "Deprecated" section. Previously, some deprecations were only listed under "Deprecated", some were listed under the "Pending Removal in Python 3.14" subheading, and some were listed under both. This was a confusing state of affairs, and unhelpful to readers. From this PR, the "Pending Removal in Python 3.14" section becomes a short list of APIs pending removal, reflecting the layout of the similar "3.13" and "Future Versions" sections.

A

  • Issue: What's New in Python 3.12 (copyediting) #109190

📚 Documentation preview 📚: https://cpython-previews--109766.org.readthedocs.build/en/109766/whatsnew/3.12.html#deprecated

Sorry, something went wrong.

Uh oh!

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

All reactions
@AA-Turner
Deprecations
6eee117
@AA-Turner AA-Turner added the needs backport to 3.12 only security fixes label Sep 22, 2023
@AA-Turner
AA-Turner requested review from ambv and hugovk September 22, 2023 23:04
@bedevere-app bedevere-app Bot added awaiting review docs Documentation in the Doc dir skip news labels Sep 22, 2023
@bedevere-app bedevere-app Bot mentioned this pull request Sep 22, 2023
What's New in Python 3.12 (copyediting) #109190
Closed
AA-Turner
AA-Turner commented Sep 22, 2023
View reviewed changes
Comment thread Doc/whatsnew/3.12.rst
Comment on lines -579 to -595
* The child watcher classes :class:`asyncio.MultiLoopChildWatcher`,
:class:`asyncio.FastChildWatcher`, :class:`asyncio.AbstractChildWatcher`
and :class:`asyncio.SafeChildWatcher` are deprecated and
will be removed in Python 3.14. It is recommended to not manually
configure a child watcher as the event loop now uses the best available
child watcher for each platform (:class:`asyncio.PidfdChildWatcher`
if supported and :class:`asyncio.ThreadedChildWatcher` otherwise).
(Contributed by Kumar Aditya in :gh:`94597`.)

* :func:`asyncio.set_child_watcher`, :func:`asyncio.get_child_watcher`,
:meth:`asyncio.AbstractEventLoopPolicy.set_child_watcher` and
:meth:`asyncio.AbstractEventLoopPolicy.get_child_watcher` are deprecated
and will be removed in Python 3.14.

@AA-Turner AA-Turner Sep 22, 2023

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.

asyncio had two deprecations noted in "Improved Modules", these have been moved

Sorry, something went wrong.

Uh oh!

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

All reactions
Comment thread Doc/whatsnew/3.12.rst
Comment on lines +1036 to +1039
* :mod:`argparse`: The *type*, *choices*, and *metavar* parameters
of :class:`!argparse.BooleanOptionalAction` are deprecated
and will be removed in 3.14.
(Contributed by Nikita Sobolev in :gh:`92248`.)

@AA-Turner AA-Turner Sep 22, 2023

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.

Copied from Pending Removal

Sorry, something went wrong.

Uh oh!

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

All reactions
Comment thread Doc/whatsnew/3.12.rst
Comment on lines +1041 to +1052
* :mod:`ast`: The following :mod:`ast` features have been deprecated in documentation since
Python 3.8, now cause a :exc:`DeprecationWarning` to be emitted at runtime
when they are accessed or used, and will be removed in Python 3.14:

* :class:`!ast.Num`
* :class:`!ast.Str`
* :class:`!ast.Bytes`
* :class:`!ast.NameConstant`
* :class:`!ast.Ellipsis`

Use :class:`ast.Constant` instead.
(Contributed by Serhiy Storchaka in :gh:`90953`.)

@AA-Turner AA-Turner Sep 22, 2023

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.

Copied from Pending Removal

Sorry, something went wrong.

Uh oh!

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

All reactions
Comment thread Doc/whatsnew/3.12.rst
Comment on lines +1054 to +1071
* :mod:`asyncio`:

* The child watcher classes :class:`asyncio.MultiLoopChildWatcher`,
:class:`asyncio.FastChildWatcher`, :class:`asyncio.AbstractChildWatcher`
and :class:`asyncio.SafeChildWatcher` are deprecated and
will be removed in Python 3.14.
(Contributed by Kumar Aditya in :gh:`94597`.)

* :func:`asyncio.set_child_watcher`, :func:`asyncio.get_child_watcher`,
:meth:`asyncio.AbstractEventLoopPolicy.set_child_watcher` and
:meth:`asyncio.AbstractEventLoopPolicy.get_child_watcher` are deprecated
and will be removed in Python 3.14.
(Contributed by Kumar Aditya in :gh:`94597`.)

* The :meth:`~asyncio.get_event_loop` method of the
default event loop policy now emits a :exc:`DeprecationWarning` if there
is no current event loop set and it decides to create one.
(Contributed by Serhiy Storchaka and Guido van Rossum in :gh:`100160`.)

@AA-Turner AA-Turner Sep 22, 2023

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.

(1) and (2) copied from Improved Modules, (3) copied from Pending Removal. Note that I've deleted the entry for asyncio.Future.cancel & asyncio.Task.cancel as it was reverted in #97999

Sorry, something went wrong.

Uh oh!

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

All reactions
Comment thread Doc/whatsnew/3.12.rst
Comment on lines +1077 to +1081
* :mod:`collections.abc`: Deprecated :class:`collections.abc.ByteString`.
Prefer :class:`Sequence` or :class:`collections.abc.Buffer`.
For use in typing, prefer a union, like ``bytes | bytearray``, or :class:`collections.abc.Buffer`.
(Contributed by Shantanu Jain in :gh:`91896`.)

@AA-Turner AA-Turner Sep 22, 2023

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.

Copied from Pending Removal

Sorry, something went wrong.

Uh oh!

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

All reactions
Comment thread Doc/whatsnew/3.12.rst
Comment on lines +1180 to +1182
* The 3-arg signatures (type, value, traceback) of :meth:`coroutine throw()
<coroutine.throw>`, :meth:`generator throw() <generator.throw>` and
:meth:`async generator throw() <agen.athrow>` are deprecated and

@AA-Turner AA-Turner Sep 22, 2023

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.

Added explicit titles to avoid the text saying throw(), throw(), and athrow()

Sorry, something went wrong.

Uh oh!

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

All reactions
Comment thread Doc/whatsnew/3.12.rst
Comment on lines +1191 to +1193
* Setting ``__package__`` or ``__cached__`` on a module is deprecated,
and will cease to be set or taken into consideration by the import system in Python 3.14.
(Contributed by Brett Cannon in :gh:`65961`.)

@AA-Turner AA-Turner Sep 22, 2023

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.

Rephrased from Pending Removal

Sorry, something went wrong.

Uh oh!

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

All reactions
Comment thread Doc/whatsnew/3.12.rst
error in Python 3.14. Use ``not`` for logical negation of bools instead.
In the rare case that you really need the bitwise inversion of the underlying
``int``, convert to int explicitly with ``~int(x)``. (Contributed by Tim Hoffmann
``int``, convert to int explicitly: ``~int(x)``. (Contributed by Tim Hoffmann

@AA-Turner AA-Turner Sep 22, 2023

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.

style -- this is both the conversion and inversion, so don't say "with"

Sorry, something went wrong.

Uh oh!

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

All reactions
Comment thread Doc/whatsnew/3.12.rst
Comment on lines +1206 to +1209
* Accessing ``co_lnotab`` on code objects was deprecated in Python 3.10 via :pep:`626`,
but it only got a proper :exc:`DeprecationWarning` in 3.12,
therefore it will be removed in 3.14.
(Contributed by Nikita Sobolev in :gh:`101866`.)

@AA-Turner AA-Turner Sep 22, 2023

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.

Rephrased from Pending Removal

Sorry, something went wrong.

Uh oh!

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

All reactions
Comment thread Doc/whatsnew/3.12.rst
Comment on lines +1259 to +1260
The following APIs have been deprecated
and will be removed in Python 3.14.

@AA-Turner AA-Turner Sep 22, 2023

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.

Adapted from the Pending Removal in Python 3.13 summary

Sorry, something went wrong.

Uh oh!

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

All reactions
@AA-Turner AA-Turner mentioned this pull request Sep 23, 2023
gh-100228: Document the os.fork threads DeprecationWarning. #109767
Merged
AA-Turner added 2 commits September 25, 2023 07:43
@AA-Turner
Merge branch 'main' into docs/whatsnew/deprecations
2118b1c
# Conflicts:
#	Doc/whatsnew/3.12.rst
@AA-Turner
Merge branch 'main' into docs/whatsnew/deprecations
d9f209c
# Conflicts:
#	Doc/whatsnew/3.12.rst
hugovk
hugovk approved these changes Sep 26, 2023
View reviewed changes

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

Thanks, looks good.

It wasn't modified in this PR, but the sqlite3 bullets are overindented (compare typing), shall we fix them here too?

image

Sorry, something went wrong.

Uh oh!

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

All reactions
@bedevere-app bedevere-app Bot added awaiting core review and removed awaiting review labels Sep 26, 2023
@AA-Turner
Dedent
d8de59a
@AA-Turner

AA-Turner commented Sep 26, 2023

Copy link
Copy Markdown
Member Author

shall we fix them here too?

Might as well; pushed a commit.

A

hugovk reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

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

@hugovk
hugovk merged commit 87ddfa7 into python:main Sep 26, 2023
@miss-islington

miss-islington commented Sep 26, 2023

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.
🐍🍒⛏🤖

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 core review label Sep 26, 2023
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Sep 26, 2023
@AA-Turner @miss-islington
pythonGH-109190: Copyedit 3.12 What's New: Deprecations (pythonGH-109766
fedcbe1
)

(cherry picked from commit 87ddfa7)

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

bedevere-app Bot commented Sep 26, 2023

Copy link
Copy Markdown

GH-109925 is a backport of this pull request to the 3.12 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.12 only security fixes label Sep 26, 2023
@AA-Turner AA-Turner mentioned this pull request Sep 26, 2023
GH-109190: Copyedit 3.12 What's New: Deprecations (os fix) #109927
Merged
Yhg1s pushed a commit that referenced this pull request Sep 27, 2023
@miss-islington @AA-Turner
[3.12] GH-109190: Copyedit 3.12 What's New: Deprecations (GH-109766) (#…
1d6ef7e
…109925)

* GH-109190: Copyedit 3.12 What's New: Deprecations (GH-109766)
(cherry picked from commit 87ddfa7)

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

* GH-109190: Copyedit 3.12 What's New: Deprecations (``os`` fix)  (#109927)

Merge the two ``os`` entries

(cherry picked from commit 0e28d0f)

---------

Co-authored-by: Adam Turner <[email protected]>
csm10495 pushed a commit to csm10495/cpython that referenced this pull request Sep 28, 2023
@AA-Turner @csm10495
pythonGH-109190: Copyedit 3.12 What's New: Deprecations (python#109766)
5ca9552
@AA-Turner
AA-Turner deleted the docs/whatsnew/deprecations branch September 29, 2023 08:16
Glyphack pushed a commit to Glyphack/cpython that referenced this pull request Sep 2, 2024
@AA-Turner @Glyphack
pythonGH-109190: Copyedit 3.12 What's New: Deprecations (python#109766)
1cefb21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@hugovk hugovk hugovk approved these changes
@ambv ambv Awaiting requested review from ambv

Uh oh!

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

Assignees

No one assigned

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 @miss-islington @hugovk
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.