Skip to content

gh-94309: Deprecate typing.Hashable/Sized #94626

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

Merged
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions Doc/library/typing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2215,6 +2215,9 @@ Corresponding to other types in :mod:`collections.abc`

An alias to :class:`collections.abc.Hashable`.

.. deprecated:: 3.12
Use :class:`collections.abc.Hashable` directly instead.

.. class:: Reversible(Iterable[T_co])

A generic version of :class:`collections.abc.Reversible`.
Expand All @@ -2227,6 +2230,9 @@ Corresponding to other types in :mod:`collections.abc`

An alias to :class:`collections.abc.Sized`.

.. deprecated:: 3.12
Use :class:`collections.abc.Sized` directly instead.

Asynchronous programming
""""""""""""""""""""""""

Expand Down Expand Up @@ -2849,3 +2855,6 @@ convenience. This is subject to change, and not all deprecations are listed.
+----------------------------------+---------------+-------------------+----------------+
| ``typing.Text`` | 3.11 | Undecided | :gh:`92332` |
+----------------------------------+---------------+-------------------+----------------+
| ``typing.Hashable`` and | 3.12 | Undecided | :gh:`94309` |
| ``typing.Sized`` | | | |
+----------------------------------+---------------+-------------------+----------------+
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Deprecate aliases :class:`typing.Hashable` and :class:`typing.Sized`