Skip to content

Commit 6e93dea

Browse files
committed
dev-python/attrs: add 23.2.0, drop 23.1.0
Closes: https://git.edevau.net/onkelbeh/HomeAssistantRepository/issues/3531 Signed-off-by: Andreas Billmeier <[email protected]>
1 parent 0108442 commit 6e93dea

File tree

4 files changed

+151
-7
lines changed

4 files changed

+151
-7
lines changed

dev-python/attrs/Manifest

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1-
DIST attrs-23.1.0.tar.gz 212878 BLAKE2B e562c22e7afdf50a9cf8deafc221d0438b8f3fb6b379c6eeb7f9e5ef182b69d5aa9bb886f4b7f69818ba2f1e9bf2ffa2831571a61c3521ab1c56f9c199b411a2 SHA512 1fff41da90668601b29412f71b4419dd9ffb9f2a8e54ce2199198557729167d6d7574954dc998818caba0d6bc378ab2ce068541df9c1c0d4ab1b071758d4a38a
2-
EBUILD attrs-23.1.0.ebuild 786 BLAKE2B 6c06fa9e13388570cf497baca933b53204ec881637055922005951cca046ee44d1b2271ac3b68e0add026ba5ca7a86f0eab51b48a138ad997126737380f77aa0 SHA512 712faabfd601ac6fb4a7a73c543bffab5f9169b52be5e80674d915024208b34c573566bce47c0c44690ee48e5c64adde464d738d816833e041ac9e1abe99d5b6
1+
AUX attrs-23.2.0-py313.patch 2882 BLAKE2B 81a30df9d7a438570256967df413347dafa3bee4611eef2d1e5d37c4d2a9c100b8464440ffe1dfe0d204f0e201e427201b6011da89283d63acfb554a2b309443 SHA512 e7da6587b59c9e213bf3f58324694780db4e583c129f42b6b4b2b475b4020ba5620aec96da2928ddb8054c225f49e0b1f46f996af2a6e0d78b4a47e4669945b2
2+
AUX attrs-23.2.0-pytest-8.patch 1459 BLAKE2B 3388ed0e6022b1df0634031155c93abec6cf67a46a912c6a8415356337deeae1264566b65858e88b901d1cca55a7fa4a38c6ad7ad099596396d8936337fd2c62 SHA512 10bbd4a8863fcda3be30e99137283d5112189900403018f5780511d0995bf120132bd248fdc42436912be28b09a69bda9974c97b3859c281167442cc38f32705
3+
DIST attrs-23.2.0.tar.gz 780820 BLAKE2B a06f4f17a81fc173c37661bcf518367a1cdc9a333d2783bd2cd1ac5f0a72bd20ec1afdd964e10255624bcfa027e3a152375cd21472c177428d29bd06b29984a1 SHA512 d8b178072a028b95d8424cd3ce0c8b4e6da8558fbcbcaaef91fbd03cf51e6190aa248aa0bff853e6f7c9595bbd5a8eef9d6f68ae2830cc1cc6d826ab0dda2378
4+
EBUILD attrs-23.2.0.ebuild 928 BLAKE2B a5228ff6062b2e258e13b8c0fdbfe7d716e946252dd1aeea8638bee240374373da11a8040f008178993293085b0e24721971a6196416990f03cdabfc8edc642b SHA512 c3ce1d47b0240a1f06926195f4791837e7d06e3faafc9f22b63a71e57939f93230444d4301d0c0e5e5bf033b8fa5af09a97cf1e77a7ae3c81e52644f3fec0d08
35
MISC metadata.xml 501 BLAKE2B 0c8c3d121da5f73089f336b14f4ca62254238bdc9b66d17593d0ff63333f9df233439525f5c7dcb19d5814134887d7e2b81709ab8d2300f55252cd7ebc75dea5 SHA512 c1e730e838b686eaa80878cea470ddc710349619ccf2f47107124508e79a86f6871ab11b51180f5f990fcbf90e0f0b3f93522f28d306be2cadf17db4e08c5d74

