Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gh-93963: Document importlib.abc deprecations #94546

Merged
merged 1 commit into from
Jul 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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