Skip to content

Commit c1dbfb1

Browse files
committed
fix: šŸ› Update exception catch to catch all and do simple copy to handle any other possible deepcopy issues.
1 parent 9df8590 commit c1dbfb1

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

ā€Žchanges/339.fixedā€Ž

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fixed bug with deepcopy in dunder new.

ā€Ždiffsync/__init__.pyā€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -488,7 +488,7 @@ def __new__(cls, **kwargs): # type: ignore[no-untyped-def]
488488
for key, value in kwargs.items():
489489
try:
490490
meta_kwargs[key] = deepcopy(value)
491-
except (TypeError, AttributeError):
491+
except Exception:
492492
# Some objects (e.g. Kafka Consumer, DB connections) cannot be deep copied
493493
meta_kwargs[key] = value
494494
instance = super().__new__(cls)

0 commit comments

Comments
Ā (0)