From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Wed, 7 Jun 2023 14:30:39 +0000 (-0700) Subject: [3.12] gh-105430: Remove `typing._Immutable` unused internal helper (GH-105434) ... X-Git-Tag: v3.12.0b3~88 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=98ccc2de6b71d62388045f4877ee0d2143227a02;p=thirdparty%2FPython%2Fcpython.git [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 18309ad94bb1ae0b092f34dc3fd54199876a6ebd) Co-authored-by: Nikita Sobolev --- diff --git a/Lib/typing.py b/Lib/typing.py index 3dda940b07ac..0983f20f9b27 100644 --- a/Lib/typing.py +++ b/Lib/typing.py @@ -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.