diff --git a/backport-Remove-pytest-deprecated_call.patch b/backport-Remove-pytest-deprecated_call.patch new file mode 100644 index 0000000000000000000000000000000000000000..5ce8e7d7708684bb392dad3bc5251f0c689e7673 --- /dev/null +++ b/backport-Remove-pytest-deprecated_call.patch @@ -0,0 +1,40 @@ +From b9084fab02c009a593b604562a69f36a5915c8e5 Mon Sep 17 00:00:00 2001 +From: Denis Laxalde +Date: Sat, 2 Mar 2024 07:40:36 +0100 +Subject: [PATCH] Remove pytest.deprecated_call() in TestAssoc::test_unknown + (#1249) + +assoc() no longer raises a deprecation warning since commit +22ae8473fb88d6e585b05c709e81e1a46398a649 but the 'with +pytest.deprecated_call():' in that test was not removed then (in +contrast with other test cases). + +Maybe this got unnoticed due to a pytest bug? +In any case, using pytest 8+ (and keeping deprecated_call()) shows that +no warning is raised and the test fails. + +Removing the upper bound on pytest in dev dependencies as tests now +pass with pytest 8.0. + +Fix #1233. + +Co-authored-by: Hynek Schlawack +--- + tests/test_funcs.py | 4 +--- + 1 files changed, 1 insertion, 3 deletions(-) + +diff --git a/tests/test_funcs.py b/tests/test_funcs.py +index 044aaab2c..398ba3576 100644 +--- a/tests/test_funcs.py ++++ b/tests/test_funcs.py +@@ -600,9 +600,7 @@ def test_unknown(self, C): + AttrsAttributeNotFoundError. + """ + # No generated class will have a four letter attribute. +- with pytest.raises( +- AttrsAttributeNotFoundError +- ) as e, pytest.deprecated_call(): ++ with pytest.raises(AttrsAttributeNotFoundError) as e: + assoc(C(), aaaa=2) + + assert (f"aaaa is not an attrs attribute on {C!r}.",) == e.value.args diff --git a/python-attrs.spec b/python-attrs.spec index b83519179c22f7d201ca1cf6e49cf8bc2e1edbbe..1c23ae7a942cd0362b53d25a6a61fb5744df1280 100644 --- a/python-attrs.spec +++ b/python-attrs.spec @@ -9,10 +9,11 @@ object protocols. \ Name: python-attrs Summary: Python attributes without boilerplate Version: 23.2.0 -Release: 1 +Release: 2 License: MIT -URL: http://www.attrs.org/ -Source0: https://github.com/hynek/attrs/archive/%{version}/attrs-%{version}.tar.gz +URL: https://www.attrs.org/ +Source0: https://github.com/python-attrs/attrs/archive/%{version}/attrs-%{version}.tar.gz +Patch6001: backport-Remove-pytest-deprecated_call.patch BuildRequires: python%{python3_pkgversion}-setuptools BuildRequires: python%{python3_pkgversion}-devel @@ -60,6 +61,9 @@ PYTHONPATH=$RPM_BUILD_ROOT/%{python3_sitelib} py.test-3 -v %doc README.md %changelog +* Tue Jan 28 2025 Funda Wang - 23.2.0-2 +- fix test with latest pytest + * Mon Jan 29 2024 weihaohao - 23.2.0-1 - Update package to version 23.2.0 diff --git a/python-attrs.yaml b/python-attrs.yaml index e3622134fe8b22fac28acac49794ae83506e94f5..5f054e90197c1d1e9e8028c20d4b1ccad508591b 100644 --- a/python-attrs.yaml +++ b/python-attrs.yaml @@ -1,4 +1,4 @@ version_control: github -src_repo: hynek/attrs -tag_prefix: "^v" -seperator: "." +src_repo: python-attrs/attrs +tag_prefix: +separator: "."