mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-05-06 21:43:59 +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:
+12
-4
@@ -27,8 +27,14 @@ class zipimporter(_LoaderBasics):
|
||||
def __init__(self, path: StrOrBytesPath) -> None: ...
|
||||
|
||||
if sys.version_info < (3, 12):
|
||||
def find_loader(self, fullname: str, path: str | None = None) -> tuple[zipimporter | None, list[str]]: ... # undocumented
|
||||
def find_module(self, fullname: str, path: str | None = None) -> zipimporter | None: ...
|
||||
if sys.version_info >= (3, 10):
|
||||
@deprecated("Deprecated since Python 3.10; removed in Python 3.12. Use `find_spec()` instead.")
|
||||
def find_loader(self, fullname: str, path: str | None = None) -> tuple[zipimporter | None, list[str]]: ...
|
||||
@deprecated("Deprecated since Python 3.10; removed in Python 3.12. Use `find_spec()` instead.")
|
||||
def find_module(self, fullname: str, path: str | None = None) -> zipimporter | None: ...
|
||||
else:
|
||||
def find_loader(self, fullname: str, path: str | None = None) -> tuple[zipimporter | None, list[str]]: ...
|
||||
def find_module(self, fullname: str, path: str | None = None) -> zipimporter | None: ...
|
||||
|
||||
def get_code(self, fullname: str) -> CodeType: ...
|
||||
def get_data(self, pathname: str) -> bytes: ...
|
||||
@@ -42,10 +48,12 @@ class zipimporter(_LoaderBasics):
|
||||
|
||||
def get_source(self, fullname: str) -> str | None: ...
|
||||
def is_package(self, fullname: str) -> bool: ...
|
||||
@deprecated("Deprecated since 3.10; use exec_module() instead")
|
||||
def load_module(self, fullname: str) -> ModuleType: ...
|
||||
if sys.version_info >= (3, 10):
|
||||
@deprecated("Deprecated since Python 3.10; removed in Python 3.15. Use `exec_module()` instead.")
|
||||
def load_module(self, fullname: str) -> ModuleType: ...
|
||||
def exec_module(self, module: ModuleType) -> None: ...
|
||||
def create_module(self, spec: ModuleSpec) -> None: ...
|
||||
def find_spec(self, fullname: str, target: ModuleType | None = None) -> ModuleSpec | None: ...
|
||||
def invalidate_caches(self) -> None: ...
|
||||
else:
|
||||
def load_module(self, fullname: str) -> ModuleType: ...
|
||||
|
||||
Reference in New Issue
Block a user