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-93963: Remove deprecated names from importlib.abc#119720

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
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 24 additions & 10 deletionsDoc/whatsnew/3.14.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -90,7 +90,7 @@ ast
---

Added :func:`ast.compare` for comparing two ASTs.
(Contributed by Batuhan Taskaya and Jeremy Hylton in :issue:`15987`)
(Contributed by Batuhan Taskaya and Jeremy Hylton in :issue:`15987`.)



Expand All@@ -108,6 +108,13 @@ Deprecated
Removed
=======

argparse
--------

* Remove the *type*, *choices*, and *metavar* parameters
of :class:`!argparse.BooleanOptionalAction`.
They were deprecated since 3.12.

ast
---

Expand DownExpand Up@@ -137,27 +144,34 @@ ast

(Contributed by Alex Waygood in :gh:`119562`.)


argparse
--------

* Remove the *type*, *choices*, and *metavar* parameters
of :class:`!argparse.BooleanOptionalAction`.
They were deprecated since 3.12.

collections.abc
---------------

* Remove :class:`!collections.abc.ByteString`. It had previously raised a
:exc:`DeprecationWarning` since Python 3.12.


email
-----

* Remove the *isdst* parameter from :func:`email.utils.localtime`.
(Contributed by Hugo van Kemenade in :gh:`118798`.)

importlib
---------

* Remove deprecated :mod:`importlib.abc` classes:

* :class:`!importlib.abc.ResourceReader`
* :class:`!importlib.abc.Traversable`
* :class:`!importlib.abc.TraversableResources`

Use :mod:`importlib.resources.abc` classes instead:

* :class:`importlib.resources.abc.Traversable`
* :class:`importlib.resources.abc.TraversableResources`

(Contributed by Jason R. Coombs and Hugo van Kemenade in :gh:`93963`.)

itertools
---------

Expand Down
15 changes: 0 additions & 15 deletionsLib/importlib/abc.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -15,8 +15,6 @@
import abc
import warnings

from .resources import abc as _resources_abc


__all__ = [
'Loader', 'MetaPathFinder', 'PathEntryFinder',
Expand All@@ -25,19 +23,6 @@
]


def __getattr__(name):
"""
For backwards compatibility, continue to make names
from _resources_abc available through this module. #93963
"""
if name in _resources_abc.__all__:
obj = getattr(_resources_abc, name)
warnings._deprecated(f"{__name__}.{name}", remove=(3, 14))
globals()[name] = obj
return obj
raise AttributeError(f'module {__name__!r} has no attribute {name!r}')


def _register(abstract_cls, *classes):
for cls in classes:
abstract_cls.register(cls)
Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
Remove deprecated names from ``importlib.abc`` as found in
``importlib.resources.abc``.

[8]ページ先頭

©2009-2025 Movatter.jp