diff --git a/python-pytest-xdist.changes b/python-pytest-xdist.changes index d5e2412..bb70d29 100644 --- a/python-pytest-xdist.changes +++ b/python-pytest-xdist.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Nov 26 01:32:36 UTC 2025 - Steve Kowalik + +- Add patch support-pytest-9.patch: + * Support Pytest 9 changes. + ------------------------------------------------------------------- Thu Jul 17 19:35:11 UTC 2025 - Dirk Müller diff --git a/python-pytest-xdist.spec b/python-pytest-xdist.spec index 264eaa0..5b79ec6 100644 --- a/python-pytest-xdist.spec +++ b/python-pytest-xdist.spec @@ -24,6 +24,8 @@ Summary: Distributed testing and loop-on-failing for py.test License: MIT URL: https://github.com/pytest-dev/pytest-xdist Source0: https://files.pythonhosted.org/packages/source/p/pytest-xdist/pytest_xdist-%{version}.tar.gz +# PATCH-FIX-UPSTREAM gh#pytest-dev/pytest-xdist#1266 & gh#pytest-dev/pytest-xdist#1272 +Patch0: support-pytest-9.patch BuildRequires: %{python_module base >= 3.7} BuildRequires: %{python_module execnet >= 1.1} BuildRequires: %{python_module filelock} @@ -83,6 +85,6 @@ sed -i 's/\r//' README.rst %doc CHANGELOG.rst README.rst %license LICENSE %{python_sitelib}/xdist -%{python_sitelib}/pytest_xdist-%{version}*-info +%{python_sitelib}/pytest_xdist-%{version}.dist-info %changelog diff --git a/support-pytest-9.patch b/support-pytest-9.patch new file mode 100644 index 0000000..0e8a43f --- /dev/null +++ b/support-pytest-9.patch @@ -0,0 +1,83 @@ +From 9c0a03f70b7be0a9a7d4b7d3e1692b77027f323e Mon Sep 17 00:00:00 2001 +From: Bruno Oliveira +Date: Sat, 1 Nov 2025 20:10:43 -0300 +Subject: [PATCH 1/2] Update build-and-inspect-python-package to v2.14 + +v2.13 was breaking in a few CI builds. +--- + .github/workflows/deploy.yml | 2 +- + .github/workflows/test.yml | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +Index: pytest_xdist-3.8.0/.github/workflows/deploy.yml +=================================================================== +--- pytest_xdist-3.8.0.orig/.github/workflows/deploy.yml ++++ pytest_xdist-3.8.0/.github/workflows/deploy.yml +@@ -19,7 +19,7 @@ jobs: + - uses: actions/checkout@v4 + + - name: Build and Check Package +- uses: hynek/build-and-inspect-python-package@v2.13 ++ uses: hynek/build-and-inspect-python-package@v2.14 + + deploy: + needs: package +Index: pytest_xdist-3.8.0/.github/workflows/test.yml +=================================================================== +--- pytest_xdist-3.8.0.orig/.github/workflows/test.yml ++++ pytest_xdist-3.8.0/.github/workflows/test.yml +@@ -22,7 +22,7 @@ jobs: + steps: + - uses: actions/checkout@v4 + - name: Build and Check Package +- uses: hynek/build-and-inspect-python-package@v2.13 ++ uses: hynek/build-and-inspect-python-package@v2.14 + + test: + +Index: pytest_xdist-3.8.0/testing/test_newhooks.py +=================================================================== +--- pytest_xdist-3.8.0.orig/testing/test_newhooks.py ++++ pytest_xdist-3.8.0/testing/test_newhooks.py +@@ -115,7 +115,7 @@ class TestCrashItem: + res.stdout.fnmatch_lines_random(["*HOOK: pytest_handlecrashitem"]) + res.stdout.fnmatch_lines( + [ +- "FAILED test_handlecrashitem_one.py::test_b", +- "FAILED test_handlecrashitem_one.py::test_b", ++ "FAILED test_handlecrashitem_one.py::test_b*", ++ "FAILED test_handlecrashitem_one.py::test_b*", + ] + ) +Index: pytest_xdist-3.8.0/testing/test_remote.py +=================================================================== +--- pytest_xdist-3.8.0.orig/testing/test_remote.py ++++ pytest_xdist-3.8.0/testing/test_remote.py +@@ -378,6 +378,11 @@ def test_remote_mainargv(pytester: pytes + + + def test_remote_usage_prog(pytester: pytest.Pytester) -> None: ++ if pytest.version_tuple[:2] >= (9, 0): ++ get_optparser_expr = "get_config_parser.optparser" ++ else: ++ get_optparser_expr = "get_config_parser._getparser()" ++ + pytester.makeconftest( + """ + import pytest +@@ -394,12 +399,12 @@ def test_remote_usage_prog(pytester: pyt + """ + ) + pytester.makepyfile( +- """ ++ f""" + import sys + + def test(get_config_parser, request): +- get_config_parser._getparser().error("my_usage_error") +- """ ++ {get_optparser_expr}.error("my_usage_error") ++ """ + ) + + result = pytester.runpytest_subprocess("-n1")