#53 [WIP] Update to 8.1.1
Opened a month ago by thrnciar. Modified 2 days ago
rpms/ thrnciar/pytest update-to-8.1.1  into  rawhide

file removed
-58
@@ -1,58 +0,0 @@ 

- From 052d1453544511c72674c20b47723e401fd0f8f3 Mon Sep 17 00:00:00 2001

- From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro@hroncok.cz>

- 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:

@@ -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(

file modified
+1 -5
@@ -1,5 +1,5 @@ 

  Name:           pytest

- %global base_version 7.4.3

+ %global base_version 8.2.0

  #global prerelease ...

  Version:        %{base_version}%{?prerelease:~%{prerelease}}

  Release:        %autorelease
@@ -7,10 +7,6 @@ 

  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

file modified
+1 -1
@@ -1,1 +1,1 @@ 

- SHA512 (pytest-7.4.3.tar.gz) = 1b80e9b7e0ba8fe966d6658aa72d49d101190f255acd9eb81d66142327535b7108c921055d8fe3e330e3ff4163aa03d7c67b2807d433dd9e1799be6a59b208c9

+ SHA512 (pytest-8.2.0-1.fc41.src.rpm) = 1ba3144481df39903b297b46a5d3b55f5ecb839ef808df5ccef95a1871e501c7b3cd2389f6a04b4f8401e2fd97b6b7926fa7dd4d466c8390d713647824d450ec

Impact check: https://copr.fedorainfracloud.org/coprs/thrnciar/pytest/packages/
Control COPR: https://copr.fedorainfracloud.org/coprs/thrnciar/pytest-7.4.3/packages/

There is a lot of failures. More than 100 packages failed with new pytest, but succeeded with the old one.

cffconvert
cloud-init
copr-backend
copr-frontend
copr-rpmbuild
fedmsg
git-up
h5py
httpie - PR ready
ipython
jrnl
mu
pg_activity - error in python-pytest-posgresql
python-aiohttp-cors
python-alembic
python-APScheduler
python-ase
python-astropy
python-atpublic
python-attrs - PR merged
python-aws-sam-translator
python-bluepyopt
python-boto3
python-chalice
python-contextily - FTBFS in rawhide
python-cssutils
python-dbus-next - PR ready
python-dirhash
python-django-extensions
python-earthpy - problem in python-rasterio
python-ecdsa
python-efel
python-fastjsonschema
python-fiona
python-fslpy
python-geopandas - problem in python-fiona
python-geoplot - problem in python-rasterio
python-glob2
python-graphviz
python-hid-parser
python-ipykernel
python-ipywidgets
python-josepy
python-kombu
python-lexicon
python-libpysal
python-mapclassify
python-marshmallow-enum
python-mathics-pygments
python-mirrors-countme
python-mne
python-mplcursors
python-networkx
python-nibabel
python-nikola
python-notebook
python-oci
python-openapi-core
python-opentelemetry
python-papermill
python-paramiko
python-parsel
python-pem
python-pint
python-prettytable - PR ready
python-pydantic
python-pymeeus
python-pynwb
python-pysaml2
python-pytest-cases
python-pytest-forked
python-pytest-lazy-fixture - PR ready
python-pytest-mpi
python-pytest-postgresql
python-pytest-relaxed
python-pytest-xdist
python-qudida
python-rasterio
python-remoto
python-requests
python-requests-credssp
python-responses
python-sentry-sdk
python-service-identity
python-sybil
python-textual
python-tpm2-pytss
python-trustme
python-uranium
python-uvicorn
python-vine
python-virtualenv
python-werkzeug
python-willow
rpy
scipy
thefuck
yt-dlp
yubikey-manager

Build failed. More information on how to proceed and troubleshoot errors available at https://fedoraproject.org/wiki/Zuul-based-ci
https://fedora.softwarefactory-project.io/zuul/buildset/5c27504420154e85b4f243ec879d8fe8

There is a lot of failures. 104 packages failed with new pytest, but succeeded with the old one.

I suspected that :(

We can package pytest7 compact package if needed. Or we can try tracking this via bugzillas?

Just noting that in the next update for python-openapi-core, I actually need to patch out pytest 8 support to preserve pytest 7 compatibility – but pytest 8 is supported upstream, I confirmed all the tests pass with the pytest 8 package from COPR without the patch, and the patch for pytest 7 is in a single easily-reverted commit.

1 new commit added

  • Update to 8.2.0
2 days ago

Merge Failed.

This change or one of its cross-repo dependencies was unable to be automatically merged with the current state of its repository. Please rebase the change and upload a new patchset.
Warning:
Error merging src.fedoraproject.org/rpms/pytest for 53,0ccf317

rebased onto 047fbca

2 days ago

Build failed. More information on how to proceed and troubleshoot errors available at https://fedoraproject.org/wiki/Zuul-based-ci
https://fedora.softwarefactory-project.io/zuul/buildset/748b12e32a8a4d7eaa916fd47fb1007d