[Python-checkins] gh-105430: Remove `typing._Immutable` unused internal helper (#105434)
JelleZijlstra
webhook-mailer at python.org
Wed Jun 7 09:43:08 EDT 2023
https://github.com/python/cpython/commit/18309ad94bb1ae0b092f34dc3fd54199876a6ebd
commit: 18309ad94bb1ae0b092f34dc3fd54199876a6ebd
branch: main
author: Nikita Sobolev <mail at sobolevn.me>
committer: JelleZijlstra <jelle.zijlstra at gmail.com>
date: 2023-06-07T06:43:00-07:00
summary:
gh-105430: Remove `typing._Immutable` unused internal helper (#105434)
files:
M Lib/typing.py
diff --git a/Lib/typing.py b/Lib/typing.py
index b6c8d8a4febd..307b26f30da8 100644
--- a/Lib/typing.py
+++ b/Lib/typing.py
@@ -419,17 +419,6 @@ def __init_subclass__(cls, /, *args, **kwds):
if '_root' not in kwds:
raise TypeError("Cannot subclass special typing classes")
-class _Immutable:
- """Mixin to indicate that object should not be copied."""
-
- __slots__ = ()
-
- def __copy__(self):
- return self
-
- def __deepcopy__(self, memo):
- return self
-
class _NotIterable:
"""Mixin to prevent iteration, without being compatible with Iterable.
More information about the Python-checkins
mailing list