gh-140808: Remove __class_getitem__ from mailbox._ProxyFile (#140838)
Co-authored-by: Emma Smith <emma@emmatyping.dev>
This commit is contained in:
@@ -2090,8 +2090,6 @@ class _ProxyFile:
|
|||||||
return False
|
return False
|
||||||
return self._file.closed
|
return self._file.closed
|
||||||
|
|
||||||
__class_getitem__ = classmethod(GenericAlias)
|
|
||||||
|
|
||||||
|
|
||||||
class _PartialFile(_ProxyFile):
|
class _PartialFile(_ProxyFile):
|
||||||
"""A read-only wrapper of part of a file."""
|
"""A read-only wrapper of part of a file."""
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ from dataclasses import Field
|
|||||||
from functools import partial, partialmethod, cached_property
|
from functools import partial, partialmethod, cached_property
|
||||||
from graphlib import TopologicalSorter
|
from graphlib import TopologicalSorter
|
||||||
from logging import LoggerAdapter, StreamHandler
|
from logging import LoggerAdapter, StreamHandler
|
||||||
from mailbox import Mailbox, _PartialFile
|
from mailbox import Mailbox
|
||||||
try:
|
try:
|
||||||
import ctypes
|
import ctypes
|
||||||
except ImportError:
|
except ImportError:
|
||||||
@@ -117,7 +117,7 @@ class BaseTest(unittest.TestCase):
|
|||||||
Iterable, Iterator,
|
Iterable, Iterator,
|
||||||
Reversible,
|
Reversible,
|
||||||
Container, Collection,
|
Container, Collection,
|
||||||
Mailbox, _PartialFile,
|
Mailbox,
|
||||||
ContextVar, Token,
|
ContextVar, Token,
|
||||||
Field,
|
Field,
|
||||||
Set, MutableSet,
|
Set, MutableSet,
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
The internal class ``mailbox._ProxyFile`` is no longer a parameterized generic.
|
||||||
Reference in New Issue
Block a user