mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-06-24 09:48:39 +08:00
[stdlib] Deprecate old functions (#14553)
* [stdlib] Deprecate many functions * Fix typo * Imporove message for asyncio/trsock * Apply suggestions from code review Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com> * Add Python before version * [pre-commit.ci] auto fixes from pre-commit.com hooks * Wrap comment lines * fix the rest --------- Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
+10
-4
@@ -30,17 +30,23 @@ class ModuleInfo(NamedTuple):
|
||||
def extend_path(path: _PathT, name: str) -> _PathT: ...
|
||||
|
||||
if sys.version_info < (3, 12):
|
||||
@deprecated("Deprecated since Python 3.3; removed in Python 3.12. Use the `importlib` module instead.")
|
||||
class ImpImporter:
|
||||
def __init__(self, path: StrOrBytesPath | None = None) -> None: ...
|
||||
|
||||
@deprecated("Deprecated since Python 3.3; removed in Python 3.12. Use the `importlib` module instead.")
|
||||
class ImpLoader:
|
||||
def __init__(self, fullname: str, file: IO[str], filename: StrOrBytesPath, etc: tuple[str, str, int]) -> None: ...
|
||||
|
||||
if sys.version_info < (3, 14):
|
||||
@deprecated("Use importlib.util.find_spec() instead. Will be removed in Python 3.14.")
|
||||
def find_loader(fullname: str) -> LoaderProtocol | None: ...
|
||||
@deprecated("Use importlib.util.find_spec() instead. Will be removed in Python 3.14.")
|
||||
def get_loader(module_or_name: str) -> LoaderProtocol | None: ...
|
||||
if sys.version_info >= (3, 12):
|
||||
@deprecated("Deprecated since Python 3.12; removed in Python 3.14. Use `importlib.util.find_spec()` instead.")
|
||||
def find_loader(fullname: str) -> LoaderProtocol | None: ...
|
||||
@deprecated("Deprecated since Python 3.12; removed in Python 3.14. Use `importlib.util.find_spec()` instead.")
|
||||
def get_loader(module_or_name: str) -> LoaderProtocol | None: ...
|
||||
else:
|
||||
def find_loader(fullname: str) -> LoaderProtocol | None: ...
|
||||
def get_loader(module_or_name: str) -> LoaderProtocol | None: ...
|
||||
|
||||
def get_importer(path_item: StrOrBytesPath) -> PathEntryFinderProtocol | None: ...
|
||||
def iter_importers(fullname: str = "") -> Iterator[MetaPathFinderProtocol | PathEntryFinderProtocol]: ...
|
||||
|
||||
Reference in New Issue
Block a user