included patch to support python3.10
This commit is contained in:
parent
1c6827d530
commit
2b2afafa37
52
0001-Adapt-to-Python-3.10-beta-1.patch
Normal file
52
0001-Adapt-to-Python-3.10-beta-1.patch
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
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
|
||||||
|
|
||||||
|
---
|
||||||
|
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
|
||||||
|
--
|
||||||
|
2.26.2
|
||||||
|
|
||||||
@ -1,12 +1,12 @@
|
|||||||
%global _empty_manifest_terminate_build 0
|
%global _empty_manifest_terminate_build 0
|
||||||
Name: python-yappi
|
Name: python-yappi
|
||||||
Version: 1.3.2
|
Version: 1.3.2
|
||||||
Release: 2
|
Release: 3
|
||||||
Summary: Yet Another Python Profiler
|
Summary: Yet Another Python Profiler
|
||||||
License: MIT
|
License: MIT
|
||||||
URL: https://github.com/sumerc/yappi
|
URL: https://github.com/sumerc/yappi
|
||||||
Source0: https://files.pythonhosted.org/packages/4c/18/1b9387c7d3bf0d7aa54773ded7d286bcb8b04ec242404969f6656a385a11/yappi-1.3.2.tar.gz
|
Source0: https://files.pythonhosted.org/packages/4c/18/1b9387c7d3bf0d7aa54773ded7d286bcb8b04ec242404969f6656a385a11/yappi-1.3.2.tar.gz
|
||||||
|
Patch0: 0001-Adapt-to-Python-3.10-beta-1.patch
|
||||||
BuildRequires: gcc
|
BuildRequires: gcc
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@ -53,6 +53,9 @@ export PYTHONPATH=%{buildroot}/%{python3_sitearch}
|
|||||||
%{_bindir}/yappi-3*
|
%{_bindir}/yappi-3*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Sat May 07 2022 xigaoxinyan <xigaoxinyan@h-partners.com> - 1.3.2-3
|
||||||
|
- Included patch to support python3.10
|
||||||
|
|
||||||
* Fri Jul 30 2021 chenyanpanHW <chenyanpan@huawei.com> - 1.3.2-2
|
* Fri Jul 30 2021 chenyanpanHW <chenyanpan@huawei.com> - 1.3.2-2
|
||||||
- DESC: delete -S git from %autosetup, and delete BuildRequires git
|
- DESC: delete -S git from %autosetup, and delete BuildRequires git
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user