From 047fbcaf18ef4bd2bbc5897f13a51383183dfcb0 Mon Sep 17 00:00:00 2001 From: Tomáš Hrnčiar Date: Apr 29 2024 13:17:28 +0000 Subject: [PATCH 1/3] Update to 8.1.1 Fixes: rhbz#2256331 --- diff --git a/11611.patch b/11611.patch deleted file mode 100644 index 0e2723e..0000000 --- a/11611.patch +++ /dev/null @@ -1,58 +0,0 @@ -From 052d1453544511c72674c20b47723e401fd0f8f3 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= -Date: Mon, 13 Nov 2023 09:45:05 +0100 -Subject: [PATCH] XFAIL TestLocalPath.test_make_numbered_dir_multiprocess_safe - -The tested py.path.local.make_numbered_dir function is *not* -multiprocess safe, because is uses os.listdir which itself is not. - -The os.listdir documentation explicitly states that: - -> If a file is removed from or added to the directory during the call -> of this function, whether a name for that file be included is unspecified. - -This can lead to a race when: - - 1. process A attempts to create directory N - 2. the creation fails, as another process already created it in the meantime - 3. process A calls listdir to determine a more recent maxnum - 4. processes B+ repeatedly create newer directories and they delete directory N - 5. process A doesn't have directory N or any newer directory in listdir result - 6. process A attempts to create directory N again and raises - -For details, see https://github.com/pytest-dev/pytest/issues/11603#issuecomment-1805708144 -and bellow. - -Additionally, the test itself has a race in batch_make_numbered_dirs. -When this functions attempts to write to repro-N/foo, -repro-N may have already been removed by another process. - -For details, see https://github.com/pytest-dev/pytest/issues/11603#issuecomment-1804714313 -and bellow. - ---- - -The tested py.path.local.make_numbered_dir function is not used in pytest. -There is a different implementation in _pytest.pathlib. - -We plan to remove this module eventually anyway. - -Closes https://github.com/pytest-dev/pytest/issues/11603 ---- - testing/_py/test_local.py | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/testing/_py/test_local.py b/testing/_py/test_local.py -index aebee380cb..77a9838cf1 100644 ---- a/testing/_py/test_local.py -+++ b/testing/_py/test_local.py -@@ -868,6 +868,9 @@ def test_fspath_protocol_other_class(self, fake_fspath_obj): - py_path.strpath, str_path - ) - -+ @pytest.mark.xfail( -+ reason="#11603", raises=(error.EEXIST, error.ENOENT), strict=False -+ ) - def test_make_numbered_dir_multiprocess_safe(self, tmpdir): - # https://github.com/pytest-dev/py/issues/30 - with multiprocessing.Pool() as pool: diff --git a/pytest-7.1.3-fix-xfails.patch b/pytest-7.1.3-fix-xfails.patch deleted file mode 100644 index 1431e23..0000000 --- a/pytest-7.1.3-fix-xfails.patch +++ /dev/null @@ -1,48 +0,0 @@ -diff -up pytest-7.1.3/testing/test_debugging.py.orig pytest-7.1.3/testing/test_debugging.py ---- pytest-7.1.3/testing/test_debugging.py.orig 2022-09-02 13:12:55.000000000 +0200 -+++ pytest-7.1.3/testing/test_debugging.py 2022-09-05 16:40:54.921946205 +0200 -@@ -353,7 +353,7 @@ class TestPDB: - result = pytester.runpytest_subprocess("--pdb", ".") - result.stdout.fnmatch_lines(["-> import unknown"]) - -- @pytest.mark.xfail(reason="#10042") -+ @pytest.mark.xfail(reason="#10042", strict=False) - def test_pdb_interaction_capturing_simple(self, pytester: Pytester) -> None: - p1 = pytester.makepyfile( - """ -@@ -522,7 +522,7 @@ class TestPDB: - assert "BdbQuit" not in rest - assert "UNEXPECTED EXCEPTION" not in rest - -- @pytest.mark.xfail(reason="#10042") -+ @pytest.mark.xfail(reason="#10042", strict=False) - def test_pdb_interaction_capturing_twice(self, pytester: Pytester) -> None: - p1 = pytester.makepyfile( - """ -@@ -558,7 +558,7 @@ class TestPDB: - assert "1 failed" in rest - self.flush(child) - -- @pytest.mark.xfail(reason="#10042") -+ @pytest.mark.xfail(reason="#10042", strict=False) - def test_pdb_with_injected_do_debug(self, pytester: Pytester) -> None: - """Simulates pdbpp, which injects Pdb into do_debug, and uses - self.__class__ in do_continue. -@@ -1003,7 +1003,7 @@ class TestDebuggingBreakpoints: - assert "reading from stdin while output" not in rest - TestPDB.flush(child) - -- @pytest.mark.xfail(reason="#10042") -+ @pytest.mark.xfail(reason="#10042",strict=False) - def test_pdb_not_altered(self, pytester: Pytester) -> None: - p1 = pytester.makepyfile( - """ -@@ -1163,7 +1163,7 @@ def test_quit_with_swallowed_SystemExit( - - - @pytest.mark.parametrize("fixture", ("capfd", "capsys")) --@pytest.mark.xfail(reason="#10042") -+@pytest.mark.xfail(reason="#10042", strict=False) - def test_pdb_suspends_fixture_capturing(pytester: Pytester, fixture: str) -> None: - """Using "-s" with pytest should suspend/resume fixture capturing.""" - p1 = pytester.makepyfile( diff --git a/pytest.spec b/pytest.spec index 3f0a7da..328513c 100644 --- a/pytest.spec +++ b/pytest.spec @@ -1,5 +1,5 @@ Name: pytest -%global base_version 7.4.3 +%global base_version 8.1.1 #global prerelease ... Version: %{base_version}%{?prerelease:~%{prerelease}} Release: %autorelease @@ -7,10 +7,6 @@ Summary: Simple powerful testing with Python License: MIT URL: https://pytest.org Source: %{pypi_source pytest %{base_version}%{?prerelease}} -# see https://github.com/pytest-dev/pytest/issues/10042#issuecomment-1237132867 -Patch: pytest-7.1.3-fix-xfails.patch -# XFAIL TestLocalPath.test_make_numbered_dir_multiprocess_safe -Patch: https://github.com/pytest-dev/pytest/pull/11611.patch # Remove -s from Python shebang, # ensure that packages installed with pip to user locations are testable diff --git a/sources b/sources index 3a54a98..a52f723 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pytest-7.4.3.tar.gz) = 1b80e9b7e0ba8fe966d6658aa72d49d101190f255acd9eb81d66142327535b7108c921055d8fe3e330e3ff4163aa03d7c67b2807d433dd9e1799be6a59b208c9 +SHA512 (pytest-8.1.1.tar.gz) = f1a9f69cd4eca3ab36c36bc666bf70b099125ed6e17b89d13554c3f13b100d05abfd0b35516660d00ca4fb9eca81164ab02bc8f7a9a8d90fd4302bf399cd88c0 From 6933bbe459f243e01b24b029dedfd04297d25160 Mon Sep 17 00:00:00 2001 From: Tomáš Hrnčiar Date: Apr 29 2024 13:18:09 +0000 Subject: [PATCH 2/3] Update to 8.2.0 --- diff --git a/pytest.spec b/pytest.spec index 328513c..49f61c9 100644 --- a/pytest.spec +++ b/pytest.spec @@ -1,5 +1,5 @@ Name: pytest -%global base_version 8.1.1 +%global base_version 8.2.0 #global prerelease ... Version: %{base_version}%{?prerelease:~%{prerelease}} Release: %autorelease diff --git a/sources b/sources index a52f723..e0dfd7b 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pytest-8.1.1.tar.gz) = f1a9f69cd4eca3ab36c36bc666bf70b099125ed6e17b89d13554c3f13b100d05abfd0b35516660d00ca4fb9eca81164ab02bc8f7a9a8d90fd4302bf399cd88c0 +SHA512 (pytest-8.2.0-1.fc41.src.rpm) = 1ba3144481df39903b297b46a5d3b55f5ecb839ef808df5ccef95a1871e501c7b3cd2389f6a04b4f8401e2fd97b6b7926fa7dd4d466c8390d713647824d450ec From 9c8ab415b69ec7895a41c48aa6b6b9e668ebfcd7 Mon Sep 17 00:00:00 2001 From: Tomáš Hrnčiar Date: May 20 2024 08:16:01 +0000 Subject: [PATCH 3/3] Update to 8.2.1 --- diff --git a/pytest.spec b/pytest.spec index 49f61c9..0bb0687 100644 --- a/pytest.spec +++ b/pytest.spec @@ -1,5 +1,5 @@ Name: pytest -%global base_version 8.2.0 +%global base_version 8.2.1 #global prerelease ... Version: %{base_version}%{?prerelease:~%{prerelease}} Release: %autorelease diff --git a/sources b/sources index e0dfd7b..5a1bb10 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pytest-8.2.0-1.fc41.src.rpm) = 1ba3144481df39903b297b46a5d3b55f5ecb839ef808df5ccef95a1871e501c7b3cd2389f6a04b4f8401e2fd97b6b7926fa7dd4d466c8390d713647824d450ec +SHA512 (pytest-8.2.1.tar.gz) = c837b2031c2b198345ce090cc5fcbebd2640a521131a60b882250b70825dc85e5072403a80e9a73f62e429156b57dce405d8400255457c55b14d4a2f700c5331