diff --git a/python-arrow-remove-simplejson-test.patch b/python-arrow-remove-simplejson-test.patch new file mode 100644 index 0000000000000000000000000000000000000000..44cbdb8fd1d7b943b10272dcfe85750774eec7f9 --- /dev/null +++ b/python-arrow-remove-simplejson-test.patch @@ -0,0 +1,37 @@ +From 17364a0e61b64811271a2015d9a42f7b1e424de2 Mon Sep 17 00:00:00 2001 +From: Ralph Bean +Date: Wed, 27 Jul 2016 16:34:20 -0400 +Subject: [PATCH] Remove simplejson test. + +--- + tests/arrow_tests.py | 7 ------- + 1 file changed, 7 deletions(-) + +diff --git a/tests/arrow_tests.py b/tests/arrow_tests.py +index 7735b20..57b24d9 100644 +--- a/tests/arrow_tests.py ++++ b/tests/arrow_tests.py +@@ -6,7 +6,6 @@ from chai import Chai + + from datetime import date, datetime, timedelta + from dateutil import tz +-import simplejson as json + import calendar + import pickle + import time +@@ -402,12 +401,6 @@ class ArrowDatetimeInterfaceTests(Chai): + + assertEqual(result, self.arrow._datetime.isoformat()) + +- def test_simplejson(self): +- +- result = json.dumps({'v': self.arrow.for_json()}, for_json=True) +- +- assertEqual(json.loads(result)['v'], self.arrow._datetime.isoformat()) +- + def test_ctime(self): + + result = self.arrow.ctime() +-- +2.7.4 + diff --git a/python-arrow.spec b/python-arrow.spec index 9320523efface48db9bce9331dfaceea21d34edc..89663321f8b96fb81ada07578e4303e89f7f45c7 100644 --- a/python-arrow.spec +++ b/python-arrow.spec @@ -1,17 +1,18 @@ -%define anolis_release 3 +%define anolis_release 4 %global python3_pkgversion 3 %global modname arrow Name: python-%{modname} -Version: 1.2.3 +Version: 1.2.3 Release: %{anolis_release}%{?dist} Summary: Better dates and times for Python License: ASL 2.0 URL: https://pypi.io/project/arrow -Source0: %pypi_source arrow +Source0: https://files.pythonhosted.org/packages/source/a/arrow/arrow-1.2.3.tar.gz +Patch1: python-arrow-remove-simplejson-test.patch BuildArch: noarch @@ -36,6 +37,11 @@ BuildRequires: python%{python3_pkgversion}-pytest BuildRequires: python%{python3_pkgversion}-pytest-mock BuildRequires: python%{python3_pkgversion}-pytest-cov BuildRequires: python%{python3_pkgversion}-simplejson +BuildRequires: python3-chai +BuildRequires: python3-dateparser +BuildRequires: python3-dateutil +BuildRequires: python3-setuptools +BuildRequires: python3-six Requires: python%{python3_pkgversion}-dateutil Requires: python%{python3_pkgversion}-six @@ -89,6 +95,8 @@ pytest-%{python3_version} tests %doc README.rst CHANGELOG.rst %changelog +* Wed Sep 17 2025 wenyuzifang - 1.2.3-4 +- Remove unnecessary dependency on simplejson to ensure tests run reliably across all environments. * Wed Aug 13 2025 wenxin - 1.2.3-3 - Rebuild with python3.11