[Python-checkins] [3.12] gh-105430: Remove `typing._Immutable` unused internal helper (GH-105434) (#105451)
AlexWaygood
webhook-mailer at python.org
Wed Jun 7 10:30:47 EDT 2023
https://github.com/python/cpython/commit/98ccc2de6b71d62388045f4877ee0d2143227a02
commit: 98ccc2de6b71d62388045f4877ee0d2143227a02
branch: 3.12
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: AlexWaygood <Alex.Waygood at Gmail.com>
date: 2023-06-07T14:30:39Z
summary:
[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 <mail at sobolevn.me>
files:
M Lib/typing.py
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 @@ 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