dev-python/attrs/attrs-23.1.0.ebuild renamed to dev-python/attrs/attrs-23.2.0.ebuild

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
EAPI=8
55

66
DISTUTILS_USE_PEP517=hatchling
7-
PYTHON_COMPAT=( python3_{10..12} )
7+
PYTHON_COMPAT=( python3_{11..13} )
88

99
inherit distutils-r1 pypi
1010

@@ -20,16 +20,21 @@ SLOT="0"
2020
KEYWORDS="amd64 arm arm64 x86"
2121

2222
BDEPEND="
23-
dev-python/hatch-fancy-pypi-readme[${PYTHON_USEDEP}]
23+
>=dev-python/hatch-fancy-pypi-readme-23.2.0[${PYTHON_USEDEP}]
2424
dev-python/hatch-vcs[${PYTHON_USEDEP}]
2525
test? (
2626
$(python_gen_impl_dep sqlite)
27-
$(python_gen_cond_dep '
28-
dev-python/cloudpickle[${PYTHON_USEDEP}]
29-
' python3_{10..11})
27+
dev-python/cloudpickle[${PYTHON_USEDEP}]
3028
dev-python/hypothesis[${PYTHON_USEDEP}]
3129
dev-python/zope-interface[${PYTHON_USEDEP}]
3230
)
3331
"
3432

3533
distutils_enable_tests pytest
34+
35+
PATCHES=(
36+
# https://github.com/python-attrs/attrs/pull/1249
37+
"${FILESDIR}/${P}-pytest-8.patch"
38+
# https://github.com/python-attrs/attrs/pull/1255
39+
"${FILESDIR}/${P}-py313.patch"
40+
)
Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
From f9ff9135b472c78a7333d6272c62b92217897464 Mon Sep 17 00:00:00 2001
2+
From: =?UTF-8?q?Lum=C3=ADr=20=27Frenzy=27=20Balhar?=
3+
4+
Date: Thu, 7 Mar 2024 10:23:46 +0100
5+
Subject: [PATCH] Fix test_ne in test_cmp.py for Python 3.13 (#1255)
6+
7+
* Fix test_ne in test_cmp.py for Python 3.13
8+
9+
Compiler in Python 3.13+ strips indents from docstrings
10+
so they need to be compared without it for new Pythons.
11+
12+
Fixes: https://github.com/python-attrs/attrs/issues/1228
13+
14+
* [pre-commit.ci] auto fixes from pre-commit.com hooks
15+
16+
for more information, see https://pre-commit.ci
17+
18+
---------
19+
20+
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
21+
---
22+
src/attr/_compat.py | 1 +
23+
tests/test_cmp.py | 11 +++++++----
24+
2 files changed, 8 insertions(+), 4 deletions(-)
25+
26+
diff --git a/src/attr/_compat.py b/src/attr/_compat.py
27+
index 46b05ca..9010047 100644
28+
--- a/src/attr/_compat.py
29+
+++ b/src/attr/_compat.py
30+
@@ -14,6 +14,7 @@ PY_3_8_PLUS = sys.version_info[:2] >= (3, 8)
31+
PY_3_9_PLUS = sys.version_info[:2] >= (3, 9)
32+
PY310 = sys.version_info[:2] >= (3, 10)
33+
PY_3_12_PLUS = sys.version_info[:2] >= (3, 12)
34+
+PY_3_13_PLUS = sys.version_info[:2] >= (3, 13)
35+
36+
37+
if sys.version_info < (3, 8):
38+
diff --git a/tests/test_cmp.py b/tests/test_cmp.py
39+
index 07bfc52..b84b66f 100644
40+
--- a/tests/test_cmp.py
41+
+++ b/tests/test_cmp.py
42+
@@ -4,10 +4,10 @@
43+
Tests for methods from `attrib._cmp`.
44+
"""
45+
46+
-
47+
import pytest
48+
49+
from attr._cmp import cmp_using
50+
+from attr._compat import PY_3_13_PLUS
51+
52+
53+
# Test parameters.
54+
@@ -54,6 +54,9 @@ order_ids = [c[0].__name__ for c in order_data]
55+
cmp_data = eq_data + order_data
56+
cmp_ids = eq_ids + order_ids
57+
58+
+# Compiler strips indents from docstrings in Python 3.13+
59+
+indent = "" if PY_3_13_PLUS else " " * 8
60+
+
61+
62+
class TestEqOrder:
63+
"""
64+
@@ -325,7 +328,7 @@ class TestDundersUnnamedClass:
65+
method = self.cls.__ne__
66+
assert method.__doc__.strip() == (
67+
"Check equality and either forward a NotImplemented or\n"
68+
- " return the result negated."
69+
+ f"{indent}return the result negated."
70+
)
71+
assert method.__name__ == "__ne__"
72+
73+
@@ -393,7 +396,7 @@ class TestDundersPartialOrdering:
74+
method = self.cls.__ne__
75+
assert method.__doc__.strip() == (
76+
"Check equality and either forward a NotImplemented or\n"
77+
- " return the result negated."
78+
+ f"{indent}return the result negated."
79+
)
80+
assert method.__name__ == "__ne__"
81+
82+
@@ -465,7 +468,7 @@ class TestDundersFullOrdering:
83+
method = self.cls.__ne__
84+
assert method.__doc__.strip() == (
85+
"Check equality and either forward a NotImplemented or\n"
86+
- " return the result negated."
87+
+ f"{indent}return the result negated."
88+
)
89+
assert method.__name__ == "__ne__"
90+
91+
--
92+
2.45.0
93+
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
From b9084fab02c009a593b604562a69f36a5915c8e5 Mon Sep 17 00:00:00 2001
2+
From: Denis Laxalde <[email protected]>
3+
Date: Sat, 2 Mar 2024 07:40:36 +0100
4+
Subject: [PATCH] Remove pytest.deprecated_call() in TestAssoc::test_unknown
5+
(#1249)
6+
7+
assoc() no longer raises a deprecation warning since commit
8+
22ae8473fb88d6e585b05c709e81e1a46398a649 but the 'with
9+
pytest.deprecated_call():' in that test was not removed then (in
10+
contrast with other test cases).
11+
12+
Maybe this got unnoticed due to a pytest bug?
13+
In any case, using pytest 8+ (and keeping deprecated_call()) shows that
14+
no warning is raised and the test fails.
15+
16+
Removing the upper bound on pytest in dev dependencies as tests now
17+
pass with pytest 8.0.
18+
19+
Fix #1233.
20+
21+
Co-authored-by: Hynek Schlawack <[email protected]>
22+
---
23+
pyproject.toml | 3 +--
24+
tests/test_funcs.py | 4 +---
25+
2 files changed, 2 insertions(+), 5 deletions(-)
26+
27+
diff --git a/tests/test_funcs.py b/tests/test_funcs.py
28+
index 044aaab..398ba35 100644
29+
--- a/tests/test_funcs.py
30+
+++ b/tests/test_funcs.py
31+
@@ -600,9 +600,7 @@ class TestAssoc:
32+
AttrsAttributeNotFoundError.
33+
"""
34+
# No generated class will have a four letter attribute.
35+
- with pytest.raises(
36+
- AttrsAttributeNotFoundError
37+
- ) as e, pytest.deprecated_call():
38+
+ with pytest.raises(AttrsAttributeNotFoundError) as e:
39+
assoc(C(), aaaa=2)
40+
41+
assert (f"aaaa is not an attrs attribute on {C!r}.",) == e.value.args
42+
--
43+
2.44.0
44+

0 commit comments

Comments
 (0)