Update to 7.1.2
This commit is contained in:
parent
4132cc9835
commit
fd2af6790f
55
9800.patch
55
9800.patch
@ -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*"])
|
|
||||||
|
|
||||||
|
|
14
pytest.spec
14
pytest.spec
@ -1,5 +1,5 @@
|
|||||||
Name: pytest
|
Name: pytest
|
||||||
%global base_version 7.0.1
|
%global base_version 7.1.2
|
||||||
#global prerelease ...
|
#global prerelease ...
|
||||||
Version: %{base_version}%{?prerelease:~%{prerelease}}
|
Version: %{base_version}%{?prerelease:~%{prerelease}}
|
||||||
Release: 1%{?dist}
|
Release: 1%{?dist}
|
||||||
@ -8,14 +8,6 @@ License: MIT
|
|||||||
URL: https://pytest.org
|
URL: https://pytest.org
|
||||||
Source: %{pypi_source pytest %{base_version}%{?prerelease}}
|
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
|
# 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.
|
# we might not yet have all the BRs, those conditionals allow us to do that.
|
||||||
|
|
||||||
@ -164,6 +156,10 @@ find %{buildroot}%{python3_sitelib} \
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%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
|
* Tue Mar 01 2022 Miro Hrončok <mhroncok@redhat.com> - 7.0.1-1
|
||||||
- Update to 7.0.1
|
- Update to 7.0.1
|
||||||
- Fixes: rhbz#2050629
|
- Fixes: rhbz#2050629
|
||||||
|
2
sources
2
sources
@ -1 +1 @@
|
|||||||
SHA512 (pytest-7.0.1.tar.gz) = 21493717159a64fe6467bd096b578b127d81438d04f5b03ba2f4047237054f865a1f50a4e291b9d95b1a144f59bc7a8b3a00008493f4fb4f14bff7fb65c5edc2
|
SHA512 (pytest-7.1.2.tar.gz) = e61c9b0a8fc053626da307d6bac1f5caab451c4948ef7c7f2e2f991c3433a55f81ec0d9412fca646c02f22e695c71e873ee48fc0ab0aad337ce01b70628df494
|
||||||
|
Loading…
Reference in New Issue
Block a user