summaryrefslogtreecommitdiffstats
path: root/meta-python/recipes-devtools/python/python3-yappi/0002-Fix-import-of-tests.utils-to-enable-pytest.patch
diff options
context:
space:
mode:
authorTim Orling <ticotimo@gmail.com>2023-12-24 09:05:56 -0800
committerKhem Raj <raj.khem@gmail.com>2023-12-29 09:04:23 -0800
commitf8d66f3174b0453d9235b7f11bbe578a31f96f37 (patch)
treeef25151fbd1dfd6fcba938217bd64f5a9a0a69b8 /meta-python/recipes-devtools/python/python3-yappi/0002-Fix-import-of-tests.utils-to-enable-pytest.patch
parent813fb0def8a8bca81706496dd6f106692616a11f (diff)
downloadmeta-openembedded-f8d66f3174b0453d9235b7f11bbe578a31f96f37.tar.gz
python3-yappi: upgrade 1.4.0 -> 1.6.0; fix ptests
* Switch to the python_setuptools_build_meta PEP-517 backend * Refactor and submit 0001-Fix-imports-for-ptests.patch - split out the Windows -> Unix line endings conversion - https://github.com/sumerc/yappi/pull/164 * Drop 0002-add-3.11-to-the-setup.patch; upstream added 3.11 and 3.12 * Drop install of yappi.py in ptest; use site-packages as intended * Drop complex run-ptest and simply run 'pytest --automake' * Move out of "problems" group to "slow" group in ptest-packageslists-meta-python.inc - can now build meta-python-image-ptest-python3-yappi - tests take about 45 seconds https://github.com/sumerc/yappi/blob/1.6.0/CHANGELOG 1.6.0 (2023-12-07) - Drop support 2.7-3.5 and clean backward compatible code (pull/152) - Add Python 3.12 wheels 1.5.1 (2023-12-06) - Add support for Python 3.12 - Fix child callgrind functions disappear Signed-off-by: Tim Orling <ticotimo@gmail.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-python/recipes-devtools/python/python3-yappi/0002-Fix-import-of-tests.utils-to-enable-pytest.patch')
-rw-r--r--meta-python/recipes-devtools/python/python3-yappi/0002-Fix-import-of-tests.utils-to-enable-pytest.patch101
1 files changed, 101 insertions, 0 deletions
diff --git a/meta-python/recipes-devtools/python/python3-yappi/0002-Fix-import-of-tests.utils-to-enable-pytest.patch b/meta-python/recipes-devtools/python/python3-yappi/0002-Fix-import-of-tests.utils-to-enable-pytest.patch
new file mode 100644
index 000000000..96dd02412
--- /dev/null
+++ b/meta-python/recipes-devtools/python/python3-yappi/0002-Fix-import-of-tests.utils-to-enable-pytest.patch
@@ -0,0 +1,101 @@
1From 28eac38566327091221aabbc164ea8e433c66e7e Mon Sep 17 00:00:00 2001
2From: Tim Orling <tim.orling@konsulko.com>
3Date: Sun, 24 Dec 2023 09:27:50 -0800
4Subject: [PATCH 2/2] Fix import of tests.utils to enable pytest
5
6Running the test cases with pytest leads to importlib errors
7because the "utils" module cannot be found.
8
9Upstream-Status: Submitted [https://github.com/sumerc/yappi/pull/164]
10
11Signed-off-by: Tim Orling <tim.orling@konsulko.com>
12---
13 tests/test_asyncio.py | 2 +-
14 tests/test_asyncio_context_vars.py | 2 +-
15 tests/test_functionality.py | 2 +-
16 tests/test_gevent.py | 2 +-
17 tests/test_hooks.py | 2 +-
18 tests/test_tags.py | 2 +-
19 6 files changed, 6 insertions(+), 6 deletions(-)
20
21diff --git a/tests/test_asyncio.py b/tests/test_asyncio.py
22index 8e9e631..bb36f4a 100644
23--- a/tests/test_asyncio.py
24+++ b/tests/test_asyncio.py
25@@ -2,7 +2,7 @@ import unittest
26 import yappi
27 import asyncio
28 import threading
29-from utils import YappiUnitTestCase, find_stat_by_name, burn_cpu, burn_io
30+from tests.utils import YappiUnitTestCase, find_stat_by_name, burn_cpu, burn_io
31
32
33 async def async_sleep(sec):
34diff --git a/tests/test_asyncio_context_vars.py b/tests/test_asyncio_context_vars.py
35index 5bd750c..9a253c0 100644
36--- a/tests/test_asyncio_context_vars.py
37+++ b/tests/test_asyncio_context_vars.py
38@@ -5,7 +5,7 @@ import contextvars
39 import functools
40 import time
41 import os
42-import utils
43+import tests.utils as utils
44 import yappi
45
46 async_context_id = contextvars.ContextVar('async_context_id')
47diff --git a/tests/test_functionality.py b/tests/test_functionality.py
48index 38bbe67..8098f17 100644
49--- a/tests/test_functionality.py
50+++ b/tests/test_functionality.py
51@@ -5,7 +5,7 @@ import threading
52 import unittest
53 import yappi
54 import _yappi
55-import utils
56+import tests.utils as utils
57 import multiprocessing
58 import subprocess
59
60diff --git a/tests/test_gevent.py b/tests/test_gevent.py
61index ed9e6ae..502af5f 100644
62--- a/tests/test_gevent.py
63+++ b/tests/test_gevent.py
64@@ -2,7 +2,7 @@ import unittest
65 import _yappi
66 import yappi
67 import threading
68-from utils import (
69+from tests.utils import (
70 YappiUnitTestCase, find_stat_by_name, burn_cpu, burn_io, burn_io_gevent
71 )
72
73diff --git a/tests/test_hooks.py b/tests/test_hooks.py
74index 297c643..8c387fc 100644
75--- a/tests/test_hooks.py
76+++ b/tests/test_hooks.py
77@@ -5,7 +5,7 @@ import unittest
78 import time
79
80 import yappi
81-import utils
82+import tests.utils as utils
83
84
85 def a():
86diff --git a/tests/test_tags.py b/tests/test_tags.py
87index b0b531d..b5a4016 100644
88--- a/tests/test_tags.py
89+++ b/tests/test_tags.py
90@@ -2,7 +2,7 @@ import unittest
91 import yappi
92 import threading
93 import time
94-from utils import YappiUnitTestCase, find_stat_by_name, burn_cpu, burn_io
95+from tests.utils import YappiUnitTestCase, find_stat_by_name, burn_cpu, burn_io
96
97
98 class MultiThreadTests(YappiUnitTestCase):
99--
1002.34.1
101