Skip to content

Commit 55d80bb

Browse files
authored
remove copy
1 parent 8456a34 commit 55d80bb

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

jsonschema/validators.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
import contextlib
66
import json
77
import numbers
8-
import copy
98

109
from jsonschema import (
1110
_legacy_validators,
@@ -890,7 +889,7 @@ def store_subschema(self, schema, last_schema=None, last_url=None):
890889
or self.resolution_scope in list_schema:
891890
return
892891

893-
for k in schema.keys():
892+
for k in list(schema.keys()):
894893
if k in [u"id", u"$id"] and isinstance(schema[k], str_types):
895894

896895
last_url = urljoin(last_url, schema[k], allow_fragments=True)
@@ -902,9 +901,8 @@ def store_subschema(self, schema, last_schema=None, last_url=None):
902901
if fragment:
903902
self.store[url][fragment] = schema
904903

905-
backup_schema = copy.deepcopy(schema)
906904
if isinstance(schema[k], dict):
907-
self.store_subschema(schema[k], backup_schema, last_url)
905+
self.store_subschema(schema[k], schema, last_url)
908906

909907

910908
def validate(instance, schema, cls=None, *args, **kwargs):

0 commit comments

Comments
 (0)