[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 18309ad94b)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
This commit is contained in:
Miss Islington (bot) 2023-06-07 07:30:39 -07:00 committed by GitHub
parent 241c36e1dc
commit 98ccc2de6b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View 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.