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

Commit0751511

Browse files
hugovkjaraco
andauthored
gh-93963: Remove deprecated names from importlib.abc (#119720)
Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
1 parentc8b45a3 commit0751511

File tree

3 files changed

+26
-25
lines changed

3 files changed

+26
-25
lines changed

‎Doc/whatsnew/3.14.rst

Lines changed: 24 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ ast
9090
---
9191

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

9595

9696

@@ -108,6 +108,13 @@ Deprecated
108108
Removed
109109
=======
110110

111+
argparse
112+
--------
113+
114+
* Remove the *type*, *choices*, and *metavar* parameters
115+
of:class:`!argparse.BooleanOptionalAction`.
116+
They were deprecated since 3.12.
117+
111118
ast
112119
---
113120

@@ -137,27 +144,34 @@ ast
137144

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

140-
141-
argparse
142-
--------
143-
144-
* Remove the *type*, *choices*, and *metavar* parameters
145-
of:class:`!argparse.BooleanOptionalAction`.
146-
They were deprecated since 3.12.
147-
148147
collections.abc
149148
---------------
150149

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

154-
155153
email
156154
-----
157155

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

159+
importlib
160+
---------
161+
162+
* Remove deprecated:mod:`importlib.abc` classes:
163+
164+
*:class:`!importlib.abc.ResourceReader`
165+
*:class:`!importlib.abc.Traversable`
166+
*:class:`!importlib.abc.TraversableResources`
167+
168+
Use:mod:`importlib.resources.abc` classes instead:
169+
170+
*:class:`importlib.resources.abc.Traversable`
171+
*:class:`importlib.resources.abc.TraversableResources`
172+
173+
(Contributed by Jason R. Coombs and Hugo van Kemenade in:gh:`93963`.)
174+
161175
itertools
162176
---------
163177

‎Lib/importlib/abc.py

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@
1515
importabc
1616
importwarnings
1717

18-
from .resourcesimportabcas_resources_abc
19-
2018

2119
__all__= [
2220
'Loader','MetaPathFinder','PathEntryFinder',
@@ -25,19 +23,6 @@
2523
]
2624

2725

28-
def__getattr__(name):
29-
"""
30-
For backwards compatibility, continue to make names
31-
from _resources_abc available through this module. #93963
32-
"""
33-
ifnamein_resources_abc.__all__:
34-
obj=getattr(_resources_abc,name)
35-
warnings._deprecated(f"{__name__}.{name}",remove=(3,14))
36-
globals()[name]=obj
37-
returnobj
38-
raiseAttributeError(f'module{__name__!r} has no attribute{name!r}')
39-
40-
4126
def_register(abstract_cls,*classes):
4227
forclsinclasses:
4328
abstract_cls.register(cls)
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Remove deprecated names from ``importlib.abc`` as found in
2+
``importlib.resources.abc``.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp