From 15ad363a63530aa44878ee0631f73d723df14827 Mon Sep 17 00:00:00 2001 From: wency_cn Date: Thu, 4 Dec 2025 03:31:43 +0800 Subject: [PATCH] Update code from upstream --- python-arrow-remove-simplejson-test.patch | 37 +++++++++++++++++++++++ python-arrow.spec | 14 +++++++-- 2 files changed, 48 insertions(+), 3 deletions(-) create mode 100644 python-arrow-remove-simplejson-test.patch diff --git a/python-arrow-remove-simplejson-test.patch b/python-arrow-remove-simplejson-test.patch new file mode 100644 index 0000000..44cbdb8 --- /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 dbd1407..b554f6f 100644 --- a/python-arrow.spec +++ b/python-arrow.spec @@ -1,17 +1,18 @@ -%define anolis_release 2 +%define anolis_release 3 %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 +* Thu Dec 04 2025 wency_cn - 1.2.3-3 +- Remove redundant test dependency to simplify testing and reduce external library reliance * Fri Mar 22 2024 Zhao Hang - 1.2.3-2 - Rebuild with python3.11 -- Gitee