Skip to content

Commit 98ccc2d

Browse files
[3.12] gh-105430: Remove typing._Immutable unused internal helper (GH-105434) (#105451)
gh-105430: Remove `typing._Immutable` unused internal helper (GH-105434) (cherry picked from commit 18309ad) Co-authored-by: Nikita Sobolev <[email protected]>
1 parent 241c36e commit 98ccc2d

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

Lib/typing.py

-11
Original file line numberDiff line numberDiff line change
@@ -425,17 +425,6 @@ def __init_subclass__(cls, /, *args, **kwds):
425425
if '_root' not in kwds:
426426
raise TypeError("Cannot subclass special typing classes")
427427

428-
class _Immutable:
429-
"""Mixin to indicate that object should not be copied."""
430-
431-
__slots__ = ()
432-
433-
def __copy__(self):
434-
return self
435-
436-
def __deepcopy__(self, memo):
437-
return self
438-
439428

440429
class _NotIterable:
441430
"""Mixin to prevent iteration, without being compatible with Iterable.

0 commit comments

Comments
 (0)