From 1724afec05a4aca0e3b0881625e58c5d2b497939c42e46327c2b5ec5a0a5b6b3 Mon Sep 17 00:00:00 2001 From: Paolo Stivanin Date: Tue, 24 Jan 2023 06:46:16 +0000 Subject: [PATCH] Accepting request 1060475 from home:dgarcia:branches:Application:Geo - Disable broken tests for python 3.11. python-mocket currently does not work with python 3.11, so we should disable tests that uses it until it's supported. See these issues: gh#maxmind/GeoIP2-python@3b0dbb1eb990 gh#mindflayer/python-mocket#181 gh#benoitc/http-parser#95 OBS-URL: https://build.opensuse.org/request/show/1060475 OBS-URL: https://build.opensuse.org/package/show/Application:Geo/python-geoip2?expand=0&rev=25 --- python-geoip2.changes | 12 ++++++++++++ python-geoip2.spec | 18 +++++++++++++++--- 2 files changed, 27 insertions(+), 3 deletions(-) diff --git a/python-geoip2.changes b/python-geoip2.changes index e89ecee..9144029 100644 --- a/python-geoip2.changes +++ b/python-geoip2.changes @@ -1,3 +1,15 @@ +------------------------------------------------------------------- +Mon Jan 23 16:42:49 UTC 2023 - Daniel Garcia + +- Disable broken tests for python 3.11. python-mocket currently does not work + with python 3.11, so we should disable tests that uses it until it's + supported. + + See these issues: + gh#maxmind/GeoIP2-python@3b0dbb1eb990 + gh#mindflayer/python-mocket#181 + gh#benoitc/http-parser#95 + ------------------------------------------------------------------- Mon Jul 4 07:11:02 UTC 2022 - Paolo Stivanin diff --git a/python-geoip2.spec b/python-geoip2.spec index 353bee4..d559cc3 100644 --- a/python-geoip2.spec +++ b/python-geoip2.spec @@ -1,7 +1,7 @@ # # spec file for package python-geoip2 # -# Copyright (c) 2022 SUSE LLC +# Copyright (c) 2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -33,7 +33,11 @@ BuildRequires: python-rpm-macros # SECTION test requirements BuildRequires: %{python_module aiohttp >= 3.6.2} BuildRequires: %{python_module maxminddb >= 2.2.0} -BuildRequires: %{python_module mocket >= 3.8.9} +# mocket currently does not work with 3.11. See these issues: +# gh#maxmind/GeoIP2-python@3b0dbb1eb990 +# gh#mindflayer/python-mocket#181 +# gh#benoitc/http-parser#95 +BuildRequires: %{python_module mocket >= 3.8.9 if %python-base < 3.11} BuildRequires: %{python_module python-magic >= 0.4.18} BuildRequires: %{python_module requests >= 2.14.0} # /SECTION @@ -62,7 +66,15 @@ The API also works with MaxMind's free GeoLite2 databases. %python_expand %fdupes %{buildroot}%{$python_sitelib} %check -%pyunittest tests/*_test.py -v +python38_tests="tests/webservice_test.py tests/models_test.py tests/database_test.py" +python39_tests=$python38_tests +python310_tests=$python38_tests +# mocket currently does not work with 3.11. See these issues: +# gh#maxmind/GeoIP2-python@3b0dbb1eb990 +# gh#mindflayer/python-mocket#181 +# gh#benoitc/http-parser#95 +python311_tests="tests/models_test.py tests/database_test.py" +%pyunittest -v ${$python_tests} %files %{python_files} %license LICENSE