summaryrefslogtreecommitdiffstats
path: root/meta-python/recipes-devtools/python/python3-yappi
diff options
context:
space:
mode:
authorAlexander Kanavin <alex.kanavin@gmail.com>2021-10-11 20:41:20 +0200
committerKhem Raj <raj.khem@gmail.com>2021-10-14 07:15:36 -0700
commitb0e66ebc2a375ef7da2a36f27269b3d96b305b2f (patch)
tree2b7445c9f8acd773c379dad351cf490e1e1febe8 /meta-python/recipes-devtools/python/python3-yappi
parentf2152d79043601eacb70da1a3ab36f5ac56f3e28 (diff)
downloadmeta-openembedded-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/recipes-devtools/python/python3-yappi')
-rw-r--r--meta-python/recipes-devtools/python/python3-yappi/python310.patch51
1 files changed, 51 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 @@
1From d40bc0e8230dd35e05222f5761e3d7f7a75fd46e Mon Sep 17 00:00:00 2001
2From: Alexander Shadchin <shadchin@yandex-team.ru>
3Date: Tue, 1 Jun 2021 02:31:12 +0300
4Subject: [PATCH] Adapt to Python 3.10 beta 1
5
6Upstream-Status: Backport
7Signed-off-by: Alexander Kanavin <alex@linutronix.de>
8---
9 yappi/_yappi.c | 12 ++++++++++++
10 1 file changed, 12 insertions(+)
11
12diff --git a/yappi/_yappi.c b/yappi/_yappi.c
13index 1721280..343130d 100644
14--- a/yappi/_yappi.c
15+++ b/yappi/_yappi.c
16@@ -1258,7 +1258,11 @@ _resume_greenlet_ctx(_ctx *ctx)
17 static _ctx *
18 _bootstrap_thread(PyThreadState *ts)
19 {
20+#if PY_VERSION_HEX < 0x030a00b1
21 ts->use_tracing = 1;
22+#else
23+ ts->cframe->use_tracing = 1;
24+#endif
25 ts->c_profilefunc = _yapp_callback;
26 return NULL;
27 }
28@@ -1289,7 +1293,11 @@ _profile_thread(PyThreadState *ts)
29 ctx = (_ctx *)it->val;
30 }
31
32+#if PY_VERSION_HEX < 0x030a00b1
33 ts->use_tracing = 1;
34+#else
35+ ts->cframe->use_tracing = 1;
36+#endif
37 ts->c_profilefunc = _yapp_callback;
38 ctx->id = ctx_id;
39 ctx->tid = ts->thread_id;
40@@ -1306,7 +1314,11 @@ _profile_thread(PyThreadState *ts)
41 static _ctx*
42 _unprofile_thread(PyThreadState *ts)
43 {
44+#if PY_VERSION_HEX < 0x030a00b1
45 ts->use_tracing = 0;
46+#else
47+ ts->cframe->use_tracing = 0;
48+#endif
49 ts->c_profilefunc = NULL;
50
51 return NULL; //dummy return for enum_threads() func. prototype