summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--jsonschema/_legacy_validators.py3
-rw-r--r--jsonschema/_validators.py3
-rw-r--r--jsonschema/validators.py7
3 files changed, 2 insertions, 11 deletions
diff --git a/jsonschema/_legacy_validators.py b/jsonschema/_legacy_validators.py
index b50b78f..c0bab32 100644
--- a/jsonschema/_legacy_validators.py
+++ b/jsonschema/_legacy_validators.py
@@ -207,10 +207,9 @@ def contains_draft6_draft7(validator, contains, instance, schema):
def recursiveRef(validator, recursiveRef, instance, schema):
- scope_stack = validator.resolver.scopes_stack_copy
lookup_url, target = validator.resolver.resolution_scope, validator.schema
- for each in reversed(scope_stack[1:]):
+ for each in reversed(validator.resolver._scopes_stack[1:]):
lookup_url, next_target = validator.resolver.resolve(each)
if next_target.get("$recursiveAnchor"):
target = next_target
diff --git a/jsonschema/_validators.py b/jsonschema/_validators.py
index c6d0e9a..dec6b21 100644
--- a/jsonschema/_validators.py
+++ b/jsonschema/_validators.py
@@ -299,9 +299,8 @@ def ref(validator, ref, instance, schema):
def dynamicRef(validator, dynamicRef, instance, schema):
_, fragment = urldefrag(dynamicRef)
- scope_stack = validator.resolver.scopes_stack_copy
- for url in scope_stack:
+ for url in validator.resolver._scopes_stack:
lookup_url = urljoin(url, dynamicRef)
with validator.resolver.resolving(lookup_url) as subschema:
if ("$dynamicAnchor" in subschema
diff --git a/jsonschema/validators.py b/jsonschema/validators.py
index f94e9d0..9ad5016 100644
--- a/jsonschema/validators.py
+++ b/jsonschema/validators.py
@@ -672,13 +672,6 @@ class RefResolver(object):
return self._scopes_stack[-1]
@property
- def scopes_stack_copy(self):
- """
- Retrieve a copy of the stack of resolution scopes.
- """
- return self._scopes_stack.copy()
-
- @property
def base_uri(self):
"""
Retrieve the current base URI, not including any fragment.