From 61078a2fdee1515ae3c2339860428fd87c65dbda Mon Sep 17 00:00:00 2001 From: fatimarahman Date: Thu, 18 Jun 2026 10:24:06 -0400 Subject: [PATCH 1/2] Remove encoding and decoding --- CHANGELOG.md | 3 +++ src/nypl_py_utils/classes/azure_client.py | 4 ---- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7e7ab1f..dbdc9fb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,7 @@ # Changelog +## v1.12.1 6/18/26 +- Remove Azure client encoding and decoding + ## v1.12.0 6/15/26 - Add Azure client diff --git a/src/nypl_py_utils/classes/azure_client.py b/src/nypl_py_utils/classes/azure_client.py index fc1262a..8ac772d 100644 --- a/src/nypl_py_utils/classes/azure_client.py +++ b/src/nypl_py_utils/classes/azure_client.py @@ -50,10 +50,6 @@ def connect(self, retry_count=0, backoff_factor=5): connection_str=connection_string, timeout=30, ) - self.conn.setencoding(encoding="utf-8") - self.conn.setdecoding( - sqltype=mssql_python.SQL_WCHAR, encoding="utf-8" - ) return except (mssql_python.InterfaceError, mssql_python.OperationalError): From 75f67c66199b7c3153f51a146637bdea77feba3e Mon Sep 17 00:00:00 2001 From: fatimarahman Date: Thu, 18 Jun 2026 10:29:15 -0400 Subject: [PATCH 2/2] Remove decoding/encoding check from tests --- tests/test_azure_client.py | 6 ------ 1 file changed, 6 deletions(-) diff --git a/tests/test_azure_client.py b/tests/test_azure_client.py index 64998e5..07cb63a 100644 --- a/tests/test_azure_client.py +++ b/tests/test_azure_client.py @@ -25,12 +25,6 @@ def test_connect_success(self, mock_azure_conn, test_instance): test_instance.connect() assert test_instance.conn == mock_azure_conn.return_value - mock_azure_conn.return_value.setencoding.assert_called_once_with( - encoding="utf-8" - ) - mock_azure_conn.return_value.setdecoding.assert_called_once_with( - sqltype=mssql_python.SQL_WCHAR, encoding="utf-8" - ) # credentials are interpolated into connection string connection_str = mock_azure_conn.call_args.kwargs["connection_str"] assert connection_str == (