Compare commits

..

No commits in common. "6dcec58dfea57e9994f87d586ccc652099d76d7c" and "23b93fe88bab0972c45751689e2066eccd5b43f2" have entirely different histories.

7 changed files with 72 additions and 73 deletions

25
0001-Fix-typo.patch Normal file
View File

@ -0,0 +1,25 @@
From 92ef1421b62cd7edcea8980f717b8758a51ac931 Mon Sep 17 00:00:00 2001
From: Hynek Schlawack <hs@ox.cx>
Date: Thu, 11 Aug 2022 07:11:18 +0200
Subject: [PATCH] Fix typo
---
CHANGELOG.rst | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index c61aeb5..6a8d02f 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -312,7 +312,7 @@ Backward-incompatible Changes
Changes
^^^^^^^
-- ``attr.define()`` et al now correct detect ``__eq__`` and ``__ne__``.
+- ``attr.define()`` et al now correctly detect ``__eq__`` and ``__ne__``.
`#671 <https://github.com/python-attrs/attrs/issues/671>`_
- ``attr.define()`` et al's hybrid behavior now also works correctly when arguments are passed.
`#675 <https://github.com/python-attrs/attrs/issues/675>`_
--
2.33.0

View File

@ -0,0 +1,33 @@
From 95e0c423ca31123a9537405fd2de5a1ee9f01b7c Mon Sep 17 00:00:00 2001
From: Hynek Schlawack <hs@ox.cx>
Date: Sat, 30 Jul 2022 13:23:03 +0200
Subject: [PATCH] Update .gitignore
---
.gitignore | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/.gitignore b/.gitignore
index d054dc6..f5c97f1 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,12 +2,16 @@
*.pyc
.cache
.coverage*
+.direnv
+.envrc
.hypothesis
.mypy_cache
.pytest_cache
.tox
+.vscode
build
dist
docs/_build/
htmlcov
pip-wheel-metadata
+tmp
--
2.33.0

BIN
attrs-22.1.0.tar.gz Normal file

Binary file not shown.

Binary file not shown.

View File

@ -1,40 +0,0 @@
From b9084fab02c009a593b604562a69f36a5915c8e5 Mon Sep 17 00:00:00 2001
From: Denis Laxalde <denis@laxalde.org>
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 <hs@ox.cx>
---
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

View File

@ -5,15 +5,17 @@ object protocols. \
%global modname attrs
%bcond_without tests
%bcond_with tests
Name: python-attrs
Summary: Python attributes without boilerplate
Version: 23.2.0
Release: 2
Version: 22.1.0
Release: 3
License: MIT
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
URL: http://www.attrs.org/
Source0: https://github.com/hynek/attrs/archive/%{version}/attrs-%{version}.tar.gz
Patch0: 0001-Update-.gitignore.patch
Patch1: 0001-Fix-typo.patch
BuildRequires: python%{python3_pkgversion}-setuptools
BuildRequires: python%{python3_pkgversion}-devel
@ -25,9 +27,6 @@ BuildRequires: python%{python3_pkgversion}-hypothesis python%{python3_pkgversio
BuildArch: noarch
BuildRequires: python3-pip python3-wheel python3-hatchling python3-hatch-fancy-pypi-readme
BuildRequires: python3-hatchling python3-hatch-vcs python3-pbr
%description
%{_description}
@ -43,10 +42,10 @@ Summary: %{summary}
%autosetup -p1 -n attrs-%{version}
%build
%pyproject_build
%py3_build
%install
%pyproject_install
%py3_install
%if %{with tests}
%check
@ -58,27 +57,9 @@ PYTHONPATH=$RPM_BUILD_ROOT/%{python3_sitelib} py.test-3 -v
%{python3_sitelib}/*
%files help
%doc README.md
%doc AUTHORS.rst README.rst
%changelog
* Tue Jan 28 2025 Funda Wang <fundawang@yeah.net> - 23.2.0-2
- fix test with latest pytest
* Mon Jan 29 2024 weihaohao <weihaohao2@huawei.com> - 23.2.0-1
- Update package to version 23.2.0
* Sat Jul 29 2023 zhuofeng <zhuofeng2@huawei.com> - 22.2.0-1
- update version to 22.2.0
* Thu Feb 16 2023 tanyulong <tanyulong@kylinos.cn> - 22.1.0-6
- enable check
* Fri Jan 13 2023 caofei <caofei@xfusion.com> - 22.1.0-5
- Fix minor stub issues
* Fri Jan 13 2023 caofei <caofei@xfusion.com> - 22.1.0-4
- Fix type docstring
* Mon Jan 9 2023 caofei <caofei@xfusion.com> - 22.1.0-3
- Fix typo

View File

@ -1,4 +1,4 @@
version_control: github
src_repo: python-attrs/attrs
tag_prefix:
separator: "."
src_repo: hynek/attrs
tag_prefix: "^v"
seperator: "."