#28 Update to 7.1.2
Merged 2 years ago by churchyard. Opened 2 years ago by lbalhar.
rpms/ lbalhar/pytest rawhide  into  rawhide

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

- From 0ebfa1d76dc09e075b854176873127553e6dfa1b Mon Sep 17 00:00:00 2001

- From: Zac Hatfield-Dodds <zac.hatfield.dodds@gmail.com>

- Date: Sun, 20 Mar 2022 21:01:26 -0700

- Subject: [PATCH] Fix CI for Python 3.11

- 

- Getting the current working directory has no side-effects, so these context managers were no-ops.

- Discovered because Path.__enter__ is deprecated in Python 3.11, for removal in 3.13.

- ---

-  testing/test_collection.py | 12 ++++--------

-  1 file changed, 4 insertions(+), 8 deletions(-)

- 

- diff --git a/testing/test_collection.py b/testing/test_collection.py

- index a943a44d22..aa3bf7ba58 100644

- --- a/testing/test_collection.py

- +++ b/testing/test_collection.py

- @@ -660,8 +660,7 @@ def test_pkgfile(self, pytester: Pytester) -> None:

-          subdir = tmp_path.joinpath("subdir")

-          x = ensure_file(subdir / "x.py")

-          ensure_file(subdir / "__init__.py")

- -        with subdir.cwd():

- -            config = pytester.parseconfigure(x)

- +        config = pytester.parseconfigure(x)

-          col = pytester.getnode(config, x)

-          assert col is not None

-          assert col.name == "x.py"

- @@ -1188,8 +1187,7 @@ def test_1():

-          """

-          % (str(subdir),)

-      )

- -    with pytester.path.cwd():

- -        result = pytester.runpytest()

- +    result = pytester.runpytest()

-      result.stdout.fnmatch_lines(["*1 passed in*"])

-      assert result.ret == 0

-  

- @@ -1200,8 +1198,7 @@ def test_1():

-          testpaths = .

-      """

-      )

- -    with pytester.path.cwd():

- -        result = pytester.runpytest("--collect-only")

- +    result = pytester.runpytest("--collect-only")

-      result.stdout.fnmatch_lines(["collected 1 item"])

-  

-  

- @@ -1224,8 +1221,7 @@ def test_collect_pyargs_with_testpaths(

-          )

-      )

-      monkeypatch.setenv("PYTHONPATH", str(pytester.path), prepend=os.pathsep)

- -    with root.cwd():

- -        result = pytester.runpytest_subprocess()

- +    result = pytester.runpytest_subprocess()

-      result.stdout.fnmatch_lines(["*1 passed in*"])

-  

-  

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

  Name:           pytest

- %global base_version 7.0.1

+ %global base_version 7.1.2

  #global prerelease ...

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

  Release:        1%{?dist}
@@ -8,14 +8,6 @@ 

  URL:            https://pytest.org

  Source:         %{pypi_source pytest %{base_version}%{?prerelease}}

  

- # Fix build for Python 3.11

- # Fixes https://bugzilla.redhat.com/2069153

- # Merged upstream

- # Getting the current working directory has no side-effects,

- # so these context managers were no-ops.

- # Tests failed because Path.__enter__ is deprecated in Python 3.11.

- Patch:          https://github.com/pytest-dev/pytest/pull/9800.patch

- 

  # When building pytest for the first time with new Python version

  # we might not yet have all the BRs, those conditionals allow us to do that.

  
@@ -164,6 +156,10 @@ 

  

  

  %changelog

+ * Fri Apr 08 2022 Lumír Balhar <lbalhar@redhat.com> - 7.1.2-1

+ - Update to 7.1.2

+ Resolves: rhbz#2063549

+ 

  * Tue Mar 01 2022 Miro Hrončok <mhroncok@redhat.com> - 7.0.1-1

  - Update to 7.0.1

  - Fixes: rhbz#2050629

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

- SHA512 (pytest-7.0.1.tar.gz) = 21493717159a64fe6467bd096b578b127d81438d04f5b03ba2f4047237054f865a1f50a4e291b9d95b1a144f59bc7a8b3a00008493f4fb4f14bff7fb65c5edc2

+ SHA512 (pytest-7.1.2.tar.gz) = e61c9b0a8fc053626da307d6bac1f5caab451c4948ef7c7f2e2f991c3433a55f81ec0d9412fca646c02f22e695c71e873ee48fc0ab0aad337ce01b70628df494

First 50 randomly selected dependant packages are built in: https://copr.fedorainfracloud.org/coprs/lbalhar/pytest/builds/
2 failed:

  • python-backrefs fails also in Koschei
  • python-azure-mgmt-maps has broken dependencies

I'm gonna build other batches of packages to check it.

Build succeeded.

So far, none of the 15 failed builds seems to be related to this update. I'm gonna build the rest of the packages and we'll see.

70 packages failed to build and even though 7 of them were built successfully in the control copr, I believe that this change is not to blame.

Also, it builds fine with 3.11.

I think we are ready to merge.

The 7 packages are:

python-alembic
python-autopage
python-azure-appconfiguration
python-azure-mgmt-databoxedge
python-markdown-it-py
python-PyMuPDF
votca

I'd be extra careful with python-markdown-it-py -- there is a weird test failure there.

What I usually do is to rebuild them once again in the "pytest" copr to see if the failure wasn't just flaky.

I'd be extra careful with python-markdown-it-py -- there is a weird test failure there.

markdown-it-py failure is caused by the old version of mdurl installed in the buildroot. It's green now.

I needed to test something wrt copr, so I used this PR to do it:

https://copr.fedorainfracloud.org/coprs/churchyard/pytest-7.1/builds/

Only python-autopage failed, I resubmitted it a couple of times to eliminate flakiness, but I'll have to go offline now.

autopage seems to build in your control copr as well as in Koji. possibly impacted by pytest 7.1

Only python-autopage failed, I resubmitted it a couple of times to eliminate flakiness, but I'll have to go offline now.

All five failed with the same errors. I'm gonna take a closer look at what is wrong here. When I run upstream tests in a venv with the latest pytest, all of them pass.

The problem is not in pytest but in copr. They all pass in mock with the latest pytest so I guess the reason they fail is in some UI settings in copr.

BTW please git rm 9800.patch

rebased onto fd2af67

2 years ago

Patch removed. I'm gonna ship it.

Build succeeded.

Patch removed. I'm gonna ship it.

I won't, I don't have the rights to merge this.

Pull-Request has been merged by churchyard

2 years ago

Building pytest-7.1.2-1.fc37 for rawhide
Created task: 86529878
Task info: https://koji.fedoraproject.org/koji/taskinfo?taskID=86529878