Skip to content

Commit ec9d8c8

Browse files
authored
Merge pull request #158 from jfennick/no_deepcopy_cache
Do not deepcopy the cache!
2 parents 95fd523 + 050ee3b commit ec9d8c8

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/prov/model.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
PROV-JSON: https://openprovenance.org/prov-json/
88
"""
99
from collections import defaultdict
10-
from copy import deepcopy
1110
import datetime
1211
import io
1312
import itertools
@@ -1177,8 +1176,8 @@ def valid_qualified_name(self, qname):
11771176
# reuse the existing namespace
11781177
new_qname = existing_ns[local_part]
11791178
else:
1180-
# Do not reuse the namespace object
1181-
ns = self.add_namespace(deepcopy(namespace))
1179+
# Do not reuse the namespace object, making an identical copy
1180+
ns = self.add_namespace(Namespace(namespace.prefix, namespace.uri))
11821181
# minting the same Qualified Name from the namespace's copy
11831182
new_qname = ns[qname.localpart]
11841183
# returning the new qname

0 commit comments

Comments
 (0)