Add zipimporter.find_spec() and zipimporter.invalidate_caches() (#6446)

Co-authored-by: Akuli <akuviljanen17@gmail.com>
This commit is contained in:
Alex Waygood
2021-11-29 14:52:20 +00:00
committed by GitHub
parent aee90a0e82
commit 521dd430c6

View File

@@ -1,5 +1,6 @@
import os
import sys
from importlib.machinery import ModuleSpec
from types import CodeType, ModuleType
from typing import Any
@@ -22,3 +23,6 @@ class zipimporter(object):
def get_source(self, fullname: str) -> str | None: ...
def is_package(self, fullname: str) -> bool: ...
def load_module(self, fullname: str) -> ModuleType: ...
if sys.version_info >= (3, 10):
def find_spec(self, fullname: str, target: ModuleType | None = ...) -> ModuleSpec | None: ...
def invalidate_caches(self) -> None: ...