mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-07-10 18:36:31 +08:00
[stdlib] Copy-edit deprecation messages (#14614)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
This commit is contained in:
@@ -40,7 +40,7 @@ if sys.version_info < (3, 12):
|
||||
@deprecated("Deprecated since Python 3.3; removed in Python 3.12. Use `MetaPathFinder` or `PathEntryFinder` instead.")
|
||||
class Finder(metaclass=ABCMeta): ...
|
||||
|
||||
@deprecated("Deprecated as of Python 3.7: Use importlib.resources.abc.TraversableResources instead.")
|
||||
@deprecated("Deprecated since Python 3.7. Use `importlib.resources.abc.TraversableResources` instead.")
|
||||
class ResourceLoader(Loader):
|
||||
@abstractmethod
|
||||
def get_data(self, path: str) -> bytes: ...
|
||||
@@ -61,7 +61,7 @@ class ExecutionLoader(InspectLoader):
|
||||
def get_filename(self, fullname: str) -> str: ...
|
||||
|
||||
class SourceLoader(_bootstrap_external.SourceLoader, ResourceLoader, ExecutionLoader, metaclass=ABCMeta): # type: ignore[misc] # incompatible definitions of source_to_code in the base classes
|
||||
@deprecated("Deprecated as of Python 3.3: Use importlib.resources.abc.SourceLoader.path_stats instead.")
|
||||
@deprecated("Deprecated since Python 3.3. Use `importlib.resources.abc.SourceLoader.path_stats` instead.")
|
||||
def path_mtime(self, path: str) -> float: ...
|
||||
def set_data(self, path: str, data: bytes) -> None: ...
|
||||
def get_source(self, fullname: str) -> str | None: ...
|
||||
|
||||
Reference in New Issue
Block a user