mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-05-06 21:43:59 +08:00
[importlib] Deprecate ResourceReader (#15229)
This commit is contained in:
@@ -4,8 +4,10 @@ from abc import ABCMeta, abstractmethod
|
||||
from collections.abc import Iterator
|
||||
from io import BufferedReader
|
||||
from typing import IO, Any, Literal, Protocol, overload, runtime_checkable
|
||||
from typing_extensions import deprecated
|
||||
|
||||
if sys.version_info >= (3, 11):
|
||||
@deprecated("Deprecated since Python 3.12. Use `importlib.resources.abc.TraversableResources` instead.")
|
||||
class ResourceReader(metaclass=ABCMeta):
|
||||
@abstractmethod
|
||||
def open_resource(self, resource: str) -> IO[bytes]: ...
|
||||
|
||||
Reference in New Issue
Block a user