diff --git a/src/prov/model.py b/src/prov/model.py index 186ac43..5df3b60 100644 --- a/src/prov/model.py +++ b/src/prov/model.py @@ -7,7 +7,6 @@ PROV-JSON: https://openprovenance.org/prov-json/ """ from collections import defaultdict -from copy import deepcopy import datetime import io import itertools @@ -1177,8 +1176,8 @@ def valid_qualified_name(self, qname): # reuse the existing namespace new_qname = existing_ns[local_part] else: - # Do not reuse the namespace object - ns = self.add_namespace(deepcopy(namespace)) + # Do not reuse the namespace object, making an identical copy + ns = self.add_namespace(Namespace(namespace.prefix, namespace.uri)) # minting the same Qualified Name from the namespace's copy new_qname = ns[qname.localpart] # returning the new qname