diff options
author | Alexander Kanavin <alex.kanavin@gmail.com> | 2021-10-11 20:41:20 +0200 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2021-10-14 07:15:36 -0700 |
commit | b0e66ebc2a375ef7da2a36f27269b3d96b305b2f (patch) | |
tree | 2b7445c9f8acd773c379dad351cf490e1e1febe8 /meta-python | |
parent | f2152d79043601eacb70da1a3ab36f5ac56f3e28 (diff) | |
download | meta-openembedded-contrib-b0e66ebc2a375ef7da2a36f27269b3d96b305b2f.tar.gz |
python3-yappi: add python 3.10 fix
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Trevor Gamblin <trevor.gamblin@windriver.com>
Diffstat (limited to 'meta-python')
-rw-r--r-- | meta-python/recipes-devtools/python/python3-yappi/python310.patch | 51 | ||||
-rw-r--r-- | meta-python/recipes-devtools/python/python3-yappi_1.3.2.bb | 1 |
2 files changed, 52 insertions, 0 deletions
diff --git a/meta-python/recipes-devtools/python/python3-yappi/python310.patch b/meta-python/recipes-devtools/python/python3-yappi/python310.patch new file mode 100644 index 0000000000..6dd58ae968 --- /dev/null +++ b/meta-python/recipes-devtools/python/python3-yappi/python310.patch @@ -0,0 +1,51 @@ +From d40bc0e8230dd35e05222f5761e3d7f7a75fd46e Mon Sep 17 00:00:00 2001 +From: Alexander Shadchin <shadchin@yandex-team.ru> +Date: Tue, 1 Jun 2021 02:31:12 +0300 +Subject: [PATCH] Adapt to Python 3.10 beta 1 + +Upstream-Status: Backport +Signed-off-by: Alexander Kanavin <alex@linutronix.de> +--- + yappi/_yappi.c | 12 ++++++++++++ + 1 file changed, 12 insertions(+) + +diff --git a/yappi/_yappi.c b/yappi/_yappi.c +index 1721280..343130d 100644 +--- a/yappi/_yappi.c ++++ b/yappi/_yappi.c +@@ -1258,7 +1258,11 @@ _resume_greenlet_ctx(_ctx *ctx) + static _ctx * + _bootstrap_thread(PyThreadState *ts) + { ++#if PY_VERSION_HEX < 0x030a00b1 + ts->use_tracing = 1; ++#else ++ ts->cframe->use_tracing = 1; ++#endif + ts->c_profilefunc = _yapp_callback; + return NULL; + } +@@ -1289,7 +1293,11 @@ _profile_thread(PyThreadState *ts) + ctx = (_ctx *)it->val; + } + ++#if PY_VERSION_HEX < 0x030a00b1 + ts->use_tracing = 1; ++#else ++ ts->cframe->use_tracing = 1; ++#endif + ts->c_profilefunc = _yapp_callback; + ctx->id = ctx_id; + ctx->tid = ts->thread_id; +@@ -1306,7 +1314,11 @@ _profile_thread(PyThreadState *ts) + static _ctx* + _unprofile_thread(PyThreadState *ts) + { ++#if PY_VERSION_HEX < 0x030a00b1 + ts->use_tracing = 0; ++#else ++ ts->cframe->use_tracing = 0; ++#endif + ts->c_profilefunc = NULL; + + return NULL; //dummy return for enum_threads() func. prototype diff --git a/meta-python/recipes-devtools/python/python3-yappi_1.3.2.bb b/meta-python/recipes-devtools/python/python3-yappi_1.3.2.bb index 94988a7448..7cfc84e756 100644 --- a/meta-python/recipes-devtools/python/python3-yappi_1.3.2.bb +++ b/meta-python/recipes-devtools/python/python3-yappi_1.3.2.bb @@ -9,6 +9,7 @@ SRC_URI[sha256sum] = "a51d3e6e5563cc74b5bb82ed6e7bd44a9c1a7eae3d97e4d52e9465edb3 SRC_URI += " \ file://run-ptest \ file://0001-Fix-imports-for-ptests.patch \ + file://python310.patch \ " inherit pypi setuptools3 ptest |