diff --git a/0001-Update-src-_pytest-assertion-rewrite.py.patch b/0001-Update-src-_pytest-assertion-rewrite.py.patch new file mode 100644 index 0000000000000000000000000000000000000000..3337919c87f5ec031c88b4d04b8cd362570d1a19 --- /dev/null +++ b/0001-Update-src-_pytest-assertion-rewrite.py.patch @@ -0,0 +1,28 @@ +From f86a87a315d6130bdc9cbc19e4fefcf69836d813 Mon Sep 17 00:00:00 2001 +From: Bruno Oliveira +Date: Fri, 4 Feb 2022 19:07:52 -0300 +Subject: [PATCH] Update src/_pytest/assertion/rewrite.py + +Co-authored-by: Ran Benita +--- + src/_pytest/assertion/rewrite.py | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/src/_pytest/assertion/rewrite.py b/src/_pytest/assertion/rewrite.py +index ac461ba39..f4a08a065 100644 +--- a/src/_pytest/assertion/rewrite.py ++++ b/src/_pytest/assertion/rewrite.py +@@ -44,7 +44,9 @@ from _pytest.stash import StashKey + if TYPE_CHECKING: + from _pytest.assertion import AssertionState + +-if sys.version_info >= (3, 10): ++if sys.version_info >= (3, 11): ++ from importlib.resources.readers import FileReader ++elif sys.version_info >= (3, 10): + from importlib.readers import FileReader + + assertstate_key = StashKey["AssertionState"]() +-- +2.33.0 + diff --git a/pytest.spec b/pytest.spec index dc4802eb24f376307962bb8669fd53c7bdeca8f1..878748c1604418f2a55fa9dc0aead40211b1175e 100644 --- a/pytest.spec +++ b/pytest.spec @@ -1,11 +1,13 @@ Name: pytest Version: 7.0.1 -Release: 1 +Release: 2 Summary: Simple powerful testing with Python License: MIT URL: https://pytest.org Source0: https://files.pythonhosted.org/packages/3e/2c/a67ad48759051c7abf82ce182a4e6d766de371b183182d2dde03089e8dfb/pytest-7.0.1.tar.gz +Patch0: 0001-Update-src-_pytest-assertion-rewrite.py.patch + %bcond_with tests %bcond_with optional_tests %bcond_without docs @@ -122,6 +124,9 @@ PYTHONPATH=%{buildroot}%{python3_sitelib} \ %doc CHANGELOG.html README.html CONTRIBUTING.html _htmldocs/html %changelog +* Wed Jan 18 2023 caofei - 7.0.1-2 +- Update src/_pytest/assertion/rewrite.py + * Tue Jul 12 2022 renliang16 - 7.0.1-1 - Upgrade package pytest to version 7.0.1