From 88d73c18d3504d0e27e418e6dc4243a521a8435b Mon Sep 17 00:00:00 2001 From: Dmitry Kropachev Date: Thu, 29 Jan 2026 16:06:40 -0400 Subject: [PATCH 1/3] Add missing dev and optional dependencies - Add numpy and objgraph to dev dependencies (used in tests) - Add auth-kerberos optional dependency for GSSAPI authentication --- pyproject.toml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index f0dffa23c9..8721a570dc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -35,6 +35,10 @@ graph = ['gremlinpython==3.7.4'] cle = ['cryptography>=35.0'] compress-lz4 = ['lz4'] compress-snappy = ['python-snappy'] +auth-kerberos = [ + 'kerberos; platform_system != "Windows"', + 'winkerberos; platform_system == "Windows"', +] [dependency-groups] dev = [ @@ -51,6 +55,8 @@ dev = [ "futurist", "asynctest", "pyyaml", + "numpy", + "objgraph", "ccm @ git+https://git@github.com/scylladb/scylla-ccm.git@master", ] From 93b84a4a31617ee7f9f45cdd16bc5c9e0dd79168 Mon Sep 17 00:00:00 2001 From: Dmitry Kropachev Date: Thu, 29 Jan 2026 17:30:20 -0400 Subject: [PATCH 2/3] Fix UnboundLocalError in test_numpy_results_paged Initialize `count` variable before the for loop to prevent UnboundLocalError when the loop doesn't execute. This follows the same pattern already used in verify_iterator_data(). --- tests/integration/standard/test_cython_protocol_handlers.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/integration/standard/test_cython_protocol_handlers.py b/tests/integration/standard/test_cython_protocol_handlers.py index 9ec16cecc7..1dfb0ccdd9 100644 --- a/tests/integration/standard/test_cython_protocol_handlers.py +++ b/tests/integration/standard/test_cython_protocol_handlers.py @@ -110,6 +110,7 @@ def test_numpy_results_paged(self): results = session.execute("SELECT * FROM test_table") assert results.has_more_pages + count = 0 for count, page in enumerate(results, 1): assert isinstance(page, dict) for colname, arr in page.items(): From 974a7e28f03131a475bf7af3d8362003accdd913 Mon Sep 17 00:00:00 2001 From: Dmitry Kropachev Date: Thu, 29 Jan 2026 21:24:14 -0400 Subject: [PATCH 3/3] Fix NumPy 2.0 compatibility in numpy_parser The `ndarray.newbyteorder()` method was removed in NumPy 2.0. Use `arr.view(arr.dtype.newbyteorder())` instead, which is compatible with both NumPy 1.x and 2.x. This fixes the failing numpy protocol handler integration tests that started running after numpy was added to dev dependencies. --- cassandra/numpy_parser.pyx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cassandra/numpy_parser.pyx b/cassandra/numpy_parser.pyx index 030c2c65c7..0ad34f66e2 100644 --- a/cassandra/numpy_parser.pyx +++ b/cassandra/numpy_parser.pyx @@ -181,5 +181,6 @@ def make_native_byteorder(arr): # accordingly (e.g. from '>i8' to '