From 2295b5658cd06f8e19b1660d99d16eced527fb7b Mon Sep 17 00:00:00 2001 From: Justin Drew <2396364+jdrew82@users.noreply.github.com> Date: Mon, 2 Mar 2026 15:51:14 -0600 Subject: [PATCH 1/4] Bump prepatch --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 20a82c8..e0e3994 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "diffsync" -version = "2.2.1" +version = "2.2.2a0" description = "Library to easily sync/diff/update 2 different data sources" authors = ["Network to Code, LLC "] license = "Apache-2.0" From c1dbfb1c97b910e71b3fd5da20f2f6a46301cf3f Mon Sep 17 00:00:00 2001 From: Justin Drew <2396364+jdrew82@users.noreply.github.com> Date: Mon, 2 Mar 2026 16:13:30 -0600 Subject: [PATCH 2/4] =?UTF-8?q?fix:=20=F0=9F=90=9B=20Update=20exception=20?= =?UTF-8?q?catch=20to=20catch=20all=20and=20do=20simple=20copy=20to=20hand?= =?UTF-8?q?le=20any=20other=20possible=20deepcopy=20issues.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- changes/339.fixed | 1 + diffsync/__init__.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 changes/339.fixed diff --git a/changes/339.fixed b/changes/339.fixed new file mode 100644 index 0000000..2fa50ce --- /dev/null +++ b/changes/339.fixed @@ -0,0 +1 @@ +Fixed bug with deepcopy in dunder new. diff --git a/diffsync/__init__.py b/diffsync/__init__.py index c48e705..600207c 100644 --- a/diffsync/__init__.py +++ b/diffsync/__init__.py @@ -488,7 +488,7 @@ def __new__(cls, **kwargs): # type: ignore[no-untyped-def] for key, value in kwargs.items(): try: meta_kwargs[key] = deepcopy(value) - except (TypeError, AttributeError): + except Exception: # Some objects (e.g. Kafka Consumer, DB connections) cannot be deep copied meta_kwargs[key] = value instance = super().__new__(cls) From 7ebca7e2ef264bb5cf88d45185faa0388a19bebc Mon Sep 17 00:00:00 2001 From: Justin Drew <2396364+jdrew82@users.noreply.github.com> Date: Tue, 3 Mar 2026 09:04:11 -0600 Subject: [PATCH 3/4] fix: Add ignore for broad Exception catch --- diffsync/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/diffsync/__init__.py b/diffsync/__init__.py index 600207c..402320e 100644 --- a/diffsync/__init__.py +++ b/diffsync/__init__.py @@ -488,7 +488,7 @@ def __new__(cls, **kwargs): # type: ignore[no-untyped-def] for key, value in kwargs.items(): try: meta_kwargs[key] = deepcopy(value) - except Exception: + except Exception: # pylint: disable=broad-exception-caught # Some objects (e.g. Kafka Consumer, DB connections) cannot be deep copied meta_kwargs[key] = value instance = super().__new__(cls) From 544cc577921164d03e1440de1da9ee42fa5ab98c Mon Sep 17 00:00:00 2001 From: Joe Wesch Date: Wed, 11 Mar 2026 10:24:13 -0500 Subject: [PATCH 4/4] Release v2.2.2 --- changes/339.fixed | 1 - docs/admin/release_notes/version_2.2.md | 6 ++++++ pyproject.toml | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) delete mode 100644 changes/339.fixed diff --git a/changes/339.fixed b/changes/339.fixed deleted file mode 100644 index 2fa50ce..0000000 --- a/changes/339.fixed +++ /dev/null @@ -1 +0,0 @@ -Fixed bug with deepcopy in dunder new. diff --git a/docs/admin/release_notes/version_2.2.md b/docs/admin/release_notes/version_2.2.md index f2d84d9..603c7ad 100644 --- a/docs/admin/release_notes/version_2.2.md +++ b/docs/admin/release_notes/version_2.2.md @@ -18,3 +18,9 @@ Remove Python 3.9 support as it's EOL. - [#321](https://github.com/networktocode/diffsync/issues/321) - Fixed CI release workflow. - Rebaked from the cookie `main`. + +## [v2.2.2 (2026-03-11)](https://github.com/networktocode/diffsync/releases/tag/v2.2.2) + +### Fixed + +- [#339](https://github.com/networktocode/diffsync/issues/339) - Fixed bug with deepcopy in dunder new. diff --git a/pyproject.toml b/pyproject.toml index e0e3994..34267ec 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "diffsync" -version = "2.2.2a0" +version = "2.2.2" description = "Library to easily sync/diff/update 2 different data sources" authors = ["Network to Code, LLC "] license = "Apache-2.0"