Added DeprecationWarning to Shape.copy

This commit is contained in:
Roger Maitland 2022-12-20 11:03:17 -05:00
parent 96d2662df9
commit cb86a2a9f9

View file

@ -2695,6 +2695,11 @@ class Shape:
def copy(self) -> Shape:
"""Here for backwards compatibility with cq-editor"""
warnings.warn(
"copy() will be deprecated - use copy.copy() or copy.deepcopy() instead",
DeprecationWarning,
stacklevel=2,
)
return copy.deepcopy(self, None)
def transform_shape(self, t_matrix: Matrix) -> Shape: