summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/python/python3-hypothesis_6.46.11.bb
diff options
context:
space:
mode:
authorChen Qi <Qi.Chen@windriver.com>2022-08-17 20:13:05 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-08-23 15:48:55 +0100
commitfc4b126856e50bceb56f1d8c828421dcd82a2105 (patch)
treebe34c0621f1915636b9dbbb1b30e52189bcedf9c /meta/recipes-devtools/python/python3-hypothesis_6.46.11.bb
parent9df4838fe91e437ae990b3ef7de37eead326dd6b (diff)
downloadpoky-fc4b126856e50bceb56f1d8c828421dcd82a2105.tar.gz
python3-hypothesis: revert back to 6.46.11
This package was broken since it was upgraded to 6.48, because it started using 'exceptiongroup' since then, which is missing in any meta layer. On target, when importing hypothesis, we meet the following error: Traceback (most recent call last): File "/usr/lib64/python3.10/site-packages/hypothesis/internal/compat.py", line 18, in <module> BaseExceptionGroup = BaseExceptionGroup NameError: name 'BaseExceptionGroup' is not defined. Did you mean: 'BaseException'? ModuleNotFoundError: No module named 'exceptiongroup' The related codes as below: try: BaseExceptionGroup = BaseExceptionGroup ExceptionGroup = ExceptionGroup # pragma: no cover except NameError: from exceptiongroup import ( BaseExceptionGroup as BaseExceptionGroup, ExceptionGroup as ExceptionGroup, ) We can see that it tries to use ExceptionGroup and falls back to use an import from exceptiongroup module. Looking at the https://github.com/agronholm/exceptiongroup, it says: """ This is a backport of the BaseExceptionGroup and ExceptionGroup classes from Python 3.11. """ So instead of adding a new recipe for exception group, it might be better to revert to a working version and wait for python 3.11 to release. (From OE-Core rev: 37c5b171d7de25b131e77b80d37f8481308bd6fe) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/python/python3-hypothesis_6.46.11.bb')
-rw-r--r--meta/recipes-devtools/python/python3-hypothesis_6.46.11.bb38
1 files changed, 38 insertions, 0 deletions
diff --git a/meta/recipes-devtools/python/python3-hypothesis_6.46.11.bb b/meta/recipes-devtools/python/python3-hypothesis_6.46.11.bb
new file mode 100644
index 0000000000..1d9772d4ff
--- /dev/null
+++ b/meta/recipes-devtools/python/python3-hypothesis_6.46.11.bb
@@ -0,0 +1,38 @@
1SUMMARY = "A library for property-based testing"
2HOMEPAGE = "https://github.com/HypothesisWorks/hypothesis/tree/master/hypothesis-python"
3LICENSE = "MPL-2.0"
4LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=4ee62c16ebd0f4f99d906f36b7de8c3c"
5
6PYPI_PACKAGE = "hypothesis"
7
8inherit pypi setuptools3 ptest
9
10SRC_URI += " \
11 file://run-ptest \
12 file://test_binary_search.py \
13 file://test_rle.py \
14 "
15
16SRC_URI[sha256sum] = "f5c1cf61b24b094355577a6b8fbbb8eb54c1b0216fbc0519af97c46bddf43c42"
17
18RDEPENDS:${PN} += " \
19 python3-attrs \
20 python3-compression \
21 python3-core \
22 python3-json \
23 python3-sortedcontainers \
24 python3-statistics \
25 python3-unittest \
26 "
27
28RDEPENDS:${PN}-ptest += " \
29 ${PYTHON_PN}-pytest \
30 "
31
32do_install_ptest() {
33 install -d ${D}${PTEST_PATH}/examples
34 install -m 0755 ${WORKDIR}/test_binary_search.py ${D}${PTEST_PATH}/examples/
35 install -m 0755 ${WORKDIR}/test_rle.py ${D}${PTEST_PATH}/examples/
36}
37
38BBCLASSEXTEND = "native nativesdk"