gh-140808: Remove __class_getitem__ from mailbox._ProxyFile (#140838)

Co-authored-by: Emma Smith <emma@emmatyping.dev>
This commit is contained in:
Sebastian Rittau 2025-11-02 22:56:59 +01:00 committed by GitHub
parent 6d45cd8dbb
commit 9e5628ad68
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 3 additions and 4 deletions

View file

@ -2090,8 +2090,6 @@ def closed(self):
return False
return self._file.closed
__class_getitem__ = classmethod(GenericAlias)
class _PartialFile(_ProxyFile):
"""A read-only wrapper of part of a file."""

View file

@ -17,7 +17,7 @@
from functools import partial, partialmethod, cached_property
from graphlib import TopologicalSorter
from logging import LoggerAdapter, StreamHandler
from mailbox import Mailbox, _PartialFile
from mailbox import Mailbox
try:
import ctypes
except ImportError:
@ -117,7 +117,7 @@ class BaseTest(unittest.TestCase):
Iterable, Iterator,
Reversible,
Container, Collection,
Mailbox, _PartialFile,
Mailbox,
ContextVar, Token,
Field,
Set, MutableSet,

View file

@ -0,0 +1 @@
The internal class ``mailbox._ProxyFile`` is no longer a parameterized generic.