diff --git a/masque/pattern.py b/masque/pattern.py index 24f6397..94068c9 100644 --- a/masque/pattern.py +++ b/masque/pattern.py @@ -172,7 +172,8 @@ class Pattern(PortList, AnnotatableImpl, Mirrorable): return s def __copy__(self) -> 'Pattern': - logger.warning('Making a shallow copy of a Pattern... old shapes are re-referenced!') + logger.warning('Making a shallow copy of a Pattern... old shapes/refs/labels are re-referenced! ' + 'Consider using .deepcopy() if this was not intended.') new = Pattern( annotations=copy.deepcopy(self.annotations), ports=copy.deepcopy(self.ports), @@ -860,7 +861,7 @@ class Pattern(PortList, AnnotatableImpl, Mirrorable): Returns: A deep copy of the current Pattern. """ - return copy.deepcopy(self) + return self.deepcopy() def deepcopy(self) -> Self: """