summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorTim Orling <tim.orling@konsulko.com>2024-08-13 09:01:44 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2024-08-15 14:51:55 +0100
commit1790dcba63d5bb19a8a4d6e9d64a9f8202be752d (patch)
treea492c4f3b73927a485adc063d15c9167226fc939 /meta
parent101e38a8bdca7c21f92b5ad4c516025fe99507ff (diff)
downloadpoky-1790dcba63d5bb19a8a4d6e9d64a9f8202be752d.tar.gz
python3-attrs: upgrade 23.2.0 -> 24.2.0
* Drop 0001-test_funcs-skip-test_unknown-for-pytest-8.patch fixed upstream in https://github.com/python-attrs/attrs/pull/1249 * Drop 0001-conftest.py-disable-deadline.patch upstream wanted to try doubling the deadline time https://github.com/python-attrs/attrs/pull/1252 from 200 ms default to 400 ms (we saw some times a bit greater than 200 ms) https://www.attrs.org/en/stable/changelog.html 24.2.0 - 2024-08-06 * Deprecations - Given the amount of warnings raised in the broader ecosystem, we’ve decided to only soft-deprecate the hash argument to @define / @attr.s. Please don’t use it in new code, but we don’t intend to remove it anymore. #1330 * Changes - attrs.converters.pipe() (and its syntactic sugar of passing a list for attrs.field()’s / attr.ib()’s converter argument) works again when passing attrs.setters.convert to on_setattr (which is default for attrs.define). #1328 - Restored support for PEP 649 / 749-implementing Pythons – currently 3.14-dev. #1329 24.1.0 - 2024-08-03 * Backwards-incompatible Changes - attrs.evolve() doesn’t accept the inst argument as a keyword argument anymore. Pass it as the first positional argument instead. #1264 - attrs.validators.provides() has been removed. The removed code is available as a gist for convenient copy and pasting. #1265 - All packaging metadata except from __version__ and __version_info__ has been removed from the attr and attrs modules (for example, attrs.__url__). - Please use importlib.metadata or importlib-metadata instead. #1268 - The generated __eq__ methods have been sped up significantly by generating a chain of attribute comparisons instead of constructing and comparing tuples. This change arguably makes the behavior more correct, but changes it if an attribute compares equal by identity but not value, like float('nan'). #1310 * Deprecations - The repr_ns argument to attr.s is now deprecated. It was a workaround for nested classes in Python 2 and is pointless in Python 3. #1263 - The hash argument to @attr.s, @attrs.define, and make_class() is now deprecated in favor of unsafe_hash, as defined by PEP 681. #1323 * Changes - Allow original slotted functools.cached_property classes to be cleaned by garbage collection. Allow super() calls in slotted cached properties. #1221 - Our type stubs now use modern type notation and are organized such that VS Code’s quick-fix prefers the attrs namespace. #1234 - Preserve AttributeError raised by properties of slotted classes with functools.cached_properties. #1253 - It is now possible to wrap a converter into an attrs.Converter and get the current instance and/or the current field definition passed into the converter callable. - Note that this is not supported by any type checker, yet. #1267 - attrs.make_class() now populates the __annotations__ dict of the generated class, so that attrs.resolve_types() can resolve them. #1285 - Added the attrs.validators.or_() validator. #1303 - The combination of a __attrs_pre_init__ that takes arguments, a kw-only field, and a default on that field does not crash anymore. #1319 - attrs.validators.in_() now transforms certain unhashable options to tuples to keep the field hashable. - This allows fields that use this validator to be used with, for example, attrs.filters.include(). #1320 - If a class has an inherited method called __attrs_init_subclass__, it is now called once the class is done assembling. - This is a replacement for Python’s __init_subclass__ and useful for registering classes, and similar. #1321 (From OE-Core rev: b8c45e8accdb7d74646fa15b775034eb3dcbdcd1) Signed-off-by: Tim Orling <tim.orling@konsulko.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-devtools/python/python3-attrs/0001-conftest.py-disable-deadline.patch45
-rw-r--r--meta/recipes-devtools/python/python3-attrs/0001-test_funcs-skip-test_unknown-for-pytest-8.patch30
-rw-r--r--meta/recipes-devtools/python/python3-attrs_24.2.0.bb (renamed from meta/recipes-devtools/python/python3-attrs_23.2.0.bb)4
3 files changed, 1 insertions, 78 deletions
diff --git a/meta/recipes-devtools/python/python3-attrs/0001-conftest.py-disable-deadline.patch b/meta/recipes-devtools/python/python3-attrs/0001-conftest.py-disable-deadline.patch
deleted file mode 100644
index b1e6d99916..0000000000
--- a/meta/recipes-devtools/python/python3-attrs/0001-conftest.py-disable-deadline.patch
+++ /dev/null
@@ -1,45 +0,0 @@
1From 41103f017f6a233ebb477dd1712fe82ea8f1c84c Mon Sep 17 00:00:00 2001
2From: Tim Orling <tim.orling@konsulko.com>
3Date: Thu, 29 Feb 2024 08:45:54 -0800
4Subject: [PATCH] conftest.py: disable deadline
5
6The deadline is by default 200ms, but this is intended to be useful to
7the developer and not necessarily recommended for heavily loaded CI
8systems. Avoid warnings by disabling the deadline completely.
9
10https://github.com/HypothesisWorks/hypothesis/issues/3713
11https://hypothesis.readthedocs.io/en/latest/settings.html#hypothesis.settings.deadline
12https://lists.openembedded.org/g/openembedded-core/topic/104640034#196437
13
14Fixes:
15"""
16Unreliable test timings! On an initial run, this test took 268.29ms,
17which exceeded the deadline of 200.00ms, but on a subsequent run it
18took 2.63 ms, which did not. If you expect this sort of variability in
19your test timings, consider turning deadlines off for this test by
20setting deadline=None.
21"""
22
23Upstream-Status: Submitted [https://github.com/python-attrs/attrs/pull/1252]
24
25Signed-off-by: Tim Orling <tim.orling@konsulko.com>
26---
27 conftest.py | 2 +-
28 1 file changed, 1 insertion(+), 1 deletion(-)
29
30diff --git a/conftest.py b/conftest.py
31index 144e5f3..fdead3d 100644
32--- a/conftest.py
33+++ b/conftest.py
34@@ -20,7 +20,7 @@ def _frozen(request):
35 def pytest_configure(config):
36 # HealthCheck.too_slow causes more trouble than good -- especially in CIs.
37 settings.register_profile(
38- "patience", settings(suppress_health_check=[HealthCheck.too_slow])
39+ "patience", settings(suppress_health_check=[HealthCheck.too_slow], deadline=None)
40 )
41 settings.load_profile("patience")
42
43--
442.34.1
45
diff --git a/meta/recipes-devtools/python/python3-attrs/0001-test_funcs-skip-test_unknown-for-pytest-8.patch b/meta/recipes-devtools/python/python3-attrs/0001-test_funcs-skip-test_unknown-for-pytest-8.patch
deleted file mode 100644
index bb69c0f157..0000000000
--- a/meta/recipes-devtools/python/python3-attrs/0001-test_funcs-skip-test_unknown-for-pytest-8.patch
+++ /dev/null
@@ -1,30 +0,0 @@
1From cbe95e1aa6d95195dce13406a6f0522b2964babc Mon Sep 17 00:00:00 2001
2From: Tim Orling <tim.orling@konsulko.com>
3Date: Fri, 16 Feb 2024 07:17:19 -0800
4Subject: [PATCH] test_funcs: skip test_unknown for pytest 8
5
6https://github.com/python-attrs/attrs/issues/1233
7
8Upstream-Status: Inappropriate [Test case needs to be properly fixed upstream]
9
10Signed-off-by: Tim Orling <tim.orling@konsulko.com>
11---
12 tests/test_funcs.py | 2 +-
13 1 file changed, 1 insertion(+), 1 deletion(-)
14
15diff --git a/tests/test_funcs.py b/tests/test_funcs.py
16index 044aaab..0872c31 100644
17--- a/tests/test_funcs.py
18+++ b/tests/test_funcs.py
19@@ -593,7 +593,7 @@ class TestAssoc:
20 for k, v in change_dict.items():
21 assert getattr(changed, k) == v
22
23- @given(simple_classes())
24+ @pytest.mark.skip('Broken with pytest 8. See https://github.com/python-attrs/attrs/issues/1233')
25 def test_unknown(self, C):
26 """
27 Wanting to change an unknown attribute raises an
28--
292.34.1
30
diff --git a/meta/recipes-devtools/python/python3-attrs_23.2.0.bb b/meta/recipes-devtools/python/python3-attrs_24.2.0.bb
index e39b64306c..a6cb60a8c8 100644
--- a/meta/recipes-devtools/python/python3-attrs_23.2.0.bb
+++ b/meta/recipes-devtools/python/python3-attrs_24.2.0.bb
@@ -3,13 +3,11 @@ HOMEPAGE = "http://www.attrs.org/"
3LICENSE = "MIT" 3LICENSE = "MIT"
4LIC_FILES_CHKSUM = "file://LICENSE;md5=5e55731824cf9205cfabeab9a0600887" 4LIC_FILES_CHKSUM = "file://LICENSE;md5=5e55731824cf9205cfabeab9a0600887"
5 5
6SRC_URI[sha256sum] = "935dc3b529c262f6cf76e50877d35a4bd3c1de194fd41f47a2b7ae8f19971f30" 6SRC_URI[sha256sum] = "5cfb1b9148b5b086569baec03f20d7b6bf3bcacc9a42bebf87ffaaca362f6346"
7 7
8inherit pypi ptest python_hatchling 8inherit pypi ptest python_hatchling
9 9
10SRC_URI += " \ 10SRC_URI += " \
11 file://0001-test_funcs-skip-test_unknown-for-pytest-8.patch \
12 file://0001-conftest.py-disable-deadline.patch \
13 file://run-ptest \ 11 file://run-ptest \
14" 12"
15 13