feat(order_utils.py): schema resolver cache (#1317)
* Implemented basic functionality for using cache layer of LocalRefResolver * Use `importlib` instead of `imp`, since it's been deprecated. Legacy `load_module()` reloads modules even if they are already imported, causing tests to fail when run in non-deterministic ordering, so we replace it with `import_module()`
This commit is contained in:
committed by
F. Eugene Aumson
parent
fc3641b499
commit
a1d4aa66bc
@@ -1,5 +1,11 @@
|
||||
from typing import Any, Dict
|
||||
from typing import Any, Dict, Tuple
|
||||
|
||||
class RefResolver: pass
|
||||
|
||||
class RefResolver:
|
||||
def resolve(self, url: str) -> Tuple[str, Dict]:
|
||||
...
|
||||
|
||||
|
||||
class ValidationError(Exception): pass
|
||||
|
||||
def validate(instance: Any, schema: Dict, cls=None, *args, **kwargs) -> None: pass
|
||||
|
Reference in New Issue
Block a user