Skip to content

Commit

Permalink
pythongh-93963: Document importlib.abc deprecations
Browse files Browse the repository at this point in the history
  • Loading branch information
hugovk committed Jul 4, 2022
1 parent a391b74 commit f171aa2
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Doc/library/importlib.resources.abc.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@

.. versionadded:: 3.7

.. deprecated-removed:: 3.12 3.14
Use :class:`importlib.resources.abc.TraversableResources` instead.

.. abstractmethod:: open_resource(resource)

Returns an opened, :term:`file-like object` for binary reading
Expand Down Expand Up @@ -324,6 +327,9 @@

.. versionadded:: 3.9

.. deprecated-removed:: 3.12 3.14
Use :class:`importlib.resources.abc.Traversable` instead.

.. attribute:: name

Abstract. The base name of this object without any parent references.
Expand Down Expand Up @@ -379,6 +385,9 @@

.. versionadded:: 3.9

.. deprecated-removed:: 3.12 3.14
Use :class:`importlib.resources.abc.TraversableResources` instead.

.. abstractmethod:: files()

Returns a :class:`importlib.abc.Traversable` object for the loaded
Expand Down
18 changes: 18 additions & 0 deletions Doc/whatsnew/3.12.rst
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,24 @@ APIs:
* :func:`unittest.getTestCaseNames` (:gh:`50096`)
* :class:`webbrowser.MacOSX` (:gh:`86421`)

Pending Removal in Python 3.14
==============================

* Deprecated the following :mod:`importlib.abc` classes, scheduled for removal in
Python 3.14:

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

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

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

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

Pending Removal in Future Versions
==================================

Expand Down

0 comments on commit f171aa2

Please sign in to comment.