Skip to content

Commit 006c4e5

Browse files
authored
Merge pull request #340 from networktocode/patch-339-deepcopy-failure
Fix Bug with deepcopy
2 parents 9df8590 + 7ebca7e commit 006c4e5

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: # pylint: disable=broad-exception-caught
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)