mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
gh-94309: Deprecate typing.Hashable/Sized (GH-94626)
Deprecate typing.Hashable/Sized. Use the collections.abc counterparts directly instead. To be consistent with PEP 585, deprecated aliases will not raise any DeprecationWarning.
This commit is contained in:
parent
ef61b259e3
commit
e8e4b550f5
2 changed files with 10 additions and 0 deletions
|
@ -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`.
|
||||
|
@ -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
|
||||
""""""""""""""""""""""""
|
||||
|
||||
|
@ -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`` | | | |
|
||||
+----------------------------------+---------------+-------------------+----------------+
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue