forked from pool/python-cassandra-driver
Accepting request 1244731 from home:glaubitz:branches:devel:languages:python
- Update to 3.29.2
* Convert to pytest for running unit and integration tests (PYTHON-1297)
* Add support for Cassandra 4.1.x and 5.0 releases to CI (PYTHON-1393)
* Extend driver vector support to arbitrary subtypes and fix handling
of variable length types (PYTHON-1369)
* Python NumpyProtocolHandler does not work with NumPy 1.24.0 or greater (PYTHON-1359)
* cibuildwheel appears to not be stripping Cython-generated shared objects (PYTHON-1387)
* Windows build for Python 3.12 compiled without libev support (PYTHON-1386)
* Update README.rst with badges for version and license (PR 1210)
* Remove dependency on old mock external module (PR 1201)
* Removed future print_function, division, and with and some pre 3.7 handling (PR 1208)
* Update geomet dependency (PR 1207)
* Remove problematic escape sequences in some docstrings to avoid SyntaxWarning
in Python 3.12 (PR 1205)
* Use timezone-aware API to avoid deprecated warning (PR 1213)
- Drop python-cassandra-driver-no-mock.patch, fixed upstream
- Drop python-cassandra-driver-test_libevreactor-DependencyException.patch, fixed upstream
- Remove C source files from source tree
- Switch package to modern Python Stack on SLE-15
* Use Python 3.11 on SLE-15 by default
* Drop support for older Python versions
- Switch build system from setuptools to pyproject.toml
* Add python-pip and python-wheel to BuildRequires
* Replace %python_build with %pyproject_wheel
* Replace %python_install with %pyproject_install
* Update name for dist directory in %files section
OBS-URL: https://build.opensuse.org/request/show/1244731
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-cassandra-driver?expand=0&rev=61
This commit is contained in:
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:8c68a9dee67b3386b46b4e13a78287ef6923aa63ff574b859bc98ea16ab46934
|
||||
size 785113
|
||||
3
3.29.2.tar.gz
Normal file
3
3.29.2.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:aa3be5396e05b395c178091656a329daba23b0d4dd69b8d076090157f86e6d13
|
||||
size 791791
|
||||
@@ -1,312 +0,0 @@
|
||||
Index: python-driver-3.29.1/tests/unit/advanced/cloud/test_cloud.py
|
||||
===================================================================
|
||||
--- python-driver-3.29.1.orig/tests/unit/advanced/cloud/test_cloud.py
|
||||
+++ python-driver-3.29.1/tests/unit/advanced/cloud/test_cloud.py
|
||||
@@ -15,7 +15,7 @@ import unittest
|
||||
from cassandra import DriverException
|
||||
from cassandra.datastax import cloud
|
||||
|
||||
-from mock import patch
|
||||
+from unittest.mock import patch
|
||||
|
||||
from tests import notwindows
|
||||
|
||||
Index: python-driver-3.29.1/tests/unit/advanced/test_insights.py
|
||||
===================================================================
|
||||
--- python-driver-3.29.1.orig/tests/unit/advanced/test_insights.py
|
||||
+++ python-driver-3.29.1/tests/unit/advanced/test_insights.py
|
||||
@@ -16,7 +16,7 @@
|
||||
import unittest
|
||||
|
||||
import logging
|
||||
-from mock import sentinel
|
||||
+from unittest.mock import sentinel
|
||||
import sys
|
||||
|
||||
from cassandra import ConsistencyLevel
|
||||
Index: python-driver-3.29.1/tests/unit/advanced/test_policies.py
|
||||
===================================================================
|
||||
--- python-driver-3.29.1.orig/tests/unit/advanced/test_policies.py
|
||||
+++ python-driver-3.29.1/tests/unit/advanced/test_policies.py
|
||||
@@ -13,7 +13,7 @@
|
||||
# limitations under the License.
|
||||
import unittest
|
||||
|
||||
-from mock import Mock
|
||||
+from unittest.mock import Mock
|
||||
|
||||
from cassandra.pool import Host
|
||||
from cassandra.policies import RoundRobinPolicy
|
||||
Index: python-driver-3.29.1/tests/unit/cqlengine/test_connection.py
|
||||
===================================================================
|
||||
--- python-driver-3.29.1.orig/tests/unit/cqlengine/test_connection.py
|
||||
+++ python-driver-3.29.1/tests/unit/cqlengine/test_connection.py
|
||||
@@ -18,7 +18,7 @@ from cassandra.cluster import _ConfigMod
|
||||
from cassandra.cqlengine import connection
|
||||
from cassandra.query import dict_factory
|
||||
|
||||
-from mock import Mock
|
||||
+from unittest.mock import Mock
|
||||
|
||||
|
||||
class ConnectionTest(unittest.TestCase):
|
||||
Index: python-driver-3.29.1/tests/unit/io/test_asyncioreactor.py
|
||||
===================================================================
|
||||
--- python-driver-3.29.1.orig/tests/unit/io/test_asyncioreactor.py
|
||||
+++ python-driver-3.29.1/tests/unit/io/test_asyncioreactor.py
|
||||
@@ -10,7 +10,7 @@ except (ImportError, SyntaxError):
|
||||
from tests import is_monkey_patched, connection_class
|
||||
from tests.unit.io.utils import TimerCallback, TimerTestMixin
|
||||
|
||||
-from mock import patch
|
||||
+from unittest.mock import patch
|
||||
|
||||
import unittest
|
||||
import time
|
||||
Index: python-driver-3.29.1/tests/unit/io/test_asyncorereactor.py
|
||||
===================================================================
|
||||
--- python-driver-3.29.1.orig/tests/unit/io/test_asyncorereactor.py
|
||||
+++ python-driver-3.29.1/tests/unit/io/test_asyncorereactor.py
|
||||
@@ -13,7 +13,7 @@
|
||||
# limitations under the License.
|
||||
import unittest
|
||||
|
||||
-from mock import patch
|
||||
+from unittest.mock import patch
|
||||
import socket
|
||||
import cassandra.io.asyncorereactor as asyncorereactor
|
||||
from cassandra.io.asyncorereactor import AsyncoreConnection
|
||||
Index: python-driver-3.29.1/tests/unit/io/test_eventletreactor.py
|
||||
===================================================================
|
||||
--- python-driver-3.29.1.orig/tests/unit/io/test_eventletreactor.py
|
||||
+++ python-driver-3.29.1/tests/unit/io/test_eventletreactor.py
|
||||
@@ -19,7 +19,7 @@ from tests.unit.io.utils import TimerTes
|
||||
from tests import notpypy, EVENT_LOOP_MANAGER
|
||||
|
||||
from eventlet import monkey_patch
|
||||
-from mock import patch
|
||||
+from unittest.mock import patch
|
||||
|
||||
try:
|
||||
from cassandra.io.eventletreactor import EventletConnection
|
||||
Index: python-driver-3.29.1/tests/unit/io/test_geventreactor.py
|
||||
===================================================================
|
||||
--- python-driver-3.29.1.orig/tests/unit/io/test_geventreactor.py
|
||||
+++ python-driver-3.29.1/tests/unit/io/test_geventreactor.py
|
||||
@@ -23,7 +23,7 @@ try:
|
||||
except ImportError:
|
||||
GeventConnection = None # noqa
|
||||
|
||||
-from mock import patch
|
||||
+from unittest.mock import patch
|
||||
|
||||
|
||||
skip_condition = GeventConnection is None or EVENT_LOOP_MANAGER != "gevent"
|
||||
Index: python-driver-3.29.1/tests/unit/io/test_libevreactor.py
|
||||
===================================================================
|
||||
--- python-driver-3.29.1.orig/tests/unit/io/test_libevreactor.py
|
||||
+++ python-driver-3.29.1/tests/unit/io/test_libevreactor.py
|
||||
@@ -13,7 +13,7 @@
|
||||
# limitations under the License.
|
||||
import unittest
|
||||
|
||||
-from mock import patch, Mock
|
||||
+from unittest.mock import patch, Mock
|
||||
import weakref
|
||||
import socket
|
||||
|
||||
Index: python-driver-3.29.1/tests/unit/io/test_twistedreactor.py
|
||||
===================================================================
|
||||
--- python-driver-3.29.1.orig/tests/unit/io/test_twistedreactor.py
|
||||
+++ python-driver-3.29.1/tests/unit/io/test_twistedreactor.py
|
||||
@@ -13,7 +13,7 @@
|
||||
# limitations under the License.
|
||||
|
||||
import unittest
|
||||
-from mock import Mock, patch
|
||||
+from unittest.mock import Mock, patch
|
||||
|
||||
from cassandra.connection import DefaultEndPoint
|
||||
|
||||
Index: python-driver-3.29.1/tests/unit/io/utils.py
|
||||
===================================================================
|
||||
--- python-driver-3.29.1.orig/tests/unit/io/utils.py
|
||||
+++ python-driver-3.29.1/tests/unit/io/utils.py
|
||||
@@ -27,7 +27,7 @@ import random
|
||||
from functools import wraps
|
||||
from itertools import cycle
|
||||
from io import BytesIO
|
||||
-from mock import Mock
|
||||
+from unittest.mock import Mock
|
||||
|
||||
import errno
|
||||
import logging
|
||||
Index: python-driver-3.29.1/tests/unit/test_cluster.py
|
||||
===================================================================
|
||||
--- python-driver-3.29.1.orig/tests/unit/test_cluster.py
|
||||
+++ python-driver-3.29.1/tests/unit/test_cluster.py
|
||||
@@ -16,7 +16,7 @@ import unittest
|
||||
import logging
|
||||
import socket
|
||||
|
||||
-from mock import patch, Mock
|
||||
+from unittest.mock import patch, Mock
|
||||
|
||||
from cassandra import ConsistencyLevel, DriverException, Timeout, Unavailable, RequestExecutionException, ReadTimeout, WriteTimeout, CoordinationFailure, ReadFailure, WriteFailure, FunctionFailure, AlreadyExists,\
|
||||
InvalidRequest, Unauthorized, AuthenticationFailed, OperationTimedOut, UnsupportedOperation, RequestValidationException, ConfigurationException, ProtocolVersion
|
||||
Index: python-driver-3.29.1/tests/unit/test_concurrent.py
|
||||
===================================================================
|
||||
--- python-driver-3.29.1.orig/tests/unit/test_concurrent.py
|
||||
+++ python-driver-3.29.1/tests/unit/test_concurrent.py
|
||||
@@ -16,7 +16,7 @@
|
||||
import unittest
|
||||
|
||||
from itertools import cycle
|
||||
-from mock import Mock
|
||||
+from unittest.mock import Mock
|
||||
import time
|
||||
import threading
|
||||
from queue import PriorityQueue
|
||||
Index: python-driver-3.29.1/tests/unit/test_connection.py
|
||||
===================================================================
|
||||
--- python-driver-3.29.1.orig/tests/unit/test_connection.py
|
||||
+++ python-driver-3.29.1/tests/unit/test_connection.py
|
||||
@@ -13,7 +13,7 @@
|
||||
# limitations under the License.
|
||||
import unittest
|
||||
|
||||
-from mock import Mock, ANY, call, patch
|
||||
+from unittest.mock import Mock, ANY, call, patch
|
||||
from io import BytesIO
|
||||
import time
|
||||
from threading import Lock
|
||||
Index: python-driver-3.29.1/tests/unit/test_control_connection.py
|
||||
===================================================================
|
||||
--- python-driver-3.29.1.orig/tests/unit/test_control_connection.py
|
||||
+++ python-driver-3.29.1/tests/unit/test_control_connection.py
|
||||
@@ -15,7 +15,7 @@
|
||||
import unittest
|
||||
|
||||
from concurrent.futures import ThreadPoolExecutor
|
||||
-from mock import Mock, ANY, call
|
||||
+from unittest.mock import Mock, ANY, call
|
||||
|
||||
from cassandra import OperationTimedOut, SchemaTargetType, SchemaChangeType
|
||||
from cassandra.protocol import ResultMessage, RESULT_KIND_ROWS
|
||||
Index: python-driver-3.29.1/tests/unit/test_endpoints.py
|
||||
===================================================================
|
||||
--- python-driver-3.29.1.orig/tests/unit/test_endpoints.py
|
||||
+++ python-driver-3.29.1/tests/unit/test_endpoints.py
|
||||
@@ -12,7 +12,7 @@ import itertools
|
||||
|
||||
from cassandra.connection import DefaultEndPoint, SniEndPoint, SniEndPointFactory
|
||||
|
||||
-from mock import patch
|
||||
+from unittest.mock import patch
|
||||
|
||||
|
||||
def socket_getaddrinfo(*args):
|
||||
Index: python-driver-3.29.1/tests/unit/test_metadata.py
|
||||
===================================================================
|
||||
--- python-driver-3.29.1.orig/tests/unit/test_metadata.py
|
||||
+++ python-driver-3.29.1/tests/unit/test_metadata.py
|
||||
@@ -15,7 +15,7 @@ import unittest
|
||||
|
||||
from binascii import unhexlify
|
||||
import logging
|
||||
-from mock import Mock
|
||||
+from unittest.mock import Mock
|
||||
import os
|
||||
import timeit
|
||||
|
||||
Index: python-driver-3.29.1/tests/unit/test_policies.py
|
||||
===================================================================
|
||||
--- python-driver-3.29.1.orig/tests/unit/test_policies.py
|
||||
+++ python-driver-3.29.1/tests/unit/test_policies.py
|
||||
@@ -15,7 +15,7 @@
|
||||
import unittest
|
||||
|
||||
from itertools import islice, cycle
|
||||
-from mock import Mock, patch, call
|
||||
+from unittest.mock import Mock, patch, call
|
||||
from random import randint
|
||||
from _thread import LockType
|
||||
import sys
|
||||
Index: python-driver-3.29.1/tests/unit/test_protocol.py
|
||||
===================================================================
|
||||
--- python-driver-3.29.1.orig/tests/unit/test_protocol.py
|
||||
+++ python-driver-3.29.1/tests/unit/test_protocol.py
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
import unittest
|
||||
|
||||
-from mock import Mock
|
||||
+from unittest.mock import Mock
|
||||
|
||||
from cassandra import ProtocolVersion, UnsupportedOperation
|
||||
from cassandra.protocol import (
|
||||
Index: python-driver-3.29.1/tests/unit/test_response_future.py
|
||||
===================================================================
|
||||
--- python-driver-3.29.1.orig/tests/unit/test_response_future.py
|
||||
+++ python-driver-3.29.1/tests/unit/test_response_future.py
|
||||
@@ -17,7 +17,7 @@ import unittest
|
||||
from collections import deque
|
||||
from threading import RLock
|
||||
|
||||
-from mock import Mock, MagicMock, ANY
|
||||
+from unittest.mock import Mock, MagicMock, ANY
|
||||
|
||||
from cassandra import ConsistencyLevel, Unavailable, SchemaTargetType, SchemaChangeType, OperationTimedOut
|
||||
from cassandra.cluster import Session, ResponseFuture, NoHostAvailable, ProtocolVersion
|
||||
Index: python-driver-3.29.1/tests/unit/test_resultset.py
|
||||
===================================================================
|
||||
--- python-driver-3.29.1.orig/tests/unit/test_resultset.py
|
||||
+++ python-driver-3.29.1/tests/unit/test_resultset.py
|
||||
@@ -15,7 +15,7 @@ from cassandra.query import named_tuple_
|
||||
|
||||
import unittest
|
||||
|
||||
-from mock import Mock, PropertyMock, patch
|
||||
+from unittest.mock import Mock, PropertyMock, patch
|
||||
|
||||
from cassandra.cluster import ResultSet
|
||||
|
||||
Index: python-driver-3.29.1/tests/unit/test_timestamps.py
|
||||
===================================================================
|
||||
--- python-driver-3.29.1.orig/tests/unit/test_timestamps.py
|
||||
+++ python-driver-3.29.1/tests/unit/test_timestamps.py
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
import unittest
|
||||
|
||||
-import mock
|
||||
+from unittest import mock
|
||||
|
||||
from cassandra import timestamps
|
||||
from threading import Thread, Lock
|
||||
Index: python-driver-3.29.1/tests/unit/utils.py
|
||||
===================================================================
|
||||
--- python-driver-3.29.1.orig/tests/unit/utils.py
|
||||
+++ python-driver-3.29.1/tests/unit/utils.py
|
||||
@@ -15,7 +15,7 @@
|
||||
from concurrent.futures import Future
|
||||
from functools import wraps
|
||||
from cassandra.cluster import Session
|
||||
-from mock import patch
|
||||
+from unittest.mock import patch
|
||||
|
||||
|
||||
def mock_session_pools(f):
|
||||
Index: python-driver-3.29.1/tests/unit/test_host_connection_pool.py
|
||||
===================================================================
|
||||
--- python-driver-3.29.1.orig/tests/unit/test_host_connection_pool.py
|
||||
+++ python-driver-3.29.1/tests/unit/test_host_connection_pool.py
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
import unittest
|
||||
|
||||
-from mock import Mock, NonCallableMagicMock
|
||||
+from unittest.mock import Mock, NonCallableMagicMock
|
||||
from threading import Thread, Event, Lock
|
||||
|
||||
from cassandra.cluster import Session
|
||||
@@ -1,13 +0,0 @@
|
||||
Index: python-driver-3.29.1/tests/unit/io/test_libevreactor.py
|
||||
===================================================================
|
||||
--- python-driver-3.29.1.orig/tests/unit/io/test_libevreactor.py
|
||||
+++ python-driver-3.29.1/tests/unit/io/test_libevreactor.py
|
||||
@@ -24,7 +24,7 @@ from tests.unit.io.utils import ReactorT
|
||||
try:
|
||||
from cassandra.io.libevreactor import _cleanup as libev__cleanup
|
||||
from cassandra.io.libevreactor import LibevConnection
|
||||
-except ImportError:
|
||||
+except:
|
||||
LibevConnection = None # noqa
|
||||
|
||||
|
||||
@@ -1,3 +1,33 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Feb 10 11:31:49 UTC 2025 - John Paul Adrian Glaubitz <adrian.glaubitz@suse.com>
|
||||
|
||||
- Update to 3.29.2
|
||||
* Convert to pytest for running unit and integration tests (PYTHON-1297)
|
||||
* Add support for Cassandra 4.1.x and 5.0 releases to CI (PYTHON-1393)
|
||||
* Extend driver vector support to arbitrary subtypes and fix handling
|
||||
of variable length types (PYTHON-1369)
|
||||
* Python NumpyProtocolHandler does not work with NumPy 1.24.0 or greater (PYTHON-1359)
|
||||
* cibuildwheel appears to not be stripping Cython-generated shared objects (PYTHON-1387)
|
||||
* Windows build for Python 3.12 compiled without libev support (PYTHON-1386)
|
||||
* Update README.rst with badges for version and license (PR 1210)
|
||||
* Remove dependency on old mock external module (PR 1201)
|
||||
* Removed future print_function, division, and with and some pre 3.7 handling (PR 1208)
|
||||
* Update geomet dependency (PR 1207)
|
||||
* Remove problematic escape sequences in some docstrings to avoid SyntaxWarning
|
||||
in Python 3.12 (PR 1205)
|
||||
* Use timezone-aware API to avoid deprecated warning (PR 1213)
|
||||
- Drop python-cassandra-driver-no-mock.patch, fixed upstream
|
||||
- Drop python-cassandra-driver-test_libevreactor-DependencyException.patch, fixed upstream
|
||||
- Remove C source files from source tree
|
||||
- Switch package to modern Python Stack on SLE-15
|
||||
* Use Python 3.11 on SLE-15 by default
|
||||
* Drop support for older Python versions
|
||||
- Switch build system from setuptools to pyproject.toml
|
||||
* Add python-pip and python-wheel to BuildRequires
|
||||
* Replace %python_build with %pyproject_wheel
|
||||
* Replace %python_install with %pyproject_install
|
||||
* Update name for dist directory in %files section
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Apr 15 09:17:49 UTC 2024 - pgajdos@suse.com
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package python-cassandra-driver
|
||||
#
|
||||
# Copyright (c) 2024 SUSE LLC
|
||||
# Copyright (c) 2025 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@@ -16,18 +16,14 @@
|
||||
#
|
||||
|
||||
|
||||
%bcond_without python2
|
||||
%{?sle15_python_module_pythons}
|
||||
Name: python-cassandra-driver
|
||||
Version: 3.29.1
|
||||
Version: 3.29.2
|
||||
Release: 0
|
||||
Summary: Python driver for Cassandra
|
||||
License: Apache-2.0
|
||||
URL: https://github.com/datastax/python-driver
|
||||
Source: https://github.com/datastax/python-driver/archive/%{version}.tar.gz
|
||||
# https://datastax-oss.atlassian.net/browse/PYTHON-1299
|
||||
Patch0: python-cassandra-driver-no-mock.patch
|
||||
# if CASS_DRIVER_NO_EXTENSIONS=1, import throws DependencyException https://datastax-oss.atlassian.net/browse/PYTHON-1383
|
||||
Patch1: python-cassandra-driver-test_libevreactor-DependencyException.patch
|
||||
BuildRequires: %{python_module Cython}
|
||||
BuildRequires: %{python_module PyYAML}
|
||||
BuildRequires: %{python_module Twisted}
|
||||
@@ -35,12 +31,14 @@ BuildRequires: %{python_module devel}
|
||||
BuildRequires: %{python_module eventlet}
|
||||
BuildRequires: %{python_module geomet >= 0.1}
|
||||
BuildRequires: %{python_module gevent}
|
||||
BuildRequires: %{python_module pip}
|
||||
BuildRequires: %{python_module pure-sasl}
|
||||
BuildRequires: %{python_module pyasyncore if %python-base >= 3.12}
|
||||
BuildRequires: %{python_module pytest}
|
||||
BuildRequires: %{python_module pytz}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: %{python_module sure}
|
||||
BuildRequires: %{python_module wheel}
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: libev-devel
|
||||
BuildRequires: python-rpm-macros
|
||||
@@ -79,15 +77,17 @@ rm -f tests/unit/test_types.py
|
||||
sed -i -e 's:Cython>=0.20,!=0.25,<0.29:Cython:g' setup.py
|
||||
# fix tests on Python 3.12
|
||||
sed -i 's/assertRaisesRegexp/assertRaisesRegex/' tests/unit/test_response_future.py
|
||||
# remove C sources
|
||||
rm -f cassandra/cmurmur3.c cassandra/io/libevwrapper.c cassandra/numpyFlags.h
|
||||
|
||||
%build
|
||||
export CFLAGS="%{optflags}"
|
||||
export CASS_DRIVER_NO_EXTENSIONS=1
|
||||
%python_build
|
||||
%pyproject_wheel
|
||||
|
||||
%install
|
||||
export CASS_DRIVER_NO_EXTENSIONS=1
|
||||
%python_install
|
||||
%pyproject_install
|
||||
%python_expand %fdupes %{buildroot}%{$python_sitearch}
|
||||
|
||||
%check
|
||||
@@ -101,8 +101,8 @@ pytest tests/unit/test_host_connection_pool.py -k "HostConnectionPoolTests"
|
||||
%license LICENSE
|
||||
%doc README.rst
|
||||
%dir %{python_sitearch}/cassandra
|
||||
%dir %{python_sitearch}/cassandra_driver-%{version}-py*.egg-info
|
||||
%dir %{python_sitearch}/cassandra_driver-%{version}.dist-info
|
||||
%{python_sitearch}/cassandra/*
|
||||
%{python_sitearch}/cassandra_driver-%{version}-py*.egg-info/*
|
||||
%{python_sitearch}/cassandra_driver-%{version}.dist-info/*
|
||||
|
||||
%changelog
|
||||
|
||||
Reference in New Issue
Block a user