15
0

Accepting request 1145153 from devel:languages:python

- Fix tests on Python 3.12

OBS-URL: https://build.opensuse.org/request/show/1145153
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-cassandra-driver?expand=0&rev=24
This commit is contained in:
2024-02-09 22:52:13 +00:00
committed by Git OBS Bridge
2 changed files with 15 additions and 1 deletions

View File

@@ -1,3 +1,8 @@
-------------------------------------------------------------------
Thu Feb 8 09:38:13 UTC 2024 - Markéta Machová <mmachova@suse.com>
- Fix tests on Python 3.12
-------------------------------------------------------------------
Sun Jun 25 19:02:15 UTC 2023 - Dirk Müller <dmueller@suse.com>

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-cassandra-driver
#
# Copyright (c) 2023 SUSE LLC
# Copyright (c) 2024 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -42,12 +42,19 @@ BuildRequires: %{python_module sure}
BuildRequires: fdupes
BuildRequires: libev-devel
BuildRequires: python-rpm-macros
%if 0%{?suse_version} >= 1600
# The classic "if %%python-base > 3.11" made the build unresolvable (at least for me). Sorry for this, feel free to rewrite.
BuildRequires: python312-pyasyncore
%endif
Requires: python-Cython
Requires: python-geomet >= 0.1
Requires: python-six >= 1.9
Recommends: python-Twisted
Recommends: python-eventlet
Recommends: python-gevent
%if 0%{?python_version_nodots} > 311
Requires: python-pyasyncore
%endif
%if %{with python2}
BuildRequires: python2-futures
%endif
@@ -73,6 +80,8 @@ rm -rf tests/unit/cython
rm -f tests/unit/test_types.py
# fix hardcoded cython dep
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
%build
export CFLAGS="%{optflags}"