diff --git a/0001-Use-reason-instead-of-msg-for-pytest.skip.patch b/0001-Use-reason-instead-of-msg-for-pytest.skip.patch new file mode 100644 index 0000000..8121752 --- /dev/null +++ b/0001-Use-reason-instead-of-msg-for-pytest.skip.patch @@ -0,0 +1,32 @@ +From 51c1bad2af2a9bfd65f3543d5548ffbd218ee6a3 Mon Sep 17 00:00:00 2001 +From: Daniel Garcia Moreno +Date: Mon, 12 Aug 2024 11:05:45 +0200 +Subject: [PATCH] Use reason instead of msg for pytest.skip + +msg argument is removed since version 8.1.0 +https://github.com/pytest-dev/pytest/commit/0591569b4ba9bfb12e5b5307da621a83c4ceced6 +--- + tests/test_zipfile.py | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/tests/test_zipfile.py b/tests/test_zipfile.py +index 3e5e0b1..da81e75 100644 +--- a/tests/test_zipfile.py ++++ b/tests/test_zipfile.py +@@ -761,11 +761,11 @@ class TestStoredTestsWithSourceFile(AbstractTestsWithSourceFile): + try: + time.localtime(ts) + except OverflowError: +- pytest.skip(msg=f'time.localtime({ts}) raises OverflowError') ++ pytest.skip(reason=f'time.localtime({ts}) raises OverflowError') + try: + os.utime(testfn, (ts, ts)) + except OverflowError: +- pytest.skip(msg="Host fs cannot set timestamp to required value.") ++ pytest.skip(reason="Host fs cannot set timestamp to required value.") + + mtime_ns = os.stat(tmp_pathplus / TESTFN).st_mtime_ns + if mtime_ns != (4386268800 * 10**9): +-- +2.45.2 + diff --git a/python-handy-archives.changes b/python-handy-archives.changes index edc0e43..be6e28b 100644 --- a/python-handy-archives.changes +++ b/python-handy-archives.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Mon Aug 12 09:12:23 UTC 2024 - Daniel Garcia + +- Add upstream patch to fix tests with pytest >= 8.1: + 0001-Use-reason-instead-of-msg-for-pytest.skip.patch + gh#domdfcoding/handy-archives#35 + ------------------------------------------------------------------- Fri Jul 26 07:14:29 UTC 2024 - Steve Kowalik diff --git a/python-handy-archives.spec b/python-handy-archives.spec index 8ff4553..032d8c9 100644 --- a/python-handy-archives.spec +++ b/python-handy-archives.spec @@ -33,6 +33,8 @@ URL: https://github.com/domdfcoding/handy-archives Source: https://github.com/domdfcoding/handy-archives/archive/refs/tags/v%{version}.tar.gz#/handy_archives-%{version}.tar.gz # PATCH-FIX-UPSTREAM gh#domdfcoding/handy-archives#3bc48dda6a06545ba53a829c6efb0f1a1b95349e Patch0: ignore-tarfile-deprecation-warning.patch +# PATCH-FIX-UPSTREAM: 0001-Use-reason-instead-of-msg-for-pytest.skip.patch gh#domdfcoding/handy-archives#35 +Patch1: 0001-Use-reason-instead-of-msg-for-pytest.skip.patch BuildRequires: %{python_module flit-core >= 3.2} BuildRequires: %{python_module pip} %if %{with test}