summaryrefslogtreecommitdiffstats
path: root/meta-python/recipes-devtools/python/python3-yappi
diff options
context:
space:
mode:
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