diff options
author | Julian Berman <Julian@GrayVines.com> | 2015-03-15 18:12:08 -0400 |
---|---|---|
committer | Julian Berman <Julian@GrayVines.com> | 2015-03-15 18:12:08 -0400 |
commit | fec46472808c09032d066d97ca66f15e01fe0634 (patch) | |
tree | 91da5280a8401a62bdfce0098bcc20968b1b1c4f | |
parent | 10ea4fa104d4b33bf60078acf06629c92ade2372 (diff) | |
parent | 7241db0d5e0be9a43acde2743f68a5182b3f97ed (diff) | |
download | jsonschema-fec46472808c09032d066d97ca66f15e01fe0634.tar.gz |
Merge remote-tracking branch 'dnephin/perf_cache_resolving' into perf_cache_resolving
* dnephin/perf_cache_resolving:
Fix base_uri backwards compatibility.
-rw-r--r-- | jsonschema/validators.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/jsonschema/validators.py b/jsonschema/validators.py index 64d70ce..f280be5 100644 --- a/jsonschema/validators.py +++ b/jsonschema/validators.py @@ -288,6 +288,11 @@ class RefResolver(object): def resolution_scope(self): return self._scopes_stack[-1] + @property + def base_uri(self): + uri, _ = urldefrag(self.resolution_scope) + return uri + # Deprecated, this function is no longer used, but is preserved for # backwards compatibility @contextlib.contextmanager |