]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.12] gh-105430: Remove `typing._Immutable` unused internal helper (GH-105434) ...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Wed, 7 Jun 2023 14:30:39 +0000 (07:30 -0700)
committerGitHub <noreply@github.com>
Wed, 7 Jun 2023 14:30:39 +0000 (14:30 +0000)
gh-105430: Remove `typing._Immutable` unused internal helper (GH-105434)
(cherry picked from commit 18309ad94bb1ae0b092f34dc3fd54199876a6ebd)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Lib/typing.py

index 3dda940b07accbb7abead4fa62187aea854b202a..0983f20f9b276ffca8da4057fc4db913bbdb2897 100644 (file)
@@ -425,17 +425,6 @@ class _Final:
         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.