Skip to content

typing._Immutable is not used anymore #105430

Closed
@sobolevn

Description

@sobolevn

class _Immutable

cpython/Lib/typing.py

Lines 422 to 431 in 27c68a6

class _Immutable:
"""Mixin to indicate that object should not be copied."""
__slots__ = ()
def __copy__(self):
return self
def __deepcopy__(self, memo):
return self
after https://github.com/python/cpython/pull/103764/files#diff-ddb987fca5f5df0c9a2f5521ed687919d70bb3d64eaeb8021f98833a2a716887L969 is not used.

» ag _Immutable
Lib/typing.py
419:class _Immutable:
                  

Shall I remove it? I think that we don't provide any promises about typing.py internals.

Linked PRs

Metadata

Metadata

Assignees

Labels

stdlibPython modules in the Lib dirtopic-typingtype-bugAn unexpected behavior, bug, or error

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions