Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

GH-109190: Copyedit 3.12 What's New: Deprecations#109766

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
hugovk merged 4 commits intopython:mainfromAA-Turner:docs/whatsnew/deprecations
Sep 26, 2023

Conversation

AA-Turner
Copy link
Member

@AA-TurnerAA-Turner commentedSep 22, 2023
edited by hugovk
Loading

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


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

@AA-TurnerAA-Turner added the needs backport to 3.12only security fixes labelSep 22, 2023
@bedevere-appbedevere-appbot added awaiting review docsDocumentation in the Doc dir skip news labelsSep 22, 2023
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.
Copy link
MemberAuthor

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

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`.)
Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Copied fromPending Removal

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`.)
Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Copied fromPending Removal

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`.)
Copy link
MemberAuthor

Choose a reason for hiding this comment

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

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

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`.)

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Copied fromPending Removal

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

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 sayingthrow(),throw(), andathrow()

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`.)
Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Rephrased fromPending Removal

@@ -1116,9 +1200,14 @@ Deprecated
* The bitwise inversion operator (``~``) on bool is deprecated. It will throw an
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
Copy link
MemberAuthor

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"

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`.)
Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Rephrased fromPending Removal

Comment on lines +1259 to +1260
The following APIs have been deprecated
and will be removed in Python 3.14.
Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Adapted from thePending Removal in Python 3.13 summary

Copy link
Member

@hugovkhugovk left a 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

@AA-Turner
Copy link
MemberAuthor

shall we fix them here too?

Might as well; pushed a commit.

A

hugovk reacted with thumbs up emoji

@hugovkhugovk merged commit87ddfa7 intopython:mainSep 26, 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 requestSep 26, 2023
)(cherry picked from commit87ddfa7)Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
@bedevere-app
Copy link

GH-109925 is a backport of this pull request to the3.12 branch.

@bedevere-appbedevere-appbot removed the needs backport to 3.12only security fixes labelSep 26, 2023
Yhg1s pushed a commit that referenced this pull requestSep 27, 2023
…109925)*GH-109190: Copyedit 3.12 What's New: Deprecations (GH-109766)(cherry picked from commit87ddfa7)Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>*GH-109190: Copyedit 3.12 What's New: Deprecations (``os`` fix)  (#109927)Merge the two ``os`` entries(cherry picked from commit0e28d0f)---------Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
csm10495 pushed a commit to csm10495/cpython that referenced this pull requestSep 28, 2023
@AA-TurnerAA-Turner deleted the docs/whatsnew/deprecations branchSeptember 29, 2023 08:16
Glyphack pushed a commit to Glyphack/cpython that referenced this pull requestSep 2, 2024
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@hugovkhugovkhugovk approved these changes

@ambvambvAwaiting requested review from ambv

Assignees
No one assigned
Labels
docsDocumentation in the Doc dirskip news
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@AA-Turner@miss-islington@hugovk

[8]ページ先頭

©2009-2025 Movatter.jp