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

Appearance settings

Commit e8e4b55

Browse filesBrowse files
authored
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.
1 parent ef61b25 commit e8e4b55
Copy full SHA for e8e4b55

File tree

Expand file treeCollapse file tree

2 files changed

+10
-0
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+10
-0
lines changed

‎Doc/library/typing.rst

Copy file name to clipboardExpand all lines: Doc/library/typing.rst
+9Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2215,6 +2215,9 @@ Corresponding to other types in :mod:`collections.abc`
22152215

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

2218+
.. deprecated:: 3.12
2219+
Use :class:`collections.abc.Hashable` directly instead.
2220+
22182221
.. class:: Reversible(Iterable[T_co])
22192222

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

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

2233+
.. deprecated:: 3.12
2234+
Use :class:`collections.abc.Sized` directly instead.
2235+
22302236
Asynchronous programming
22312237
""""""""""""""""""""""""
22322238

@@ -2849,3 +2855,6 @@ convenience. This is subject to change, and not all deprecations are listed.
28492855
+----------------------------------+---------------+-------------------+----------------+
28502856
| ``typing.Text`` | 3.11 | Undecided | :gh:`92332` |
28512857
+----------------------------------+---------------+-------------------+----------------+
2858+
| ``typing.Hashable`` and | 3.12 | Undecided | :gh:`94309` |
2859+
| ``typing.Sized`` | | | |
2860+
+----------------------------------+---------------+-------------------+----------------+
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Deprecate aliases :class:`typing.Hashable` and :class:`typing.Sized`

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.