python3-yappi: upgrade 1.4.0 -> 1.6.0; fix ptests
Gentle ping. This one supersedes the on from Alex, since it fixes the priests.
Quoted 635 lines · Tim Orling via lists.openembedded.org
* Switch to the
python_setuptools_build_metaPEP-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 ofyappi.pyin 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 secondshttps://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 wheels1.5.1 (2023-12-06)
- Add support for Python 3.12
- Fix child callgrind functions disappearSigned-off-by Tim Orling <[email protected]>---
All tests pass on qemux86-64
Upstream GitHub Actions CI also passed with submitted patches.../ptest-packagelists-meta-python.inc | 2 +- ...nality-convert-line-endings-to-Unix.patch} | 120 +++++------------- ...port-of-tests.utils-to-enable-pytest.patch | 101 +++++++++++++++ .../0002-add-3.11-to-the-setup.patch | 26 ---- .../python/python3-yappi/run-ptest | 2 +- .../python/python3-yappi_1.4.0.bb | 36 ------ .../python/python3-yappi_1.6.0.bb | 37 ++++++ 7 files changed, 175 insertions(+), 149 deletions(-) rename meta-python/recipes-devtools/python/python3-yappi/{0001-Fix-imports-for-ptests.patch => 0001-test_functionality-convert-line-endings-to-Unix.patch} (95%) create mode 100644 meta-python/recipes-devtools/python/python3-yappi/0002-Fix-import-of-tests.utils-to-enable-pytest.patch delete mode 100644 meta-python/recipes-devtools/python/python3-yappi/0002-add-3.11-to-the-setup.patch delete mode 100644 meta-python/recipes-devtools/python/ python3-yappi_1.4.0.bb create mode 100644 meta-python/recipes-devtools/python/python3-yappi_1.6.0.bb
meta-python/conf/include/ptest-packagelists-meta-python.inc +1
-1@@ -54,6 +54,7 @@ PTESTS_FAST_META_PYTHON = "\ PTESTS_SLOW_META_PYTHON = "\ python3-lz4 \ + python3-yappi \ " PTESTS_PROBLEMS_META_PYTHON ="\@@ -82,6 +83,5 @@ PTESTS_PROBLEMS_META_PYTHON ="\ python3-whoosh \ python3-ujson \ python3-xlrd \ - python3-yappi \ python3-yarl \ "diff --git
a/meta-python/recipes-devtools/python/python3-yappi/0001-Fix-imports-for-ptests.patchb/meta-python/recipes-devtools/python/python3-yappi/0001-test_functionality-convert-line-endings-to-Unix.patchsimilarity index 95%
rename frommeta-python/recipes-devtools/python/python3-yappi/0001-Fix-imports-for-ptests.patch
rename tometa-python/recipes-devtools/python/python3-yappi/0001-test_functionality-convert-line-endings-to-Unix.patchindex476db4b7d0..70d4607c29100644
---a/meta-python/recipes-devtools/python/python3-yappi/0001-Fix-imports-for-ptests.patch
+++b/meta-python/recipes-devtools/python/python3-yappi/0001-test_functionality-convert-line-endings-to-Unix.patchmeta-python/conf/include/ptest-packagelists-meta-python.inc +12
-21@@ -1,44 +1,23 @@ -From 0dedc1c573ddc4e87475eb03c64555cd54a72e92 Mon Sep 17 00:00:00 2001 -From: Trevor Gamblin <[email protected]> -Date: Mon, 7 Jun 2021 09:40:20 -0400 -Subject: [PATCH] Fix imports for tests +From 0136ca731cba8b056b3f2ff0e7df3953b94f1e87 Mon Sep 17 00:00:00 2001 +From: Tim Orling <[email protected]> +Date: Sun, 24 Dec 2023 09:41:57 -0800 +Subject: [PATCH 1/2] test_functionality: convert line endings to Unix -Signed-off-by: Trevor Gamblin <[email protected]> ---- -Upstream-Status: Pending +Convert the Windows line endings with dos2unix to be like the +other files in tests/* + +Upstream-Status: Submitted [https://github.com/sumerc/yappi/pull/164] - tests/test_asyncio.py | 2 +- - tests/test_asyncio_context_vars.py | 2 +- - tests/test_functionality.py | 2 +- - tests/test_hooks.py | 2 +- - tests/test_tags.py | 2 +- - 5 files changed, 6 insertions(+), 6 deletions(-) +Signed-off-by: Tim Orling <[email protected]> +--- + tests/test_functionality.py | 3822 +++++++++++++++++------------------ + 1 file changed, 1911 insertions(+), 1911 deletions(-) ---- a/tests/test_asyncio.py -+++ b/tests/test_asyncio.py -@@ -2,7 +2,7 @@ import unittest - import yappi - import asyncio - import threading --from utils import YappiUnitTestCase, find_stat_by_name, burn_cpu, burn_io -+from .utils import YappiUnitTestCase, find_stat_by_name, burn_cpu,
burn_iometa-python/conf/include/ptest-packagelists-meta-python.inc +3
-16- - - async def async_sleep(sec): ---- a/tests/test_asyncio_context_vars.py -+++ b/tests/test_asyncio_context_vars.py -@@ -5,7 +5,7 @@ import contextvars - import functools - import time - import os --import utils -+import tests.utils as utils - import yappi - - async_context_id = contextvars.ContextVar('async_context_id') +diff --git a/tests/test_functionality.py b/tests/test_functionality.py +index 0e99c47..38bbe67 100644 --- a/tests/test_functionality.py +++ b/tests/test_functionality.py -@@ -1,1916 +1,1916 @@ +@@ -1,1911 +1,1911 @@ -import os -import sys -import time@@ -47,7 +26,7 @@ Upstream-Status: Pending -import yappi -import _yappi -import utils --import multiprocessing # added to fix http://bugs.python.org/issue15881for > Py2.6
+-import multiprocessing
-import subprocess
-
-_counter = 0meta-python/conf/include/ptest-packagelists-meta-python.inc +2
-2@@ -318,10 +297,10 @@ Upstream-Status: Pending - def test_profile_decorator(self): - - def aggregate(func, stats): -- fname = "tests/%s.profile" % (func.__name__) +- fname = f"tests/{func.__name__}.profile" - try: - stats.add(fname) -- except IOError: +- except OSError: - pass - stats.save(fname) - raise Exception("messing around")@@ -1232,7 +1211,7 @@ Upstream-Status: Pending - # TODO: I put dummy() to fix below, remove the comments after awhile.
- self.assertTrue( # FIX: I see this fails sometimes?
- tsm is not None,
-- 'Could not find "_MainThread". Found: %s' % (',
'.join(utils.get_stat_names(tstats))))
+- f"Could not find \"_MainThread\". Found: {',
'.join(utils.get_stat_names(tstats))}")
-
- deftest_ctx_stats(self):
- from threading import Threadmeta-python/conf/include/ptest-packagelists-meta-python.inc +0
-0@@ -1312,7 +1291,7 @@ Upstream-Status: Pending - # TODO: I put dummy() to fix below, remove the comments after awhile.
- self.assertTrue( # FIX: I see this fails sometimes
- tsmain is not None,
-- 'Could not find "_MainThread". Found: %s' % (',
'.join(utils.get_stat_names(stats))))
+- f"Could not find \"_MainThread\". Found: {',
'.join(utils.get_stat_names(stats))}")
-self.assertTrue(1.0 > tst2.ttot >= 0.5)
-self.assertTrue(1.0 > tst1.ttot >= 0.5)
-meta-python/conf/include/ptest-packagelists-meta-python.inc +1
-1@@ -1369,7 +1348,7 @@ Upstream-Status: Pending - ts = [] - for i in (0.01, 0.05, 0.1): - t = threading.Thread(target=burn_cpu, args=(i, )) -- t.name = "burn_cpu-%s" % str(i) +- t.name = f"burn_cpu-{str(i)}" - t.start() - ts.append(t) - for t in ts:@@ -1396,10 +1375,7 @@ Upstream-Status: Pending - def test_producer_consumer_with_queues(self): - # we currently just stress yappi, no functionality test is donehere.
-yappi.start()
-- ifutils.is_py3x():
-- from queue import Queue
-- else:
-- from Queue import Queue+- from queue import Queue - from threading import Thread - WORKER_THREAD_COUNT = 50 - WORK_ITEM_COUNT = 2000meta-python/conf/include/ptest-packagelists-meta-python.inc +0
-1@@ -1458,7 +1434,6 @@ Upstream-Status: Pending - fsh = utils.find_stat_by_name(stats, "handler") - self.assertTrue(fsh is not None) - -- @unittest.skipIf(not sys.version_info >= (3, 2), "requires Python 3.2") - def test_concurrent_futures(self): - yappi.start()- from concurrent.futures import ThreadPoolExecutor
meta-python/conf/include/ptest-packagelists-meta-python.inc +0
-1@@ -1468,7 +1443,6 @@ Upstream-Status: Pending - time.sleep(1.0) - yappi.stop() - -- @unittest.skipIf(not sys.version_info >= (3, 2), "requires Python 3.2") - def test_barrier(self): - yappi.start()- b =
threading.Barrier(2, timeout=1)meta-python/conf/include/ptest-packagelists-meta-python.inc +0
-2@@ -1962,8 +1936,8 @@ Upstream-Status: Pending +import unittest +import yappi +import _yappi -+import tests.utils as utils -+import multiprocessing # added to fix http://bugs.python.org/issue15881for > Py2.6
++import utils
++import multiprocessing
+import subprocess
+
+_counter = 0meta-python/conf/include/ptest-packagelists-meta-python.inc +2
-3@@ -2234,10 +2208,10 @@ Upstream-Status: Pending + def test_profile_decorator(self): + + def aggregate(func, stats): -+ fname = "tests/%s.profile" % (func.__name__) ++ fname = f"tests/{func.__name__}.profile" + try: + stats.add(fname) -+ except IOError: ++ except OSError: + pass + stats.save(fname) + raise Exception("messing around")@@ -3007,8 +2981,8 @@ Upstream-Status: Pending + + def test_issue_32(self): + ''' -+ Start yappi from different thread and we get Internal Error(15)as
-+ thecurrent_ctx_id()called while enumerating the threads instart()
++ Start yappi from different thread and we get Internal Error(15)
as
++ thecurrent_ctx_id()called while enumerating the threads instart()
+ and as it does not swap to the enumerated ThreadState* theTHreadState_GetDict()
+ returns wrong object and thus sets an invalid id for the_ctx
structure.
+meta-python/conf/include/ptest-packagelists-meta-python.inc +0
-0@@ -3148,7 +3122,7 @@ Upstream-Status: Pending + # TODO: I put dummy() to fix below, remove the comments after awhile.
+ self.assertTrue( # FIX: I see this fails sometimes?
+ tsm is not None,
-+ 'Could not find "_MainThread". Found: %s' % (',
'.join(utils.get_stat_names(tstats))))
++ f"Could not find \"_MainThread\". Found: {',
'.join(utils.get_stat_names(tstats))}")
+
+ deftest_ctx_stats(self):
+ from threading import Threadmeta-python/conf/include/ptest-packagelists-meta-python.inc +0
-0@@ -3228,7 +3202,7 @@ Upstream-Status: Pending + # TODO: I put dummy() to fix below, remove the comments after awhile.
+ self.assertTrue( # FIX: I see this fails sometimes
+ tsmain is not None,
-+ 'Could not find "_MainThread". Found: %s' % (',
'.join(utils.get_stat_names(stats))))
++ f"Could not find \"_MainThread\". Found: {',
'.join(utils.get_stat_names(stats))}")
+self.assertTrue(1.0 > tst2.ttot >= 0.5)
+self.assertTrue(1.0 > tst1.ttot >= 0.5)
+meta-python/conf/include/ptest-packagelists-meta-python.inc +1
-1@@ -3285,7 +3259,7 @@ Upstream-Status: Pending + ts = [] + for i in (0.01, 0.05, 0.1): + t = threading.Thread(target=burn_cpu, args=(i, )) -+ t.name = "burn_cpu-%s" % str(i) ++ t.name = f"burn_cpu-{str(i)}" + t.start() + ts.append(t) + for t in ts:@@ -3312,10 +3286,7 @@ Upstream-Status: Pending + def test_producer_consumer_with_queues(self): + # we currently just stress yappi, no functionality test is donehere.
+yappi.start()
-+ ifutils.is_py3x():
-+ from queue import Queue
-+ else:
-+ from Queue import Queue++ from queue import Queue + from threading import Thread + WORKER_THREAD_COUNT = 50 + WORK_ITEM_COUNT = 2000meta-python/conf/include/ptest-packagelists-meta-python.inc +0
-1@@ -3374,7 +3345,6 @@ Upstream-Status: Pending + fsh = utils.find_stat_by_name(stats, "handler") + self.assertTrue(fsh is not None) + -+ @unittest.skipIf(not sys.version_info >= (3, 2), "requires Python 3.2") + def test_concurrent_futures(self): + yappi.start()+ from concurrent.futures import ThreadPoolExecutor
meta-python/conf/include/ptest-packagelists-meta-python.inc +0
-1@@ -3384,7 +3354,6 @@ Upstream-Status: Pending + time.sleep(1.0) + yappi.stop() + -+ @unittest.skipIf(not sys.version_info >= (3, 2), "requires Python 3.2") + def test_barrier(self): + yappi.start()+ b =
threading.Barrier(2, timeout=1)meta-python/conf/include/ptest-packagelists-meta-python.inc +0
-0@@ -3871,25 +3840,6 @@ Upstream-Status: Pending + # import sys;sys.argv = ['', 'BasicUsage.test_run_as_script'] + # import sys;sys.argv = ['','MultithreadedScenarios.test_subsequent_profile']
+unittest.main()
----a/tests/test_hooks.py
-+++b/tests/test_hooks.py
-@@ -5,7 +5,7 @@ import unittest
- import timemeta-python/conf/include/ptest-packagelists-meta-python.inc +0
-15- - import yappi --import utils -+import tests.utils as utils - - - def a(): ---- a/tests/test_tags.py -+++ b/tests/test_tags.py -@@ -2,7 +2,7 @@ import unittest - import yappi - import threading - import time --from utils import YappiUnitTestCase, find_stat_by_name, burn_cpu, burn_io -+from .utils import YappiUnitTestCase, find_stat_by_name, burn_cpu,
burn_iometa-python/conf/include/ptest-packagelists-meta-python.inc +3
-3- - - class MultiThreadTests(YappiUnitTestCase): +-- +2.34.1 +diff --git
a/meta-python/recipes-devtools/python/python3-yappi/0002-Fix-import-of-tests.utils-to-enable-pytest.patchb/meta-python/recipes-devtools/python/python3-yappi/0002-Fix-import-of-tests.utils-to-enable-pytest.patchnew file mode 100644
index 0000000000..96dd024125
---/dev/null
+++b/meta-python/recipes-devtools/python/python3-yappi/0002-Fix-import-of-tests.utils-to-enable-pytest.patchmeta-python/conf/include/ptest-packagelists-meta-python.inc +30
-0@@ -0,0 +1,101 @@ +From 28eac38566327091221aabbc164ea8e433c66e7e Mon Sep 17 00:00:00 2001 +From: Tim Orling <[email protected]> +Date: Sun, 24 Dec 2023 09:27:50 -0800 +Subject: [PATCH 2/2] Fix import of tests.utils to enable pytest + +Running the test cases with pytest leads to importlib errors +because the "utils" module cannot be found. + +Upstream-Status: Submitted [https://github.com/sumerc/yappi/pull/164] + +Signed-off-by: Tim Orling <[email protected]> +--- + tests/test_asyncio.py | 2 +- + tests/test_asyncio_context_vars.py | 2 +- + tests/test_functionality.py | 2 +- + tests/test_gevent.py | 2 +- + tests/test_hooks.py | 2 +- + tests/test_tags.py | 2 +- + 6 files changed, 6 insertions(+), 6 deletions(-) + +diff --git a/tests/test_asyncio.py b/tests/test_asyncio.py +index 8e9e631..bb36f4a 100644 +--- a/tests/test_asyncio.py ++++ b/tests/test_asyncio.py +@@ -2,7 +2,7 @@ import unittest + import yappi + import asyncio + import threading +-from utils import YappiUnitTestCase, find_stat_by_name, burn_cpu, burn_io ++from tests.utils import YappiUnitTestCase, find_stat_by_name, burn_cpu,
burn_iometa-python/conf/include/ptest-packagelists-meta-python.inc +4
-0+ + + async def async_sleep(sec): +diff --git a/tests/test_asyncio_context_vars.py
b/tests/test_asyncio_context_vars.pymeta-python/conf/include/ptest-packagelists-meta-python.inc +36
-0+index 5bd750c..9a253c0 100644 +--- a/tests/test_asyncio_context_vars.py ++++ b/tests/test_asyncio_context_vars.py +@@ -5,7 +5,7 @@ import contextvars + import functools + import time + import os +-import utils ++import tests.utils as utils + import yappi + + async_context_id = contextvars.ContextVar('async_context_id') +diff --git a/tests/test_functionality.py b/tests/test_functionality.py +index 38bbe67..8098f17 100644 +--- a/tests/test_functionality.py ++++ b/tests/test_functionality.py +@@ -5,7 +5,7 @@ import threading + import unittest + import yappi + import _yappi +-import utils ++import tests.utils as utils + import multiprocessing + import subprocess + +diff --git a/tests/test_gevent.py b/tests/test_gevent.py +index ed9e6ae..502af5f 100644 +--- a/tests/test_gevent.py ++++ b/tests/test_gevent.py +@@ -2,7 +2,7 @@ import unittest + import _yappi + import yappi + import threading +-from utils import ( ++from tests.utils import ( + YappiUnitTestCase, find_stat_by_name, burn_cpu, burn_io,
burn_io_gevent
+ )meta-python/conf/include/ptest-packagelists-meta-python.inc +24
-0+ +diff --git a/tests/test_hooks.py b/tests/test_hooks.py +index 297c643..8c387fc 100644 +--- a/tests/test_hooks.py ++++ b/tests/test_hooks.py +@@ -5,7 +5,7 @@ import unittest + import time + + import yappi +-import utils ++import tests.utils as utils + + + def a(): +diff --git a/tests/test_tags.py b/tests/test_tags.py +index b0b531d..b5a4016 100644 +--- a/tests/test_tags.py ++++ b/tests/test_tags.py +@@ -2,7 +2,7 @@ import unittest + import yappi + import threading + import time +-from utils import YappiUnitTestCase, find_stat_by_name, burn_cpu, burn_io ++from tests.utils import YappiUnitTestCase, find_stat_by_name, burn_cpu,
burn_iometa-python/conf/include/ptest-packagelists-meta-python.inc +6
-0+ + + class MultiThreadTests(YappiUnitTestCase): +-- +2.34.1 +diff --git
a/meta-python/recipes-devtools/python/python3-yappi/0002-add-3.11-to-the-setup.patchb/meta-python/recipes-devtools/python/python3-yappi/0002-add-3.11-to-the-setup.patchdeleted file mode 100644
index d40bd2b7cc..0000000000
---a/meta-python/recipes-devtools/python/python3-yappi/0002-add-3.11-to-the-setup.patch+++/dev/nullmeta-python/conf/include/ptest-packagelists-meta-python.inc +0
-26@@ -1,26 +0,0 @@ -From 38afdacf526410f970afc58e147c7377c6c7112c Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?S=C3=BCmer=20Cip?= <[email protected]> -Date: Fri, 25 Nov 2022 15:58:03 +0300 -Subject: [PATCH 2/2] add 3.11 to the setup - ---- -Upstream-Status: Pending - - setup.py | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/setup.py b/setup.py -index d006787..96e2a66 100644 ---- a/setup.py -+++ b/setup.py -@@ -56,6 +56,7 @@ CLASSIFIERS = [ - 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: 3.9', - 'Programming Language :: Python :: 3.10', -+ 'Programming Language :: Python :: 3.11', - 'Programming Language :: Python :: Implementation :: CPython', - 'Operating System :: OS Independent', - 'Topic :: Software Development :: Libraries', --- -2.30.2 -meta-python/recipes-devtools/python/python3-yappi/run-ptest +0
-1@@ -1,3 +1,3 @@ #!/bin/sh -pytest -o log_cli=true -o log_cli_level=INFO | sed -e 's/\[...%\]//g'|sed -e 's/PASSED/PASS/g'| sed -e 's/FAILED/FAIL/g'|sed -e 's/SKIPED/SKIP/g'| awk '{if ($NF=="PASS" || $NF=="FAIL" || $NF=="SKIP" || $NF=="XFAIL" || $NF=="XPASS"){printf "%s: %s\n", $NF, $0}else{print}}'| awk '{if ($NF=="PASS" || $NF=="FAIL" || $NF=="SKIP" || $NF=="XFAIL" || $NF=="XPASS") {$NF="";print $0}else{print}}'
meta-python/recipes-devtools/python/python3-yappi/run-ptest +1
-0+pytest --automakemeta-python/recipes-devtools/python/python3-yappi_1.4.0.bb deleted +0
-7@@ -1,36 +0,0 @@ -SUMMARY = "Yet Another Python Profiler" -HOMEPAGE = "https://github.com/sumerc/yappi" - -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE;md5=71c208c9a4fd864385eb69ad4caa3bee" - -SRC_URI[sha256sum] ="
504b5d8fc7433736cb5e257991d2e7f2946019174f1faec7b2fe947881a17fc0"meta-python/recipes-devtools/python/python3-yappi_1.4.0.bb deleted +0
-29- -SRC_URI += " \ - file://run-ptest \ - file://0001-Fix-imports-for-ptests.patch \ - file://0002-add-3.11-to-the-setup.patch \ -" - -inherit pypi setuptools3 ptest - -RDEPENDS:${PN} += "\ - ${PYTHON_PN}-datetime \ - ${PYTHON_PN}-pickle \ - ${PYTHON_PN}-threading \ -" - -RDEPENDS:${PN}-ptest += " \ - ${PYTHON_PN}-gevent \ - ${PYTHON_PN}-multiprocessing \ - ${PYTHON_PN}-pytest \ - ${PYTHON_PN}-profile \ - ${PYTHON_PN}-zopeinterface \ -" - -do_install_ptest() { - install -d ${D}${PTEST_PATH}/tests - cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/ - cp -f ${S}/yappi/yappi.py ${D}/${PTEST_PATH}/ -} -meta-python/recipes-devtools/python/python3-yappi_1.6.0.bb new file +7
-0@@ -0,0 +1,37 @@ +SUMMARY = "Yet Another Python Profiler" +HOMEPAGE = "https://github.com/sumerc/yappi" + +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=71c208c9a4fd864385eb69ad4caa3bee" + +SRC_URI[sha256sum] ="
a9aaf72009d8c03067294151ee0470ac7a6dfa7b33baab40b198d6c1ef00430a"meta-python/recipes-devtools/python/python3-yappi_1.6.0.bb new file +30
-1+ +SRC_URI += " \ + file://run-ptest \ + file://0001-test_functionality-convert-line-endings-to-Unix.patch \ + file://0002-Fix-import-of-tests.utils-to-enable-pytest.patch \ +" + +inherit pypi python_setuptools_build_meta ptest + +RDEPENDS:${PN} += "\ + python3-datetime \ + python3-pickle \ + python3-threading \ +" + +RDEPENDS:${PN}-ptest += " \ + python3-gevent \ + python3-multiprocessing \ + python3-pytest \ + python3-profile \ + python3-unittest-automake-output \ + python3-zopeinterface \ +" + +do_install_ptest() { + install -d ${D}${PTEST_PATH}/tests + cp -rf ${S}/tests ${D}${PTEST_PATH} + cp -f ${S}/run_tests.py ${D}${PTEST_PATH} +} + --2.34.1
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#107782):
https://lists.openembedded.org/g/openembedded-devel/message/107782
Mute This Topic: https://lists.openembedded.org/mt/103350816/924729
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [ [email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
right, its in master-next already.
Quoted 574 lines · Tim Orling
Gentle ping. This one supersedes the on from Alex, since it fixes the priests.
Quoted 570 lines · Tim Orling via lists.openembedded.org
* Switch to the
python_setuptools_build_metaPEP-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 ofyappi.pyin 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 secondshttps://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 wheels1.5.1 (2023-12-06)
- Add support for Python 3.12
- Fix child callgrind functions disappearSigned-off-by Tim Orling <[email protected]>---
All tests pass on qemux86-64
Upstream GitHub Actions CI also passed with submitted patches.../ptest-packagelists-meta-python.inc | 2 +- ...nality-convert-line-endings-to-Unix.patch} | 120 +++++------------- ...port-of-tests.utils-to-enable-pytest.patch | 101 +++++++++++++++ .../0002-add-3.11-to-the-setup.patch | 26 ---- .../python/python3-yappi/run-ptest | 2 +- .../python/python3-yappi_1.4.0.bb | 36 ------ .../python/python3-yappi_1.6.0.bb | 37 ++++++ 7 files changed, 175 insertions(+), 149 deletions(-) rename meta-python/recipes-devtools/python/python3-yappi/{0001-Fix-imports-for-ptests.patch => 0001-test_functionality-convert-line-endings-to-Unix.patch} (95%) create mode 100644 meta-python/recipes-devtools/python/python3-yappi/0002-Fix-import-of-tests.utils-to-enable-pytest.patch delete mode 100644 meta-python/recipes-devtools/python/python3-yappi/0002-add-3.11-to-the-setup.patch delete mode 100644 meta-python/recipes-devtools/python/python3-yappi_1.4.0.bb create mode 100644 meta-python/recipes-devtools/python/python3-yappi_1.6.0.bbmeta-python/conf/include/ptest-packagelists-meta-python.inc +1
-1@@ -54,6 +54,7 @@ PTESTS_FAST_META_PYTHON = "\ PTESTS_SLOW_META_PYTHON = "\ python3-lz4 \ + python3-yappi \ " PTESTS_PROBLEMS_META_PYTHON ="\@@ -82,6 +83,5 @@ PTESTS_PROBLEMS_META_PYTHON ="\ python3-whoosh \ python3-ujson \ python3-xlrd \ - python3-yappi \ python3-yarl \ "meta-python/recipes-devtools/python/python3-yappi/0001-test_functionality-convert-line-endings-to-Unix.patch renamed from meta-python/recipes-devtools/python/python3-yappi/0001-Fix-imports-for-ptests.patch +35
-85@@ -1,44 +1,23 @@ -From 0dedc1c573ddc4e87475eb03c64555cd54a72e92 Mon Sep 17 00:00:00 2001 -From: Trevor Gamblin <[email protected]> -Date: Mon, 7 Jun 2021 09:40:20 -0400 -Subject: [PATCH] Fix imports for tests +From 0136ca731cba8b056b3f2ff0e7df3953b94f1e87 Mon Sep 17 00:00:00 2001 +From: Tim Orling <[email protected]> +Date: Sun, 24 Dec 2023 09:41:57 -0800 +Subject: [PATCH 1/2] test_functionality: convert line endings to Unix -Signed-off-by: Trevor Gamblin <[email protected]> ---- -Upstream-Status: Pending +Convert the Windows line endings with dos2unix to be like the +other files in tests/* + +Upstream-Status: Submitted [https://github.com/sumerc/yappi/pull/164] - tests/test_asyncio.py | 2 +- - tests/test_asyncio_context_vars.py | 2 +- - tests/test_functionality.py | 2 +- - tests/test_hooks.py | 2 +- - tests/test_tags.py | 2 +- - 5 files changed, 6 insertions(+), 6 deletions(-) +Signed-off-by: Tim Orling <[email protected]> +--- + tests/test_functionality.py | 3822 +++++++++++++++++------------------ + 1 file changed, 1911 insertions(+), 1911 deletions(-) ---- a/tests/test_asyncio.py -+++ b/tests/test_asyncio.py -@@ -2,7 +2,7 @@ import unittest - import yappi - import asyncio - import threading --from utils import YappiUnitTestCase, find_stat_by_name, burn_cpu, burn_io -+from .utils import YappiUnitTestCase, find_stat_by_name, burn_cpu, burn_io - - - async def async_sleep(sec): ---- a/tests/test_asyncio_context_vars.py -+++ b/tests/test_asyncio_context_vars.py -@@ -5,7 +5,7 @@ import contextvars - import functools - import time - import os --import utils -+import tests.utils as utils - import yappi - - async_context_id = contextvars.ContextVar('async_context_id') +diff --git a/tests/test_functionality.py b/tests/test_functionality.py +index 0e99c47..38bbe67 100644 --- a/tests/test_functionality.py +++ b/tests/test_functionality.py -@@ -1,1916 +1,1916 @@ +@@ -1,1911 +1,1911 @@ -import os -import sys -import time@@ -47,7 +26,7 @@ Upstream-Status: Pending -import yappi -import _yappi -import utils --import multiprocessing # added to fix http://bugs.python.org/issue15881 for > Py2.6 +-import multiprocessing -import subprocess - -_counter = 0@@ -318,10 +297,10 @@ Upstream-Status: Pending - def test_profile_decorator(self): - - def aggregate(func, stats): -- fname = "tests/%s.profile" % (func.__name__) +- fname = f"tests/{func.__name__}.profile" - try: - stats.add(fname) -- except IOError: +- except OSError: - pass - stats.save(fname) - raise Exception("messing around")@@ -1232,7 +1211,7 @@ Upstream-Status: Pending - # TODO: I put dummy() to fix below, remove the comments after a while. - self.assertTrue( # FIX: I see this fails sometimes? - tsm is not None, -- 'Could not find "_MainThread". Found: %s' % (', '.join(utils.get_stat_names(tstats)))) +- f"Could not find \"_MainThread\". Found: {', '.join(utils.get_stat_names(tstats))}") - - def test_ctx_stats(self): - from threading import Thread@@ -1312,7 +1291,7 @@ Upstream-Status: Pending - # TODO: I put dummy() to fix below, remove the comments after a while. - self.assertTrue( # FIX: I see this fails sometimes - tsmain is not None, -- 'Could not find "_MainThread". Found: %s' % (', '.join(utils.get_stat_names(stats)))) +- f"Could not find \"_MainThread\". Found: {', '.join(utils.get_stat_names(stats))}") - self.assertTrue(1.0 > tst2.ttot >= 0.5) - self.assertTrue(1.0 > tst1.ttot >= 0.5) -@@ -1369,7 +1348,7 @@ Upstream-Status: Pending - ts = [] - for i in (0.01, 0.05, 0.1): - t = threading.Thread(target=burn_cpu, args=(i, )) -- t.name = "burn_cpu-%s" % str(i) +- t.name = f"burn_cpu-{str(i)}" - t.start() - ts.append(t) - for t in ts:@@ -1396,10 +1375,7 @@ Upstream-Status: Pending - def test_producer_consumer_with_queues(self): - # we currently just stress yappi, no functionality test is done here. - yappi.start() -- if utils.is_py3x(): -- from queue import Queue -- else: -- from Queue import Queue +- from queue import Queue - from threading import Thread - WORKER_THREAD_COUNT = 50 - WORK_ITEM_COUNT = 2000@@ -1458,7 +1434,6 @@ Upstream-Status: Pending - fsh = utils.find_stat_by_name(stats, "handler") - self.assertTrue(fsh is not None) - -- @unittest.skipIf(not sys.version_info >= (3, 2), "requires Python 3.2") - def test_concurrent_futures(self): - yappi.start() - from concurrent.futures import ThreadPoolExecutor@@ -1468,7 +1443,6 @@ Upstream-Status: Pending - time.sleep(1.0) - yappi.stop() - -- @unittest.skipIf(not sys.version_info >= (3, 2), "requires Python 3.2") - def test_barrier(self): - yappi.start() - b = threading.Barrier(2, timeout=1)@@ -1962,8 +1936,8 @@ Upstream-Status: Pending +import unittest +import yappi +import _yappi -+import tests.utils as utils -+import multiprocessing # added to fix http://bugs.python.org/issue15881 for > Py2.6 ++import utils ++import multiprocessing +import subprocess + +_counter = 0@@ -2234,10 +2208,10 @@ Upstream-Status: Pending + def test_profile_decorator(self): + + def aggregate(func, stats): -+ fname = "tests/%s.profile" % (func.__name__) ++ fname = f"tests/{func.__name__}.profile" + try: + stats.add(fname) -+ except IOError: ++ except OSError: + pass + stats.save(fname) + raise Exception("messing around")@@ -3007,8 +2981,8 @@ Upstream-Status: Pending + + def test_issue_32(self): + ''' -+ Start yappi from different thread and we get Internal Error(15) as -+ the current_ctx_id() called while enumerating the threads in start() ++ Start yappi from different thread and we get Internal Error(15) as ++ the current_ctx_id() called while enumerating the threads in start() + and as it does not swap to the enumerated ThreadState* the THreadState_GetDict() + returns wrong object and thus sets an invalid id for the _ctx structure. +@@ -3148,7 +3122,7 @@ Upstream-Status: Pending + # TODO: I put dummy() to fix below, remove the comments after a while. + self.assertTrue( # FIX: I see this fails sometimes? + tsm is not None, -+ 'Could not find "_MainThread". Found: %s' % (', '.join(utils.get_stat_names(tstats)))) ++ f"Could not find \"_MainThread\". Found: {', '.join(utils.get_stat_names(tstats))}") + + def test_ctx_stats(self): + from threading import Thread@@ -3228,7 +3202,7 @@ Upstream-Status: Pending + # TODO: I put dummy() to fix below, remove the comments after a while. + self.assertTrue( # FIX: I see this fails sometimes + tsmain is not None, -+ 'Could not find "_MainThread". Found: %s' % (', '.join(utils.get_stat_names(stats)))) ++ f"Could not find \"_MainThread\". Found: {', '.join(utils.get_stat_names(stats))}") + self.assertTrue(1.0 > tst2.ttot >= 0.5) + self.assertTrue(1.0 > tst1.ttot >= 0.5) +@@ -3285,7 +3259,7 @@ Upstream-Status: Pending + ts = [] + for i in (0.01, 0.05, 0.1): + t = threading.Thread(target=burn_cpu, args=(i, )) -+ t.name = "burn_cpu-%s" % str(i) ++ t.name = f"burn_cpu-{str(i)}" + t.start() + ts.append(t) + for t in ts:@@ -3312,10 +3286,7 @@ Upstream-Status: Pending + def test_producer_consumer_with_queues(self): + # we currently just stress yappi, no functionality test is done here. + yappi.start() -+ if utils.is_py3x(): -+ from queue import Queue -+ else: -+ from Queue import Queue ++ from queue import Queue + from threading import Thread + WORKER_THREAD_COUNT = 50 + WORK_ITEM_COUNT = 2000@@ -3374,7 +3345,6 @@ Upstream-Status: Pending + fsh = utils.find_stat_by_name(stats, "handler") + self.assertTrue(fsh is not None) + -+ @unittest.skipIf(not sys.version_info >= (3, 2), "requires Python 3.2") + def test_concurrent_futures(self): + yappi.start() + from concurrent.futures import ThreadPoolExecutor@@ -3384,7 +3354,6 @@ Upstream-Status: Pending + time.sleep(1.0) + yappi.stop() + -+ @unittest.skipIf(not sys.version_info >= (3, 2), "requires Python 3.2") + def test_barrier(self): + yappi.start() + b = threading.Barrier(2, timeout=1)@@ -3871,25 +3840,6 @@ Upstream-Status: Pending + # import sys;sys.argv = ['', 'BasicUsage.test_run_as_script'] + # import sys;sys.argv = ['', 'MultithreadedScenarios.test_subsequent_profile'] + unittest.main() ---- a/tests/test_hooks.py -+++ b/tests/test_hooks.py -@@ -5,7 +5,7 @@ import unittest - import time - - import yappi --import utils -+import tests.utils as utils - - - def a(): ---- a/tests/test_tags.py -+++ b/tests/test_tags.py -@@ -2,7 +2,7 @@ import unittest - import yappi - import threading - import time --from utils import YappiUnitTestCase, find_stat_by_name, burn_cpu, burn_io -+from .utils import YappiUnitTestCase, find_stat_by_name, burn_cpu, burn_io - - - class MultiThreadTests(YappiUnitTestCase): +-- +2.34.1 +meta-python/recipes-devtools/python/python3-yappi/0002-Fix-import-of-tests.utils-to-enable-pytest.patch new file +101
-0@@ -0,0 +1,101 @@ +From 28eac38566327091221aabbc164ea8e433c66e7e Mon Sep 17 00:00:00 2001 +From: Tim Orling <[email protected]> +Date: Sun, 24 Dec 2023 09:27:50 -0800 +Subject: [PATCH 2/2] Fix import of tests.utils to enable pytest + +Running the test cases with pytest leads to importlib errors +because the "utils" module cannot be found. + +Upstream-Status: Submitted [https://github.com/sumerc/yappi/pull/164] + +Signed-off-by: Tim Orling <[email protected]> +--- + tests/test_asyncio.py | 2 +- + tests/test_asyncio_context_vars.py | 2 +- + tests/test_functionality.py | 2 +- + tests/test_gevent.py | 2 +- + tests/test_hooks.py | 2 +- + tests/test_tags.py | 2 +- + 6 files changed, 6 insertions(+), 6 deletions(-) + +diff --git a/tests/test_asyncio.py b/tests/test_asyncio.py +index 8e9e631..bb36f4a 100644 +--- a/tests/test_asyncio.py ++++ b/tests/test_asyncio.py +@@ -2,7 +2,7 @@ import unittest + import yappi + import asyncio + import threading +-from utils import YappiUnitTestCase, find_stat_by_name, burn_cpu, burn_io ++from tests.utils import YappiUnitTestCase, find_stat_by_name, burn_cpu, burn_io + + + async def async_sleep(sec): +diff --git a/tests/test_asyncio_context_vars.py b/tests/test_asyncio_context_vars.py +index 5bd750c..9a253c0 100644 +--- a/tests/test_asyncio_context_vars.py ++++ b/tests/test_asyncio_context_vars.py +@@ -5,7 +5,7 @@ import contextvars + import functools + import time + import os +-import utils ++import tests.utils as utils + import yappi + + async_context_id = contextvars.ContextVar('async_context_id') +diff --git a/tests/test_functionality.py b/tests/test_functionality.py +index 38bbe67..8098f17 100644 +--- a/tests/test_functionality.py ++++ b/tests/test_functionality.py +@@ -5,7 +5,7 @@ import threading + import unittest + import yappi + import _yappi +-import utils ++import tests.utils as utils + import multiprocessing + import subprocess + +diff --git a/tests/test_gevent.py b/tests/test_gevent.py +index ed9e6ae..502af5f 100644 +--- a/tests/test_gevent.py ++++ b/tests/test_gevent.py +@@ -2,7 +2,7 @@ import unittest + import _yappi + import yappi + import threading +-from utils import ( ++from tests.utils import ( + YappiUnitTestCase, find_stat_by_name, burn_cpu, burn_io, burn_io_gevent + ) + +diff --git a/tests/test_hooks.py b/tests/test_hooks.py +index 297c643..8c387fc 100644 +--- a/tests/test_hooks.py ++++ b/tests/test_hooks.py +@@ -5,7 +5,7 @@ import unittest + import time + + import yappi +-import utils ++import tests.utils as utils + + + def a(): +diff --git a/tests/test_tags.py b/tests/test_tags.py +index b0b531d..b5a4016 100644 +--- a/tests/test_tags.py ++++ b/tests/test_tags.py +@@ -2,7 +2,7 @@ import unittest + import yappi + import threading + import time +-from utils import YappiUnitTestCase, find_stat_by_name, burn_cpu, burn_io ++from tests.utils import YappiUnitTestCase, find_stat_by_name, burn_cpu, burn_io + + + class MultiThreadTests(YappiUnitTestCase): +-- +2.34.1 +meta-python/recipes-devtools/python/python3-yappi/0002-add-3.11-to-the-setup.patch deleted +0
-26@@ -1,26 +0,0 @@ -From 38afdacf526410f970afc58e147c7377c6c7112c Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?S=C3=BCmer=20Cip?= <[email protected]> -Date: Fri, 25 Nov 2022 15:58:03 +0300 -Subject: [PATCH 2/2] add 3.11 to the setup - ---- -Upstream-Status: Pending - - setup.py | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/setup.py b/setup.py -index d006787..96e2a66 100644 ---- a/setup.py -+++ b/setup.py -@@ -56,6 +56,7 @@ CLASSIFIERS = [ - 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: 3.9', - 'Programming Language :: Python :: 3.10', -+ 'Programming Language :: Python :: 3.11', - 'Programming Language :: Python :: Implementation :: CPython', - 'Operating System :: OS Independent', - 'Topic :: Software Development :: Libraries', --- -2.30.2 -meta-python/recipes-devtools/python/python3-yappi/run-ptest +1
-1@@ -1,3 +1,3 @@ #!/bin/sh -pytest -o log_cli=true -o log_cli_level=INFO | sed -e 's/\[...%\]//g'| sed -e 's/PASSED/PASS/g'| sed -e 's/FAILED/FAIL/g'|sed -e 's/SKIPED/SKIP/g'| awk '{if ($NF=="PASS" || $NF=="FAIL" || $NF=="SKIP" || $NF=="XFAIL" || $NF=="XPASS"){printf "%s: %s\n", $NF, $0}else{print}}'| awk '{if ($NF=="PASS" || $NF=="FAIL" || $NF=="SKIP" || $NF=="XFAIL" || $NF=="XPASS") {$NF="";print $0}else{print}}' +pytest --automakemeta-python/recipes-devtools/python/python3-yappi_1.4.0.bb deleted +0
-36@@ -1,36 +0,0 @@ -SUMMARY = "Yet Another Python Profiler" -HOMEPAGE = "https://github.com/sumerc/yappi" - -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE;md5=71c208c9a4fd864385eb69ad4caa3bee" - -SRC_URI[sha256sum] = "504b5d8fc7433736cb5e257991d2e7f2946019174f1faec7b2fe947881a17fc0" - -SRC_URI += " \ - file://run-ptest \ - file://0001-Fix-imports-for-ptests.patch \ - file://0002-add-3.11-to-the-setup.patch \ -" - -inherit pypi setuptools3 ptest - -RDEPENDS:${PN} += "\ - ${PYTHON_PN}-datetime \ - ${PYTHON_PN}-pickle \ - ${PYTHON_PN}-threading \ -" - -RDEPENDS:${PN}-ptest += " \ - ${PYTHON_PN}-gevent \ - ${PYTHON_PN}-multiprocessing \ - ${PYTHON_PN}-pytest \ - ${PYTHON_PN}-profile \ - ${PYTHON_PN}-zopeinterface \ -" - -do_install_ptest() { - install -d ${D}${PTEST_PATH}/tests - cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/ - cp -f ${S}/yappi/yappi.py ${D}/${PTEST_PATH}/ -} -meta-python/recipes-devtools/python/python3-yappi_1.6.0.bb new file +37
-1@@ -0,0 +1,37 @@ +SUMMARY = "Yet Another Python Profiler" +HOMEPAGE = "https://github.com/sumerc/yappi" + +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=71c208c9a4fd864385eb69ad4caa3bee" + +SRC_URI[sha256sum] = "a9aaf72009d8c03067294151ee0470ac7a6dfa7b33baab40b198d6c1ef00430a" + +SRC_URI += " \ + file://run-ptest \ + file://0001-test_functionality-convert-line-endings-to-Unix.patch \ + file://0002-Fix-import-of-tests.utils-to-enable-pytest.patch \ +" + +inherit pypi python_setuptools_build_meta ptest + +RDEPENDS:${PN} += "\ + python3-datetime \ + python3-pickle \ + python3-threading \ +" + +RDEPENDS:${PN}-ptest += " \ + python3-gevent \ + python3-multiprocessing \ + python3-pytest \ + python3-profile \ + python3-unittest-automake-output \ + python3-zopeinterface \ +" + +do_install_ptest() { + install -d ${D}${PTEST_PATH}/tests + cp -rf ${S}/tests ${D}${PTEST_PATH} + cp -f ${S}/run_tests.py ${D}${PTEST_PATH} +} + --2.34.1
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#107782): https://lists.openembedded.org/g/openembedded-devel/message/107782
Mute This Topic: https://lists.openembedded.org/mt/103350816/924729
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
Seems there was an issue with most likely Windows -> Unix line endings causing the email patch to not apply. I had a similar problem with the prior upgrade from Alex.
Pushed to a rebased branch on top of today's master-next:
https://git.openembedded.org/meta-openembedded-contrib/commit/?h=timo/python3-yappi-ptest
Quoted 653 lines · Khem Raj
right, its in master-next already.
Quoted 2 lines · Tim Orling
Gentle ping. This one supersedes the on from Alex, since it fixes the
priests.
Quoted 2 lines
On Sun, Dec 24, 2023 at 10:13 AM Tim Orling via lists.openembedded.org
Quoted 9 lines · <[email protected]> wrote:
Quoted 9 lines
* Switch to the
python_setuptools_build_metaPEP-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 ofyappi.pyin ptest; use site-packages as intended
* Drop complex run-ptest and simply run 'pytest --automake'
* Move out of "problems" group to "slow" group inptest-packageslists-meta-python.inc
Quoted 20 lines
Quoted 20 lines
- can now build meta-python-image-ptest-python3-yappi
- tests take about 45 secondshttps://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 wheels1.5.1 (2023-12-06)
- Add support for Python 3.12
- Fix child callgrind functions disappearSigned-off-by Tim Orling <[email protected]>---
All tests pass on qemux86-64
Upstream GitHub Actions CI also passed with submitted patchesQuoted 9 lines
Quoted 9 lines
.../ptest-packagelists-meta-python.inc | 2 +- ...nality-convert-line-endings-to-Unix.patch} | 120 +++++------------- ...port-of-tests.utils-to-enable-pytest.patch | 101 +++++++++++++++ .../0002-add-3.11-to-the-setup.patch | 26 ---- .../python/python3-yappi/run-ptest | 2 +- .../python/python3-yappi_1.4.0.bb | 36 ------ .../python/python3-yappi_1.6.0.bb | 37 ++++++ 7 files changed, 175 insertions(+), 149 deletions(-)rename
meta-python/recipes-devtools/python/python3-yappi/{0001-Fix-imports-for-ptests.patch=> 0001-test_functionality-convert-line-endings-to-Unix.patch} (95%)Quoted 1 line
Quoted 1 line
create mode 100644
meta-python/recipes-devtools/python/python3-yappi/0002-Fix-import-of-tests.utils-to-enable-pytest.patchQuoted 1 line
Quoted 1 line
delete mode 100644
meta-python/recipes-devtools/python/python3-yappi/0002-add-3.11-to-the-setup.patchQuoted 1 line
Quoted 1 line
delete mode 100644 meta-python/recipes-devtools/python/python3-yappi_1.4.0.bb
Quoted 1 line
Quoted 1 line
create mode 100644 meta-python/recipes-devtools/python/python3-yappi_1.6.0.bb
Quoted 2 lines
Quoted 2 lines
diff --git
a/meta-python/conf/include/ptest-packagelists-meta-python.inc b/meta-python/conf/include/ptest-packagelists-meta-python.inc
Quoted 10 lines
Quoted 10 lines
index
3272d98192..e1732c6177100644meta-python/conf/include/ptest-packagelists-meta-python.inc +1
-0@@ -54,6 +54,7 @@ PTESTS_FAST_META_PYTHON = "\ PTESTS_SLOW_META_PYTHON = "\ python3-lz4 \ + python3-yappi \ "Quoted 9 lines
Quoted 9 lines
meta-python/conf/include/ptest-packagelists-meta-python.inc +0
-1PTESTS_PROBLEMS_META_PYTHON ="\@@ -82,6 +83,5 @@ PTESTS_PROBLEMS_META_PYTHON ="\ python3-whoosh \ python3-ujson \ python3-xlrd \ - python3-yappi \ python3-yarl \ "diff --git
a/meta-python/recipes-devtools/python/python3-yappi/0001-Fix-imports-for-ptests.patchb/meta-python/recipes-devtools/python/python3-yappi/0001-test_functionality-convert-line-endings-to-Unix.patchQuoted 2 lines
Quoted 2 lines
similarity index 95%
rename from
meta-python/recipes-devtools/python/python3-yappi/0001-Fix-imports-for-ptests.patchQuoted 1 line
Quoted 1 line
rename to
meta-python/recipes-devtools/python/python3-yappi/0001-test_functionality-convert-line-endings-to-Unix.patchQuoted 2 lines
Quoted 2 lines
index
476db4b7d0..70d4607c29100644
---
a/meta-python/recipes-devtools/python/python3-yappi/0001-Fix-imports-for-ptests.patchQuoted 1 line
Quoted 1 line
+++
b/meta-python/recipes-devtools/python/python3-yappi/0001-test_functionality-convert-line-endings-to-Unix.patchQuoted 29 lines
Quoted 29 lines
meta-python/conf/include/ptest-packagelists-meta-python.inc +12
-13@@ -1,44 +1,23 @@ -From 0dedc1c573ddc4e87475eb03c64555cd54a72e92 Mon Sep 17 00:00:00 2001 -From: Trevor Gamblin <[email protected]> -Date: Mon, 7 Jun 2021 09:40:20 -0400 -Subject: [PATCH] Fix imports for tests +From 0136ca731cba8b056b3f2ff0e7df3953b94f1e87 Mon Sep 17 00:00:00 2001 +From: Tim Orling <[email protected]> +Date: Sun, 24 Dec 2023 09:41:57 -0800 +Subject: [PATCH 1/2] test_functionality: convert line endings to Unix -Signed-off-by: Trevor Gamblin <[email protected]> ---- -Upstream-Status: Pending +Convert the Windows line endings with dos2unix to be like the +other files in tests/* + +Upstream-Status: Submitted [https://github.com/sumerc/yappi/pull/164] - tests/test_asyncio.py | 2 +- - tests/test_asyncio_context_vars.py | 2 +- - tests/test_functionality.py | 2 +- - tests/test_hooks.py | 2 +- - tests/test_tags.py | 2 +- - 5 files changed, 6 insertions(+), 6 deletions(-) +Signed-off-by: Tim Orling <[email protected]> +--- + tests/test_functionality.py | 3822 +++++++++++++++++------------------ + 1 file changed, 1911 insertions(+), 1911 deletions(-)Quoted 7 lines
meta-python/conf/include/ptest-packagelists-meta-python.inc line 23
Quoted 7 lines
meta-python/conf/include/ptest-packagelists-meta-python.inc +0
-7---- a/tests/test_asyncio.py -+++ b/tests/test_asyncio.py -@@ -2,7 +2,7 @@ import unittest - import yappi - import asyncio - import threading --from utils import YappiUnitTestCase, find_stat_by_name, burn_cpu,
burn_ioQuoted 1 line
meta-python/conf/include/ptest-packagelists-meta-python.inc line 24
Quoted 1 line
meta-python/conf/include/ptest-packagelists-meta-python.inc +0
-1-+from .utils import YappiUnitTestCase, find_stat_by_name, burn_cpu,
burn_ioQuoted 20 lines
Quoted 20 lines
meta-python/conf/include/ptest-packagelists-meta-python.inc +3
-15- - - async def async_sleep(sec): ---- a/tests/test_asyncio_context_vars.py -+++ b/tests/test_asyncio_context_vars.py -@@ -5,7 +5,7 @@ import contextvars - import functools - import time - import os --import utils -+import tests.utils as utils - import yappi - - async_context_id = contextvars.ContextVar('async_context_id') +diff --git a/tests/test_functionality.py b/tests/test_functionality.py +index 0e99c47..38bbe67 100644 --- a/tests/test_functionality.py +++ b/tests/test_functionality.py -@@ -1,1916 +1,1916 @@ +@@ -1,1911 +1,1911 @@Quoted 8 lines
meta-python/conf/include/ptest-packagelists-meta-python.inc Upstream-Status: Pending · line 50
Quoted 8 lines
meta-python/conf/include/ptest-packagelists-meta-python.inc +0
-1-import os -import sys -import time@@ -47,7 +26,7 @@ Upstream-Status: Pending -import yappi -import _yappi -import utils --import multiprocessing # added to fixhttp://bugs.python.org/issue15881 for > Py2.6
Quoted 11 lines
Quoted 11 lines
meta-python/conf/include/ptest-packagelists-meta-python.inc +2
-1+-import multiprocessing -import subprocess - -_counter = 0@@ -318,10 +297,10 @@ Upstream-Status: Pending - def test_profile_decorator(self): - - def aggregate(func, stats): -- fname = "tests/%s.profile" % (func.__name__) +- fname = f"tests/{func.__name__}.profile" - try:Quoted 8 lines
meta-python/conf/include/ptest-packagelists-meta-python.inc Upstream-Status: Pending · line 1211
Quoted 8 lines
meta-python/conf/include/ptest-packagelists-meta-python.inc +1
-1- stats.add(fname) -- except IOError: +- except OSError: - pass - stats.save(fname) - raise Exception("messing around")@@ -1232,7 +1211,7 @@ Upstream-Status: Pending - # TODO: I put dummy() to fix below, remove the comments aftera while.
Quoted 3 lines
meta-python/conf/include/ptest-packagelists-meta-python.inc Upstream-Status: Pending · line 1235
Quoted 3 lines
meta-python/conf/include/ptest-packagelists-meta-python.inc +0
-1- self.assertTrue( # FIX: I see this fails sometimes? - tsm is not None, -- 'Could not find "_MainThread". Found: %s' % (','.join(utils.get_stat_names(tstats))))
Quoted 1 line
meta-python/conf/include/ptest-packagelists-meta-python.inc Upstream-Status: Pending · line 1214
Quoted 1 line
meta-python/conf/include/ptest-packagelists-meta-python.inc +1
-0+- f"Could not find \"_MainThread\". Found: {','.join(utils.get_stat_names(tstats))}")
Quoted 5 lines
meta-python/conf/include/ptest-packagelists-meta-python.inc Upstream-Status: Pending · line 1291
Quoted 5 lines
meta-python/conf/include/ptest-packagelists-meta-python.inc +0
-0- - def test_ctx_stats(self): - from threading import Thread@@ -1312,7 +1291,7 @@ Upstream-Status: Pending - # TODO: I put dummy() to fix below, remove the comments aftera while.
Quoted 3 lines
meta-python/conf/include/ptest-packagelists-meta-python.inc Upstream-Status: Pending · line 1315
Quoted 3 lines
meta-python/conf/include/ptest-packagelists-meta-python.inc +0
-1- self.assertTrue( # FIX: I see this fails sometimes - tsmain is not None, -- 'Could not find "_MainThread". Found: %s' % (','.join(utils.get_stat_names(stats))))
Quoted 1 line
meta-python/conf/include/ptest-packagelists-meta-python.inc Upstream-Status: Pending · line 1294
Quoted 1 line
meta-python/conf/include/ptest-packagelists-meta-python.inc +1
-0+- f"Could not find \"_MainThread\". Found: {','.join(utils.get_stat_names(stats))}")
Quoted 7 lines
Quoted 7 lines
meta-python/conf/include/ptest-packagelists-meta-python.inc +0
-0- self.assertTrue(1.0 > tst2.ttot >= 0.5) - self.assertTrue(1.0 > tst1.ttot >= 0.5) -@@ -1369,7 +1348,7 @@ Upstream-Status: Pending - ts = [] - for i in (0.01, 0.05, 0.1): - t = threading.Thread(target=burn_cpu, args=(i, ))Quoted 8 lines
meta-python/conf/include/ptest-packagelists-meta-python.inc Upstream-Status: Pending · line 1376
Quoted 8 lines
meta-python/conf/include/ptest-packagelists-meta-python.inc +1
-1-- t.name = "burn_cpu-%s" % str(i) +- t.name = f"burn_cpu-{str(i)}" - t.start() - ts.append(t) - for t in ts:@@ -1396,10 +1375,7 @@ Upstream-Status: Pending - def test_producer_consumer_with_queues(self): - # we currently just stress yappi, no functionality test isdone here.
Quoted 6 lines
Quoted 6 lines
meta-python/conf/include/ptest-packagelists-meta-python.inc +1
-4- yappi.start() -- if utils.is_py3x(): -- from queue import Queue -- else: -- from Queue import Queue +- from queue import QueueQuoted 8 lines
meta-python/conf/include/ptest-packagelists-meta-python.inc Upstream-Status: Pending · line 1461
Quoted 8 lines
meta-python/conf/include/ptest-packagelists-meta-python.inc +0
-1- from threading import Thread - WORKER_THREAD_COUNT = 50 - WORK_ITEM_COUNT = 2000@@ -1458,7 +1434,6 @@ Upstream-Status: Pending - fsh = utils.find_stat_by_name(stats, "handler") - self.assertTrue(fsh is not None) - -- @unittest.skipIf(not sys.version_info >= (3, 2), "requires Python3.2")
Quoted 8 lines
meta-python/conf/include/ptest-packagelists-meta-python.inc Upstream-Status: Pending · line 1471
Quoted 8 lines
meta-python/conf/include/ptest-packagelists-meta-python.inc +0
-1- def test_concurrent_futures(self): - yappi.start() - from concurrent.futures import ThreadPoolExecutor@@ -1468,7 +1443,6 @@ Upstream-Status: Pending - time.sleep(1.0) - yappi.stop() - -- @unittest.skipIf(not sys.version_info >= (3, 2), "requires Python3.2")
Quoted 9 lines
meta-python/conf/include/ptest-packagelists-meta-python.inc Upstream-Status: Pending · line 1966
Quoted 9 lines
meta-python/conf/include/ptest-packagelists-meta-python.inc +0
-2- def test_barrier(self): - yappi.start() - b = threading.Barrier(2, timeout=1)@@ -1962,8 +1936,8 @@ Upstream-Status: Pending +import unittest +import yappi +import _yappi -+import tests.utils as utils -+import multiprocessing # added to fixhttp://bugs.python.org/issue15881 for > Py2.6
Quoted 15 lines
Quoted 15 lines
meta-python/conf/include/ptest-packagelists-meta-python.inc +4
-2++import utils ++import multiprocessing +import subprocess + +_counter = 0@@ -2234,10 +2208,10 @@ Upstream-Status: Pending + def test_profile_decorator(self): + + def aggregate(func, stats): -+ fname = "tests/%s.profile" % (func.__name__) ++ fname = f"tests/{func.__name__}.profile" + try: + stats.add(fname) -+ except IOError: ++ except OSError:Quoted 8 lines
meta-python/conf/include/ptest-packagelists-meta-python.inc Upstream-Status: Pending · line 3010
Quoted 8 lines
meta-python/conf/include/ptest-packagelists-meta-python.inc +0
-1+ pass + stats.save(fname) + raise Exception("messing around")@@ -3007,8 +2981,8 @@ Upstream-Status: Pending + + def test_issue_32(self): + ''' -+ Start yappi from different thread and we get InternalError(15) as
Quoted 1 line
meta-python/conf/include/ptest-packagelists-meta-python.inc Upstream-Status: Pending · line 3011
Quoted 1 line
meta-python/conf/include/ptest-packagelists-meta-python.inc +0
-1-+ the current_ctx_id() called while enumerating the threads in
start()Quoted 1 line
meta-python/conf/include/ptest-packagelists-meta-python.inc Upstream-Status: Pending · line 2984
Quoted 1 line
meta-python/conf/include/ptest-packagelists-meta-python.inc +1
-0++ Start yappi from different thread and we get InternalError(15) as
Quoted 1 line
meta-python/conf/include/ptest-packagelists-meta-python.inc Upstream-Status: Pending · line 2985
Quoted 1 line
meta-python/conf/include/ptest-packagelists-meta-python.inc +1
-0++ the current_ctx_id() called while enumerating the threads in
start()Quoted 1 line
meta-python/conf/include/ptest-packagelists-meta-python.inc Upstream-Status: Pending · line 2986
Quoted 1 line
meta-python/conf/include/ptest-packagelists-meta-python.inc +0
-0+ and as it does not swap to the enumerated ThreadState* the
THreadState_GetDict()Quoted 1 line
meta-python/conf/include/ptest-packagelists-meta-python.inc Upstream-Status: Pending · line 2987
Quoted 1 line
meta-python/conf/include/ptest-packagelists-meta-python.inc +0
-0+ returns wrong object and thus sets an invalid id for the _ctxstructure.
Quoted 3 lines
meta-python/conf/include/ptest-packagelists-meta-python.inc Upstream-Status: Pending · line 3122
Quoted 3 lines
meta-python/conf/include/ptest-packagelists-meta-python.inc +0
-0+@@ -3148,7 +3122,7 @@ Upstream-Status: Pending + # TODO: I put dummy() to fix below, remove the comments aftera while.
Quoted 3 lines
meta-python/conf/include/ptest-packagelists-meta-python.inc Upstream-Status: Pending · line 3151
Quoted 3 lines
meta-python/conf/include/ptest-packagelists-meta-python.inc +0
-1+ self.assertTrue( # FIX: I see this fails sometimes? + tsm is not None, -+ 'Could not find "_MainThread". Found: %s' % (','.join(utils.get_stat_names(tstats))))
Quoted 1 line
meta-python/conf/include/ptest-packagelists-meta-python.inc Upstream-Status: Pending · line 3125
Quoted 1 line
meta-python/conf/include/ptest-packagelists-meta-python.inc +1
-0++ f"Could not find \"_MainThread\". Found: {','.join(utils.get_stat_names(tstats))}")
Quoted 5 lines
meta-python/conf/include/ptest-packagelists-meta-python.inc Upstream-Status: Pending · line 3202
Quoted 5 lines
meta-python/conf/include/ptest-packagelists-meta-python.inc +0
-0+ + def test_ctx_stats(self): + from threading import Thread@@ -3228,7 +3202,7 @@ Upstream-Status: Pending + # TODO: I put dummy() to fix below, remove the comments aftera while.
Quoted 3 lines
meta-python/conf/include/ptest-packagelists-meta-python.inc Upstream-Status: Pending · line 3231
Quoted 3 lines
meta-python/conf/include/ptest-packagelists-meta-python.inc +0
-1+ self.assertTrue( # FIX: I see this fails sometimes + tsmain is not None, -+ 'Could not find "_MainThread". Found: %s' % (','.join(utils.get_stat_names(stats))))
Quoted 1 line
meta-python/conf/include/ptest-packagelists-meta-python.inc Upstream-Status: Pending · line 3205
Quoted 1 line
meta-python/conf/include/ptest-packagelists-meta-python.inc +1
-0++ f"Could not find \"_MainThread\". Found: {','.join(utils.get_stat_names(stats))}")
Quoted 7 lines
Quoted 7 lines
meta-python/conf/include/ptest-packagelists-meta-python.inc +0
-0+ self.assertTrue(1.0 > tst2.ttot >= 0.5) + self.assertTrue(1.0 > tst1.ttot >= 0.5) +@@ -3285,7 +3259,7 @@ Upstream-Status: Pending + ts = [] + for i in (0.01, 0.05, 0.1): + t = threading.Thread(target=burn_cpu, args=(i, ))Quoted 8 lines
meta-python/conf/include/ptest-packagelists-meta-python.inc Upstream-Status: Pending · line 3287
Quoted 8 lines
meta-python/conf/include/ptest-packagelists-meta-python.inc +1
-1-+ t.name = "burn_cpu-%s" % str(i) ++ t.name = f"burn_cpu-{str(i)}" + t.start() + ts.append(t) + for t in ts:@@ -3312,10 +3286,7 @@ Upstream-Status: Pending + def test_producer_consumer_with_queues(self): + # we currently just stress yappi, no functionality test isdone here.
Quoted 6 lines
Quoted 6 lines
meta-python/conf/include/ptest-packagelists-meta-python.inc +1
-4+ yappi.start() -+ if utils.is_py3x(): -+ from queue import Queue -+ else: -+ from Queue import Queue ++ from queue import QueueQuoted 8 lines
meta-python/conf/include/ptest-packagelists-meta-python.inc Upstream-Status: Pending · line 3377
Quoted 8 lines
meta-python/conf/include/ptest-packagelists-meta-python.inc +0
-1+ from threading import Thread + WORKER_THREAD_COUNT = 50 + WORK_ITEM_COUNT = 2000@@ -3374,7 +3345,6 @@ Upstream-Status: Pending + fsh = utils.find_stat_by_name(stats, "handler") + self.assertTrue(fsh is not None) + -+ @unittest.skipIf(not sys.version_info >= (3, 2), "requires Python3.2")
Quoted 8 lines
meta-python/conf/include/ptest-packagelists-meta-python.inc Upstream-Status: Pending · line 3387
Quoted 8 lines
meta-python/conf/include/ptest-packagelists-meta-python.inc +0
-1+ def test_concurrent_futures(self): + yappi.start() + from concurrent.futures import ThreadPoolExecutor@@ -3384,7 +3354,6 @@ Upstream-Status: Pending + time.sleep(1.0) + yappi.stop() + -+ @unittest.skipIf(not sys.version_info >= (3, 2), "requires Python3.2")
Quoted 6 lines
meta-python/conf/include/ptest-packagelists-meta-python.inc Upstream-Status: Pending · line 3841
Quoted 6 lines
meta-python/conf/include/ptest-packagelists-meta-python.inc +0
-0+ def test_barrier(self): + yappi.start() + b = threading.Barrier(2, timeout=1)@@ -3871,25 +3840,6 @@ Upstream-Status: Pending + # import sys;sys.argv = ['', 'BasicUsage.test_run_as_script'] + # import sys;sys.argv = ['','MultithreadedScenarios.test_subsequent_profile']
Quoted 11 lines
Quoted 11 lines
meta-python/conf/include/ptest-packagelists-meta-python.inc +0
-10+ unittest.main() ---- a/tests/test_hooks.py -+++ b/tests/test_hooks.py -@@ -5,7 +5,7 @@ import unittest - import time - - import yappi --import utils -+import tests.utils as utils - -Quoted 8 lines
meta-python/conf/include/ptest-packagelists-meta-python.inc Upstream-Status: Pending · line 3891
Quoted 8 lines
meta-python/conf/include/ptest-packagelists-meta-python.inc +0
-8- def a(): ---- a/tests/test_tags.py -+++ b/tests/test_tags.py -@@ -2,7 +2,7 @@ import unittest - import yappi - import threading - import time --from utils import YappiUnitTestCase, find_stat_by_name, burn_cpu,
burn_ioQuoted 1 line
meta-python/conf/include/ptest-packagelists-meta-python.inc Upstream-Status: Pending · line 3892
Quoted 1 line
meta-python/conf/include/ptest-packagelists-meta-python.inc +0
-1-+from .utils import YappiUnitTestCase, find_stat_by_name, burn_cpu,
burn_ioQuoted 7 lines
Quoted 7 lines
meta-python/conf/include/ptest-packagelists-meta-python.inc +3
-3- - - class MultiThreadTests(YappiUnitTestCase): +-- +2.34.1 +diff --git
a/meta-python/recipes-devtools/python/python3-yappi/0002-Fix-import-of-tests.utils-to-enable-pytest.patchb/meta-python/recipes-devtools/python/python3-yappi/0002-Fix-import-of-tests.utils-to-enable-pytest.patchQuoted 4 lines
Quoted 4 lines
new file mode 100644
index 0000000000..96dd024125
---/dev/null
+++
b/meta-python/recipes-devtools/python/python3-yappi/0002-Fix-import-of-tests.utils-to-enable-pytest.patchQuoted 22 lines
Quoted 22 lines
meta-python/conf/include/ptest-packagelists-meta-python.inc +21
-0@@ -0,0 +1,101 @@ +From 28eac38566327091221aabbc164ea8e433c66e7e Mon Sep 17 00:00:00 2001 +From: Tim Orling <[email protected]> +Date: Sun, 24 Dec 2023 09:27:50 -0800 +Subject: [PATCH 2/2] Fix import of tests.utils to enable pytest + +Running the test cases with pytest leads to importlib errors +because the "utils" module cannot be found. + +Upstream-Status: Submitted [https://github.com/sumerc/yappi/pull/164] + +Signed-off-by: Tim Orling <[email protected]> +--- + tests/test_asyncio.py | 2 +- + tests/test_asyncio_context_vars.py | 2 +- + tests/test_functionality.py | 2 +- + tests/test_gevent.py | 2 +- + tests/test_hooks.py | 2 +- + tests/test_tags.py | 2 +- + 6 files changed, 6 insertions(+), 6 deletions(-) + +diff --git a/tests/test_asyncio.py b/tests/test_asyncio.pyQuoted 8 lines
meta-python/conf/include/ptest-packagelists-meta-python.inc line 29
Quoted 8 lines
meta-python/conf/include/ptest-packagelists-meta-python.inc +8
-0+index 8e9e631..bb36f4a 100644 +--- a/tests/test_asyncio.py ++++ b/tests/test_asyncio.py +@@ -2,7 +2,7 @@ import unittest + import yappi + import asyncio + import threading +-from utils import YappiUnitTestCase, find_stat_by_name, burn_cpu,
burn_ioQuoted 1 line
meta-python/conf/include/ptest-packagelists-meta-python.inc line 30
Quoted 1 line
meta-python/conf/include/ptest-packagelists-meta-python.inc +1
-0++from tests.utils import YappiUnitTestCase, find_stat_by_name,
burn_cpu,burn_ioQuoted 4 lines
meta-python/conf/include/ptest-packagelists-meta-python.inc line 34
Quoted 4 lines
meta-python/conf/include/ptest-packagelists-meta-python.inc +4
-0+ + + async def async_sleep(sec): +diff --git a/tests/test_asyncio_context_vars.py
b/tests/test_asyncio_context_vars.pyQuoted 28 lines
Quoted 28 lines
meta-python/conf/include/ptest-packagelists-meta-python.inc +28
-0+index 5bd750c..9a253c0 100644 +--- a/tests/test_asyncio_context_vars.py ++++ b/tests/test_asyncio_context_vars.py +@@ -5,7 +5,7 @@ import contextvars + import functools + import time + import os +-import utils ++import tests.utils as utils + import yappi + + async_context_id = contextvars.ContextVar('async_context_id') +diff --git a/tests/test_functionality.py b/tests/test_functionality.py +index 38bbe67..8098f17 100644 +--- a/tests/test_functionality.py ++++ b/tests/test_functionality.py +@@ -5,7 +5,7 @@ import threading + import unittest + import yappi + import _yappi +-import utils ++import tests.utils as utils + import multiprocessing + import subprocess + +diff --git a/tests/test_gevent.py b/tests/test_gevent.py +index ed9e6ae..502af5f 100644 +--- a/tests/test_gevent.pyQuoted 8 lines
meta-python/conf/include/ptest-packagelists-meta-python.inc line 70
Quoted 8 lines
meta-python/conf/include/ptest-packagelists-meta-python.inc +8
-0++++ b/tests/test_gevent.py +@@ -2,7 +2,7 @@ import unittest + import _yappi + import yappi + import threading +-from utils import ( ++from tests.utils import ( + YappiUnitTestCase, find_stat_by_name, burn_cpu, burn_io,
burn_io_geventQuoted 16 lines
Quoted 16 lines
meta-python/conf/include/ptest-packagelists-meta-python.inc +16
-0+ ) + +diff --git a/tests/test_hooks.py b/tests/test_hooks.py +index 297c643..8c387fc 100644 +--- a/tests/test_hooks.py ++++ b/tests/test_hooks.py +@@ -5,7 +5,7 @@ import unittest + import time + + import yappi +-import utils ++import tests.utils as utils + + + def a(): +diff --git a/tests/test_tags.py b/tests/test_tags.pyQuoted 8 lines
meta-python/conf/include/ptest-packagelists-meta-python.inc line 94
Quoted 8 lines
meta-python/conf/include/ptest-packagelists-meta-python.inc +8
-0+index b0b531d..b5a4016 100644 +--- a/tests/test_tags.py ++++ b/tests/test_tags.py +@@ -2,7 +2,7 @@ import unittest + import yappi + import threading + import time +-from utils import YappiUnitTestCase, find_stat_by_name, burn_cpu,
burn_ioQuoted 1 line
meta-python/conf/include/ptest-packagelists-meta-python.inc line 95
Quoted 1 line
meta-python/conf/include/ptest-packagelists-meta-python.inc +1
-0++from tests.utils import YappiUnitTestCase, find_stat_by_name,
burn_cpu,burn_ioQuoted 7 lines
Quoted 7 lines
meta-python/conf/include/ptest-packagelists-meta-python.inc +6
-0+ + + class MultiThreadTests(YappiUnitTestCase): +-- +2.34.1 +diff --git
a/meta-python/recipes-devtools/python/python3-yappi/0002-add-3.11-to-the-setup.patchb/meta-python/recipes-devtools/python/python3-yappi/0002-add-3.11-to-the-setup.patchQuoted 3 lines
Quoted 3 lines
deleted file mode 100644
index d40bd2b7cc..0000000000
---
a/meta-python/recipes-devtools/python/python3-yappi/0002-add-3.11-to-the-setup.patchQuoted 21 lines
Quoted 21 lines
+++
/dev/nullmeta-python/conf/include/ptest-packagelists-meta-python.inc +0
-19@@ -1,26 +0,0 @@ -From 38afdacf526410f970afc58e147c7377c6c7112c Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?S=C3=BCmer=20Cip?= <[email protected]> -Date: Fri, 25 Nov 2022 15:58:03 +0300 -Subject: [PATCH 2/2] add 3.11 to the setup - ---- -Upstream-Status: Pending - - setup.py | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/setup.py b/setup.py -index d006787..96e2a66 100644 ---- a/setup.py -+++ b/setup.py -@@ -56,6 +56,7 @@ CLASSIFIERS = [ - 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: 3.9', - 'Programming Language :: Python :: 3.10',Quoted 8 lines
Quoted 8 lines
meta-python/conf/include/ptest-packagelists-meta-python.inc +0
-7-+ 'Programming Language :: Python :: 3.11', - 'Programming Language :: Python :: Implementation :: CPython', - 'Operating System :: OS Independent', - 'Topic :: Software Development :: Libraries', --- -2.30.2 -diff --git
a/meta-python/recipes-devtools/python/python3-yappi/run-ptest b/meta-python/recipes-devtools/python/python3-yappi/run-ptest
Quoted 7 lines
meta-python/recipes-devtools/python/python3-yappi/run-ptest line 3
Quoted 7 lines
index
3385d68939..8d2017d39c100644meta-python/recipes-devtools/python/python3-yappi/run-ptest +0
-1@@ -1,3 +1,3 @@ #!/bin/sh -pytest -o log_cli=true -o log_cli_level=INFO | sed -e 's/\[...%\]//g'|sed -e 's/PASSED/PASS/g'| sed -e 's/FAILED/FAIL/g'|sed -e 's/SKIPED/SKIP/g'| awk '{if ($NF=="PASS" || $NF=="FAIL" || $NF=="SKIP" || $NF=="XFAIL" || $NF=="XPASS"){printf "%s: %s\n", $NF, $0}else{print}}'| awk '{if ($NF=="PASS" || $NF=="FAIL" || $NF=="SKIP" || $NF=="XFAIL" || $NF=="XPASS") {$NF="";print $0}else{print}}'
Quoted 2 lines
Review
Quoted 2 lines
meta-python/recipes-devtools/python/python3-yappi/run-ptest +1
-0+pytest --automake(quoted diff) +0
-0b/meta-python/recipes-devtools/python/python3-yappi_1.4.0.bb
Quoted 10 lines
meta-python/recipes-devtools/python/python3-yappi_1.4.0.bb line 5
Quoted 10 lines
deleted file mode 100644
index 71e74e86f2..0000000000meta-python/recipes-devtools/python/python3-yappi_1.4.0.bb deleted +0
-5@@ -1,36 +0,0 @@ -SUMMARY = "Yet Another Python Profiler" -HOMEPAGE = "https://github.com/sumerc/yappi" - -LICENSE = "MIT" -LIC_FILES_CHKSUM ="file://LICENSE;md5=71c208c9a4fd864385eb69ad4caa3bee"
Quoted 2 lines
meta-python/recipes-devtools/python/python3-yappi_1.4.0.bb line 7
Quoted 2 lines
meta-python/recipes-devtools/python/python3-yappi_1.4.0.bb deleted +0
-2- -SRC_URI[sha256sum] ="
504b5d8fc7433736cb5e257991d2e7f2946019174f1faec7b2fe947881a17fc0"Quoted 22 lines
Quoted 22 lines
meta-python/recipes-devtools/python/python3-yappi_1.4.0.bb deleted +0
-22- -SRC_URI += " \ - file://run-ptest \ - file://0001-Fix-imports-for-ptests.patch \ - file://0002-add-3.11-to-the-setup.patch \ -" - -inherit pypi setuptools3 ptest - -RDEPENDS:${PN} += "\ - ${PYTHON_PN}-datetime \ - ${PYTHON_PN}-pickle \ - ${PYTHON_PN}-threading \ -" - -RDEPENDS:${PN}-ptest += " \ - ${PYTHON_PN}-gevent \ - ${PYTHON_PN}-multiprocessing \ - ${PYTHON_PN}-pytest \ - ${PYTHON_PN}-profile \ - ${PYTHON_PN}-zopeinterface \ -"Quoted 8 lines
Review
Quoted 8 lines
meta-python/recipes-devtools/python/python3-yappi_1.4.0.bb deleted +0
-7- -do_install_ptest() { - install -d ${D}${PTEST_PATH}/tests - cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/ - cp -f ${S}/yappi/yappi.py ${D}/${PTEST_PATH}/ -} -(quoted diff) +0
-0b/meta-python/recipes-devtools/python/python3-yappi_1.6.0.bb
Quoted 10 lines
meta-python/recipes-devtools/python/python3-yappi_1.6.0.bb line 5
Quoted 10 lines
new file mode 100644
index 0000000000..4349cab1e7meta-python/recipes-devtools/python/python3-yappi_1.6.0.bb new file +5
-0@@ -0,0 +1,37 @@ +SUMMARY = "Yet Another Python Profiler" +HOMEPAGE = "https://github.com/sumerc/yappi" + +LICENSE = "MIT" +LIC_FILES_CHKSUM ="file://LICENSE;md5=71c208c9a4fd864385eb69ad4caa3bee"
Quoted 2 lines
meta-python/recipes-devtools/python/python3-yappi_1.6.0.bb line 7
Quoted 2 lines
meta-python/recipes-devtools/python/python3-yappi_1.6.0.bb new file +2
-0+ +SRC_URI[sha256sum] ="
a9aaf72009d8c03067294151ee0470ac7a6dfa7b33baab40b198d6c1ef00430a"Quoted 34 lines
Quoted 34 lines
meta-python/recipes-devtools/python/python3-yappi_1.6.0.bb new file +30
-1+ +SRC_URI += " \ + file://run-ptest \ + file://0001-test_functionality-convert-line-endings-to-Unix.patch \ + file://0002-Fix-import-of-tests.utils-to-enable-pytest.patch \ +" + +inherit pypi python_setuptools_build_meta ptest + +RDEPENDS:${PN} += "\ + python3-datetime \ + python3-pickle \ + python3-threading \ +" + +RDEPENDS:${PN}-ptest += " \ + python3-gevent \ + python3-multiprocessing \ + python3-pytest \ + python3-profile \ + python3-unittest-automake-output \ + python3-zopeinterface \ +" + +do_install_ptest() { + install -d ${D}${PTEST_PATH}/tests + cp -rf ${S}/tests ${D}${PTEST_PATH} + cp -f ${S}/run_tests.py ${D}${PTEST_PATH} +} + --2.34.1
Quoted 3 lines
Quoted 3 lines
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#107782):https://lists.openembedded.org/g/openembedded-devel/message/107782
Quoted 3 lines
Quoted 3 lines
Mute This Topic: https://lists.openembedded.org/mt/103350816/924729
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsubQuoted 2 lines
Quoted 2 lines
-=-=-=-=-=-=-=-=-=-=-=-
Quoted 6 lines · Tim Orling
Seems there was an issue with most likely Windows -> Unix line endings causing the email patch to not apply. I had a similar problem with the prior upgrade from Alex.
Pushed to a rebased branch on top of today's master-next:
https://git.openembedded.org/meta-openembedded-contrib/commit/?h=timo/python3-yappi-ptest
Thanks, It is better this time.
Quoted 580 lines · Khem Raj
Quoted 578 lines
right, its in master-next already.
Quoted 574 lines · Tim Orling
Gentle ping. This one supersedes the on from Alex, since it fixes the priests.
Quoted 570 lines · Tim Orling via lists.openembedded.org
* Switch to the
python_setuptools_build_metaPEP-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 ofyappi.pyin 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 secondshttps://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 wheels1.5.1 (2023-12-06)
- Add support for Python 3.12
- Fix child callgrind functions disappearSigned-off-by Tim Orling <[email protected]>---
All tests pass on qemux86-64
Upstream GitHub Actions CI also passed with submitted patches.../ptest-packagelists-meta-python.inc | 2 +- ...nality-convert-line-endings-to-Unix.patch} | 120 +++++------------- ...port-of-tests.utils-to-enable-pytest.patch | 101 +++++++++++++++ .../0002-add-3.11-to-the-setup.patch | 26 ---- .../python/python3-yappi/run-ptest | 2 +- .../python/python3-yappi_1.4.0.bb | 36 ------ .../python/python3-yappi_1.6.0.bb | 37 ++++++ 7 files changed, 175 insertions(+), 149 deletions(-) rename meta-python/recipes-devtools/python/python3-yappi/{0001-Fix-imports-for-ptests.patch => 0001-test_functionality-convert-line-endings-to-Unix.patch} (95%) create mode 100644 meta-python/recipes-devtools/python/python3-yappi/0002-Fix-import-of-tests.utils-to-enable-pytest.patch delete mode 100644 meta-python/recipes-devtools/python/python3-yappi/0002-add-3.11-to-the-setup.patch delete mode 100644 meta-python/recipes-devtools/python/python3-yappi_1.4.0.bb create mode 100644 meta-python/recipes-devtools/python/python3-yappi_1.6.0.bbmeta-python/conf/include/ptest-packagelists-meta-python.inc +1
-1@@ -54,6 +54,7 @@ PTESTS_FAST_META_PYTHON = "\ PTESTS_SLOW_META_PYTHON = "\ python3-lz4 \ + python3-yappi \ " PTESTS_PROBLEMS_META_PYTHON ="\@@ -82,6 +83,5 @@ PTESTS_PROBLEMS_META_PYTHON ="\ python3-whoosh \ python3-ujson \ python3-xlrd \ - python3-yappi \ python3-yarl \ "meta-python/recipes-devtools/python/python3-yappi/0001-test_functionality-convert-line-endings-to-Unix.patch renamed from meta-python/recipes-devtools/python/python3-yappi/0001-Fix-imports-for-ptests.patch +35
-85@@ -1,44 +1,23 @@ -From 0dedc1c573ddc4e87475eb03c64555cd54a72e92 Mon Sep 17 00:00:00 2001 -From: Trevor Gamblin <[email protected]> -Date: Mon, 7 Jun 2021 09:40:20 -0400 -Subject: [PATCH] Fix imports for tests +From 0136ca731cba8b056b3f2ff0e7df3953b94f1e87 Mon Sep 17 00:00:00 2001 +From: Tim Orling <[email protected]> +Date: Sun, 24 Dec 2023 09:41:57 -0800 +Subject: [PATCH 1/2] test_functionality: convert line endings to Unix -Signed-off-by: Trevor Gamblin <[email protected]> ---- -Upstream-Status: Pending +Convert the Windows line endings with dos2unix to be like the +other files in tests/* + +Upstream-Status: Submitted [https://github.com/sumerc/yappi/pull/164] - tests/test_asyncio.py | 2 +- - tests/test_asyncio_context_vars.py | 2 +- - tests/test_functionality.py | 2 +- - tests/test_hooks.py | 2 +- - tests/test_tags.py | 2 +- - 5 files changed, 6 insertions(+), 6 deletions(-) +Signed-off-by: Tim Orling <[email protected]> +--- + tests/test_functionality.py | 3822 +++++++++++++++++------------------ + 1 file changed, 1911 insertions(+), 1911 deletions(-) ---- a/tests/test_asyncio.py -+++ b/tests/test_asyncio.py -@@ -2,7 +2,7 @@ import unittest - import yappi - import asyncio - import threading --from utils import YappiUnitTestCase, find_stat_by_name, burn_cpu, burn_io -+from .utils import YappiUnitTestCase, find_stat_by_name, burn_cpu, burn_io - - - async def async_sleep(sec): ---- a/tests/test_asyncio_context_vars.py -+++ b/tests/test_asyncio_context_vars.py -@@ -5,7 +5,7 @@ import contextvars - import functools - import time - import os --import utils -+import tests.utils as utils - import yappi - - async_context_id = contextvars.ContextVar('async_context_id') +diff --git a/tests/test_functionality.py b/tests/test_functionality.py +index 0e99c47..38bbe67 100644 --- a/tests/test_functionality.py +++ b/tests/test_functionality.py -@@ -1,1916 +1,1916 @@ +@@ -1,1911 +1,1911 @@ -import os -import sys -import time@@ -47,7 +26,7 @@ Upstream-Status: Pending -import yappi -import _yappi -import utils --import multiprocessing # added to fix http://bugs.python.org/issue15881 for > Py2.6 +-import multiprocessing -import subprocess - -_counter = 0@@ -318,10 +297,10 @@ Upstream-Status: Pending - def test_profile_decorator(self): - - def aggregate(func, stats): -- fname = "tests/%s.profile" % (func.__name__) +- fname = f"tests/{func.__name__}.profile" - try: - stats.add(fname) -- except IOError: +- except OSError: - pass - stats.save(fname) - raise Exception("messing around")@@ -1232,7 +1211,7 @@ Upstream-Status: Pending - # TODO: I put dummy() to fix below, remove the comments after a while. - self.assertTrue( # FIX: I see this fails sometimes? - tsm is not None, -- 'Could not find "_MainThread". Found: %s' % (', '.join(utils.get_stat_names(tstats)))) +- f"Could not find \"_MainThread\". Found: {', '.join(utils.get_stat_names(tstats))}") - - def test_ctx_stats(self): - from threading import Thread@@ -1312,7 +1291,7 @@ Upstream-Status: Pending - # TODO: I put dummy() to fix below, remove the comments after a while. - self.assertTrue( # FIX: I see this fails sometimes - tsmain is not None, -- 'Could not find "_MainThread". Found: %s' % (', '.join(utils.get_stat_names(stats)))) +- f"Could not find \"_MainThread\". Found: {', '.join(utils.get_stat_names(stats))}") - self.assertTrue(1.0 > tst2.ttot >= 0.5) - self.assertTrue(1.0 > tst1.ttot >= 0.5) -@@ -1369,7 +1348,7 @@ Upstream-Status: Pending - ts = [] - for i in (0.01, 0.05, 0.1): - t = threading.Thread(target=burn_cpu, args=(i, )) -- t.name = "burn_cpu-%s" % str(i) +- t.name = f"burn_cpu-{str(i)}" - t.start() - ts.append(t) - for t in ts:@@ -1396,10 +1375,7 @@ Upstream-Status: Pending - def test_producer_consumer_with_queues(self): - # we currently just stress yappi, no functionality test is done here. - yappi.start() -- if utils.is_py3x(): -- from queue import Queue -- else: -- from Queue import Queue +- from queue import Queue - from threading import Thread - WORKER_THREAD_COUNT = 50 - WORK_ITEM_COUNT = 2000@@ -1458,7 +1434,6 @@ Upstream-Status: Pending - fsh = utils.find_stat_by_name(stats, "handler") - self.assertTrue(fsh is not None) - -- @unittest.skipIf(not sys.version_info >= (3, 2), "requires Python 3.2") - def test_concurrent_futures(self): - yappi.start() - from concurrent.futures import ThreadPoolExecutor@@ -1468,7 +1443,6 @@ Upstream-Status: Pending - time.sleep(1.0) - yappi.stop() - -- @unittest.skipIf(not sys.version_info >= (3, 2), "requires Python 3.2") - def test_barrier(self): - yappi.start() - b = threading.Barrier(2, timeout=1)@@ -1962,8 +1936,8 @@ Upstream-Status: Pending +import unittest +import yappi +import _yappi -+import tests.utils as utils -+import multiprocessing # added to fix http://bugs.python.org/issue15881 for > Py2.6 ++import utils ++import multiprocessing +import subprocess + +_counter = 0@@ -2234,10 +2208,10 @@ Upstream-Status: Pending + def test_profile_decorator(self): + + def aggregate(func, stats): -+ fname = "tests/%s.profile" % (func.__name__) ++ fname = f"tests/{func.__name__}.profile" + try: + stats.add(fname) -+ except IOError: ++ except OSError: + pass + stats.save(fname) + raise Exception("messing around")@@ -3007,8 +2981,8 @@ Upstream-Status: Pending + + def test_issue_32(self): + ''' -+ Start yappi from different thread and we get Internal Error(15) as -+ the current_ctx_id() called while enumerating the threads in start() ++ Start yappi from different thread and we get Internal Error(15) as ++ the current_ctx_id() called while enumerating the threads in start() + and as it does not swap to the enumerated ThreadState* the THreadState_GetDict() + returns wrong object and thus sets an invalid id for the _ctx structure. +@@ -3148,7 +3122,7 @@ Upstream-Status: Pending + # TODO: I put dummy() to fix below, remove the comments after a while. + self.assertTrue( # FIX: I see this fails sometimes? + tsm is not None, -+ 'Could not find "_MainThread". Found: %s' % (', '.join(utils.get_stat_names(tstats)))) ++ f"Could not find \"_MainThread\". Found: {', '.join(utils.get_stat_names(tstats))}") + + def test_ctx_stats(self): + from threading import Thread@@ -3228,7 +3202,7 @@ Upstream-Status: Pending + # TODO: I put dummy() to fix below, remove the comments after a while. + self.assertTrue( # FIX: I see this fails sometimes + tsmain is not None, -+ 'Could not find "_MainThread". Found: %s' % (', '.join(utils.get_stat_names(stats)))) ++ f"Could not find \"_MainThread\". Found: {', '.join(utils.get_stat_names(stats))}") + self.assertTrue(1.0 > tst2.ttot >= 0.5) + self.assertTrue(1.0 > tst1.ttot >= 0.5) +@@ -3285,7 +3259,7 @@ Upstream-Status: Pending + ts = [] + for i in (0.01, 0.05, 0.1): + t = threading.Thread(target=burn_cpu, args=(i, )) -+ t.name = "burn_cpu-%s" % str(i) ++ t.name = f"burn_cpu-{str(i)}" + t.start() + ts.append(t) + for t in ts:@@ -3312,10 +3286,7 @@ Upstream-Status: Pending + def test_producer_consumer_with_queues(self): + # we currently just stress yappi, no functionality test is done here. + yappi.start() -+ if utils.is_py3x(): -+ from queue import Queue -+ else: -+ from Queue import Queue ++ from queue import Queue + from threading import Thread + WORKER_THREAD_COUNT = 50 + WORK_ITEM_COUNT = 2000@@ -3374,7 +3345,6 @@ Upstream-Status: Pending + fsh = utils.find_stat_by_name(stats, "handler") + self.assertTrue(fsh is not None) + -+ @unittest.skipIf(not sys.version_info >= (3, 2), "requires Python 3.2") + def test_concurrent_futures(self): + yappi.start() + from concurrent.futures import ThreadPoolExecutor@@ -3384,7 +3354,6 @@ Upstream-Status: Pending + time.sleep(1.0) + yappi.stop() + -+ @unittest.skipIf(not sys.version_info >= (3, 2), "requires Python 3.2") + def test_barrier(self): + yappi.start() + b = threading.Barrier(2, timeout=1)@@ -3871,25 +3840,6 @@ Upstream-Status: Pending + # import sys;sys.argv = ['', 'BasicUsage.test_run_as_script'] + # import sys;sys.argv = ['', 'MultithreadedScenarios.test_subsequent_profile'] + unittest.main() ---- a/tests/test_hooks.py -+++ b/tests/test_hooks.py -@@ -5,7 +5,7 @@ import unittest - import time - - import yappi --import utils -+import tests.utils as utils - - - def a(): ---- a/tests/test_tags.py -+++ b/tests/test_tags.py -@@ -2,7 +2,7 @@ import unittest - import yappi - import threading - import time --from utils import YappiUnitTestCase, find_stat_by_name, burn_cpu, burn_io -+from .utils import YappiUnitTestCase, find_stat_by_name, burn_cpu, burn_io - - - class MultiThreadTests(YappiUnitTestCase): +-- +2.34.1 +meta-python/recipes-devtools/python/python3-yappi/0002-Fix-import-of-tests.utils-to-enable-pytest.patch new file +101
-0@@ -0,0 +1,101 @@ +From 28eac38566327091221aabbc164ea8e433c66e7e Mon Sep 17 00:00:00 2001 +From: Tim Orling <[email protected]> +Date: Sun, 24 Dec 2023 09:27:50 -0800 +Subject: [PATCH 2/2] Fix import of tests.utils to enable pytest + +Running the test cases with pytest leads to importlib errors +because the "utils" module cannot be found. + +Upstream-Status: Submitted [https://github.com/sumerc/yappi/pull/164] + +Signed-off-by: Tim Orling <[email protected]> +--- + tests/test_asyncio.py | 2 +- + tests/test_asyncio_context_vars.py | 2 +- + tests/test_functionality.py | 2 +- + tests/test_gevent.py | 2 +- + tests/test_hooks.py | 2 +- + tests/test_tags.py | 2 +- + 6 files changed, 6 insertions(+), 6 deletions(-) + +diff --git a/tests/test_asyncio.py b/tests/test_asyncio.py +index 8e9e631..bb36f4a 100644 +--- a/tests/test_asyncio.py ++++ b/tests/test_asyncio.py +@@ -2,7 +2,7 @@ import unittest + import yappi + import asyncio + import threading +-from utils import YappiUnitTestCase, find_stat_by_name, burn_cpu, burn_io ++from tests.utils import YappiUnitTestCase, find_stat_by_name, burn_cpu, burn_io + + + async def async_sleep(sec): +diff --git a/tests/test_asyncio_context_vars.py b/tests/test_asyncio_context_vars.py +index 5bd750c..9a253c0 100644 +--- a/tests/test_asyncio_context_vars.py ++++ b/tests/test_asyncio_context_vars.py +@@ -5,7 +5,7 @@ import contextvars + import functools + import time + import os +-import utils ++import tests.utils as utils + import yappi + + async_context_id = contextvars.ContextVar('async_context_id') +diff --git a/tests/test_functionality.py b/tests/test_functionality.py +index 38bbe67..8098f17 100644 +--- a/tests/test_functionality.py ++++ b/tests/test_functionality.py +@@ -5,7 +5,7 @@ import threading + import unittest + import yappi + import _yappi +-import utils ++import tests.utils as utils + import multiprocessing + import subprocess + +diff --git a/tests/test_gevent.py b/tests/test_gevent.py +index ed9e6ae..502af5f 100644 +--- a/tests/test_gevent.py ++++ b/tests/test_gevent.py +@@ -2,7 +2,7 @@ import unittest + import _yappi + import yappi + import threading +-from utils import ( ++from tests.utils import ( + YappiUnitTestCase, find_stat_by_name, burn_cpu, burn_io, burn_io_gevent + ) + +diff --git a/tests/test_hooks.py b/tests/test_hooks.py +index 297c643..8c387fc 100644 +--- a/tests/test_hooks.py ++++ b/tests/test_hooks.py +@@ -5,7 +5,7 @@ import unittest + import time + + import yappi +-import utils ++import tests.utils as utils + + + def a(): +diff --git a/tests/test_tags.py b/tests/test_tags.py +index b0b531d..b5a4016 100644 +--- a/tests/test_tags.py ++++ b/tests/test_tags.py +@@ -2,7 +2,7 @@ import unittest + import yappi + import threading + import time +-from utils import YappiUnitTestCase, find_stat_by_name, burn_cpu, burn_io ++from tests.utils import YappiUnitTestCase, find_stat_by_name, burn_cpu, burn_io + + + class MultiThreadTests(YappiUnitTestCase): +-- +2.34.1 +meta-python/recipes-devtools/python/python3-yappi/0002-add-3.11-to-the-setup.patch deleted +0
-26@@ -1,26 +0,0 @@ -From 38afdacf526410f970afc58e147c7377c6c7112c Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?S=C3=BCmer=20Cip?= <[email protected]> -Date: Fri, 25 Nov 2022 15:58:03 +0300 -Subject: [PATCH 2/2] add 3.11 to the setup - ---- -Upstream-Status: Pending - - setup.py | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/setup.py b/setup.py -index d006787..96e2a66 100644 ---- a/setup.py -+++ b/setup.py -@@ -56,6 +56,7 @@ CLASSIFIERS = [ - 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: 3.9', - 'Programming Language :: Python :: 3.10', -+ 'Programming Language :: Python :: 3.11', - 'Programming Language :: Python :: Implementation :: CPython', - 'Operating System :: OS Independent', - 'Topic :: Software Development :: Libraries', --- -2.30.2 -meta-python/recipes-devtools/python/python3-yappi/run-ptest +1
-1@@ -1,3 +1,3 @@ #!/bin/sh -pytest -o log_cli=true -o log_cli_level=INFO | sed -e 's/\[...%\]//g'| sed -e 's/PASSED/PASS/g'| sed -e 's/FAILED/FAIL/g'|sed -e 's/SKIPED/SKIP/g'| awk '{if ($NF=="PASS" || $NF=="FAIL" || $NF=="SKIP" || $NF=="XFAIL" || $NF=="XPASS"){printf "%s: %s\n", $NF, $0}else{print}}'| awk '{if ($NF=="PASS" || $NF=="FAIL" || $NF=="SKIP" || $NF=="XFAIL" || $NF=="XPASS") {$NF="";print $0}else{print}}' +pytest --automakemeta-python/recipes-devtools/python/python3-yappi_1.4.0.bb deleted +0
-36@@ -1,36 +0,0 @@ -SUMMARY = "Yet Another Python Profiler" -HOMEPAGE = "https://github.com/sumerc/yappi" - -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE;md5=71c208c9a4fd864385eb69ad4caa3bee" - -SRC_URI[sha256sum] = "504b5d8fc7433736cb5e257991d2e7f2946019174f1faec7b2fe947881a17fc0" - -SRC_URI += " \ - file://run-ptest \ - file://0001-Fix-imports-for-ptests.patch \ - file://0002-add-3.11-to-the-setup.patch \ -" - -inherit pypi setuptools3 ptest - -RDEPENDS:${PN} += "\ - ${PYTHON_PN}-datetime \ - ${PYTHON_PN}-pickle \ - ${PYTHON_PN}-threading \ -" - -RDEPENDS:${PN}-ptest += " \ - ${PYTHON_PN}-gevent \ - ${PYTHON_PN}-multiprocessing \ - ${PYTHON_PN}-pytest \ - ${PYTHON_PN}-profile \ - ${PYTHON_PN}-zopeinterface \ -" - -do_install_ptest() { - install -d ${D}${PTEST_PATH}/tests - cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/ - cp -f ${S}/yappi/yappi.py ${D}/${PTEST_PATH}/ -} -meta-python/recipes-devtools/python/python3-yappi_1.6.0.bb new file +37
-1@@ -0,0 +1,37 @@ +SUMMARY = "Yet Another Python Profiler" +HOMEPAGE = "https://github.com/sumerc/yappi" + +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=71c208c9a4fd864385eb69ad4caa3bee" + +SRC_URI[sha256sum] = "a9aaf72009d8c03067294151ee0470ac7a6dfa7b33baab40b198d6c1ef00430a" + +SRC_URI += " \ + file://run-ptest \ + file://0001-test_functionality-convert-line-endings-to-Unix.patch \ + file://0002-Fix-import-of-tests.utils-to-enable-pytest.patch \ +" + +inherit pypi python_setuptools_build_meta ptest + +RDEPENDS:${PN} += "\ + python3-datetime \ + python3-pickle \ + python3-threading \ +" + +RDEPENDS:${PN}-ptest += " \ + python3-gevent \ + python3-multiprocessing \ + python3-pytest \ + python3-profile \ + python3-unittest-automake-output \ + python3-zopeinterface \ +" + +do_install_ptest() { + install -d ${D}${PTEST_PATH}/tests + cp -rf ${S}/tests ${D}${PTEST_PATH} + cp -f ${S}/run_tests.py ${D}${PTEST_PATH} +} + --2.34.1
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#107782): https://lists.openembedded.org/g/openembedded-devel/message/107782
Mute This Topic: https://lists.openembedded.org/mt/103350816/924729
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-