diff options
-rw-r--r-- | meta/recipes-devtools/python/python3-attrs/0001-conftest.py-disable-deadline.patch | 45 | ||||
-rw-r--r-- | meta/recipes-devtools/python/python3-attrs_23.2.0.bb | 1 |
2 files changed, 46 insertions, 0 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 new file mode 100644 index 0000000000..b1e6d99916 --- /dev/null +++ b/meta/recipes-devtools/python/python3-attrs/0001-conftest.py-disable-deadline.patch | |||
@@ -0,0 +1,45 @@ | |||
1 | From 41103f017f6a233ebb477dd1712fe82ea8f1c84c Mon Sep 17 00:00:00 2001 | ||
2 | From: Tim Orling <tim.orling@konsulko.com> | ||
3 | Date: Thu, 29 Feb 2024 08:45:54 -0800 | ||
4 | Subject: [PATCH] conftest.py: disable deadline | ||
5 | |||
6 | The deadline is by default 200ms, but this is intended to be useful to | ||
7 | the developer and not necessarily recommended for heavily loaded CI | ||
8 | systems. Avoid warnings by disabling the deadline completely. | ||
9 | |||
10 | https://github.com/HypothesisWorks/hypothesis/issues/3713 | ||
11 | https://hypothesis.readthedocs.io/en/latest/settings.html#hypothesis.settings.deadline | ||
12 | https://lists.openembedded.org/g/openembedded-core/topic/104640034#196437 | ||
13 | |||
14 | Fixes: | ||
15 | """ | ||
16 | Unreliable test timings! On an initial run, this test took 268.29ms, | ||
17 | which exceeded the deadline of 200.00ms, but on a subsequent run it | ||
18 | took 2.63 ms, which did not. If you expect this sort of variability in | ||
19 | your test timings, consider turning deadlines off for this test by | ||
20 | setting deadline=None. | ||
21 | """ | ||
22 | |||
23 | Upstream-Status: Submitted [https://github.com/python-attrs/attrs/pull/1252] | ||
24 | |||
25 | Signed-off-by: Tim Orling <tim.orling@konsulko.com> | ||
26 | --- | ||
27 | conftest.py | 2 +- | ||
28 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
29 | |||
30 | diff --git a/conftest.py b/conftest.py | ||
31 | index 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 | -- | ||
44 | 2.34.1 | ||
45 | |||
diff --git a/meta/recipes-devtools/python/python3-attrs_23.2.0.bb b/meta/recipes-devtools/python/python3-attrs_23.2.0.bb index 3945798ba5..a638097988 100644 --- a/meta/recipes-devtools/python/python3-attrs_23.2.0.bb +++ b/meta/recipes-devtools/python/python3-attrs_23.2.0.bb | |||
@@ -9,6 +9,7 @@ inherit pypi ptest python_hatchling | |||
9 | 9 | ||
10 | SRC_URI += " \ | 10 | SRC_URI += " \ |
11 | file://0001-test_funcs-skip-test_unknown-for-pytest-8.patch \ | 11 | file://0001-test_funcs-skip-test_unknown-for-pytest-8.patch \ |
12 | file://0001-conftest.py-disable-deadline.patch \ | ||
12 | file://run-ptest \ | 13 | file://run-ptest \ |
13 | " | 14 | " |
14 | 15 | ||