Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-yappi for openSUSE:Factory checked in at 2021-04-24 23:08:34 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-yappi (Old) and /work/SRC/openSUSE:Factory/.python-yappi.new.12324 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-yappi" Sat Apr 24 23:08:34 2021 rev:10 rq:887876 version:1.3.2 Changes: -------- --- /work/SRC/openSUSE:Factory/python-yappi/python-yappi.changes 2021-03-17 20:19:55.303314796 +0100 +++ /work/SRC/openSUSE:Factory/.python-yappi.new.12324/python-yappi.changes 2021-04-24 23:09:52.275455735 +0200 @@ -1,0 +2,6 @@ +Thu Apr 22 19:52:10 UTC 2021 - Dirk M??ller <dmuel...@suse.com> + +- update to 1.3.2: + - Add support for Python 3.10 + +------------------------------------------------------------------- Old: ---- yappi-1.3.0.tar.gz New: ---- yappi-1.3.2.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-yappi.spec ++++++ --- /var/tmp/diff_new_pack.bBSBef/_old 2021-04-24 23:09:52.683456311 +0200 +++ /var/tmp/diff_new_pack.bBSBef/_new 2021-04-24 23:09:52.687456317 +0200 @@ -20,7 +20,7 @@ %define skip_python2 1 %define skip_python36 1 Name: python-yappi -Version: 1.3.0 +Version: 1.3.2 Release: 0 Summary: Yet Another Python Profiler License: MIT ++++++ yappi-1.3.0.tar.gz -> yappi-1.3.2.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yappi-1.3.0/MANIFEST.in new/yappi-1.3.2/MANIFEST.in --- old/yappi-1.3.0/MANIFEST.in 2020-10-07 10:30:32.000000000 +0200 +++ new/yappi-1.3.2/MANIFEST.in 2020-11-27 15:50:15.000000000 +0100 @@ -1,4 +1,5 @@ include *.md include yappi/*.h +include run_tests.py include tests/*.py include LICENSE diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yappi-1.3.0/PKG-INFO new/yappi-1.3.2/PKG-INFO --- old/yappi-1.3.0/PKG-INFO 2020-10-08 10:29:16.239340500 +0200 +++ new/yappi-1.3.2/PKG-INFO 2020-11-27 16:22:23.943609200 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: yappi -Version: 1.3.0 +Version: 1.3.2 Summary: Yet Another Python Profiler Home-page: https://github.com/sumerc/yappi Author: Sumer Cip @@ -17,7 +17,7 @@ <p align="center"> <img src="https://www.travis-ci.org/sumerc/yappi.svg?branch=master"> - <img src="https://ci.appveyor.com/api/projects/status/github/sumerc/yappi?branch=master&svg=true"> + <img src="https://github.com/sumerc/yappi/workflows/CI/badge.svg?branch=master"> <img src="https://img.shields.io/pypi/v/yappi.svg"> <img src="https://img.shields.io/pypi/dw/yappi.svg"> <img src="https://img.shields.io/pypi/pyversions/yappi.svg"> @@ -212,7 +212,7 @@ ''' ``` - ### Profile an async application: + ### Profile an asyncio application: You can see that coroutine wall-time's are correctly profiled. @@ -247,7 +247,7 @@ ''' ``` - ### Profile a greenlet application: + ### Profile a gevent application: You can use yappi to profile greenlet applications now! @@ -282,6 +282,7 @@ - [Clock Types](https://github.com/sumerc/yappi/blob/master/doc/clock_types.md) - [API](https://github.com/sumerc/yappi/blob/master/doc/api.md) - [Coroutine Profiling](https://github.com/sumerc/yappi/blob/master/doc/coroutine-profiling.md) _(new in 1.2)_ + - [Greenlet Profiling](https://github.com/sumerc/yappi/blob/master/doc/greenlet-profiling.md) _(new in 1.3)_ Note: Yes. I know I should be moving docs to readthedocs.io. Stay tuned! @@ -308,6 +309,8 @@ Classifier: Programming Language :: Python :: 3.6 Classifier: Programming Language :: Python :: 3.7 Classifier: Programming Language :: Python :: 3.8 +Classifier: Programming Language :: Python :: 3.9 +Classifier: Programming Language :: Python :: 3.10 Classifier: Programming Language :: Python :: Implementation :: CPython Classifier: Operating System :: OS Independent Classifier: Topic :: Software Development :: Libraries diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yappi-1.3.0/README.md new/yappi-1.3.2/README.md --- old/yappi-1.3.0/README.md 2020-10-07 10:53:22.000000000 +0200 +++ new/yappi-1.3.2/README.md 2020-11-27 15:50:15.000000000 +0100 @@ -9,7 +9,7 @@ <p align="center"> <img src="https://www.travis-ci.org/sumerc/yappi.svg?branch=master"> - <img src="https://ci.appveyor.com/api/projects/status/github/sumerc/yappi?branch=master&svg=true"> + <img src="https://github.com/sumerc/yappi/workflows/CI/badge.svg?branch=master"> <img src="https://img.shields.io/pypi/v/yappi.svg"> <img src="https://img.shields.io/pypi/dw/yappi.svg"> <img src="https://img.shields.io/pypi/pyversions/yappi.svg"> @@ -204,7 +204,7 @@ ''' ``` -### Profile an async application: +### Profile an asyncio application: You can see that coroutine wall-time's are correctly profiled. @@ -239,7 +239,7 @@ ''' ``` -### Profile a greenlet application: +### Profile a gevent application: You can use yappi to profile greenlet applications now! @@ -274,6 +274,7 @@ - [Clock Types](https://github.com/sumerc/yappi/blob/master/doc/clock_types.md) - [API](https://github.com/sumerc/yappi/blob/master/doc/api.md) - [Coroutine Profiling](https://github.com/sumerc/yappi/blob/master/doc/coroutine-profiling.md) _(new in 1.2)_ +- [Greenlet Profiling](https://github.com/sumerc/yappi/blob/master/doc/greenlet-profiling.md) _(new in 1.3)_ Note: Yes. I know I should be moving docs to readthedocs.io. Stay tuned! diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yappi-1.3.0/run_tests.py new/yappi-1.3.2/run_tests.py --- old/yappi-1.3.0/run_tests.py 1970-01-01 01:00:00.000000000 +0100 +++ new/yappi-1.3.2/run_tests.py 2020-11-27 15:50:15.000000000 +0100 @@ -0,0 +1,39 @@ +import unittest +import sys + + +def _testsuite_from_tests(tests): + suite = unittest.TestSuite() + loader = unittest.defaultTestLoader + for t in tests: + test = loader.loadTestsFromName('tests.%s' % (t)) + suite.addTest(test) + return suite + + +if __name__ == '__main__': + sys.path.append('tests/') + test_loader = unittest.defaultTestLoader + test_runner = unittest.TextTestRunner(verbosity=2) + tests = [ + 'test_functionality', + 'test_hooks', + 'test_tags', + ] + if sys.version_info < (3, 10): + tests += ['test_gevent'] + if sys.version_info >= (3, 4): + tests += ['test_asyncio'] + if sys.version_info >= (3, 7): + tests += ['test_asyncio_context_vars'] + test_suite = test_loader.loadTestsFromNames(tests) + + if len(sys.argv) > 1: + test_suite = _testsuite_from_tests(sys.argv[1:]) + + #tests = ['test_functionality.BasicUsage.test_run_as_script'] + + print("Running following tests: %s" % (tests)) + + result = test_runner.run(test_suite) + sys.exit(not result.wasSuccessful()) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yappi-1.3.0/setup.py new/yappi-1.3.2/setup.py --- old/yappi-1.3.0/setup.py 2020-10-08 10:25:02.000000000 +0200 +++ new/yappi-1.3.2/setup.py 2020-11-27 16:02:24.000000000 +0100 @@ -12,7 +12,7 @@ HOMEPAGE = "https://github.com/sumerc/yappi" NAME = "yappi" -VERSION = "1.3.0" +VERSION = "1.3.2" _DEBUG = False # compile/link code for debugging _PROFILE = False # profile yappi itself @@ -54,6 +54,8 @@ 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.8', + 'Programming Language :: Python :: 3.9', + 'Programming Language :: Python :: 3.10', 'Programming Language :: Python :: Implementation :: CPython', 'Operating System :: OS Independent', 'Topic :: Software Development :: Libraries', diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yappi-1.3.0/tests/test_functionality.py new/yappi-1.3.2/tests/test_functionality.py --- old/yappi-1.3.0/tests/test_functionality.py 2020-10-07 10:53:22.000000000 +0200 +++ new/yappi-1.3.2/tests/test_functionality.py 2020-11-27 15:50:15.000000000 +0100 @@ -272,7 +272,7 @@ t0 = yappi.get_clock_time() time.sleep(0.1) duration = yappi.get_clock_time() - t0 - self.assertTrue(0.05 < duration < 0.2) + self.assertTrue(0.05 < duration < 0.3) def test_profile_decorator(self): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yappi-1.3.0/tests/test_gevent.py new/yappi-1.3.2/tests/test_gevent.py --- old/yappi-1.3.0/tests/test_gevent.py 2020-10-07 10:30:32.000000000 +0200 +++ new/yappi-1.3.2/tests/test_gevent.py 2020-11-27 15:50:15.000000000 +0100 @@ -8,6 +8,7 @@ YappiUnitTestCase, find_stat_by_name, burn_cpu, burn_io, burn_io_gevent ) + class GeventTestThread(threading.Thread): def __init__(self, name, *args, **kwargs): super(GeventTestThread, self).__init__(*args, **kwargs) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yappi-1.3.0/tests/test_hooks.py new/yappi-1.3.2/tests/test_hooks.py --- old/yappi-1.3.0/tests/test_hooks.py 2020-10-07 10:30:32.000000000 +0200 +++ new/yappi-1.3.2/tests/test_hooks.py 2020-11-27 15:50:15.000000000 +0100 @@ -147,7 +147,7 @@ self.assertEqual(2, len(t_stats)) self.assertEqual(0, t_stats[0].id) self.assertEqual(2, t_stats[0].sched_count) - self.assertTrue(0.15 < t_stats[0].ttot < 0.3) + self.assertTrue(0.15 < t_stats[0].ttot < 0.7, t_stats[0].ttot) self.assertEqual(1, t_stats[1].id) self.assertEqual(1, t_stats[1].sched_count) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yappi-1.3.0/tests/test_tags.py new/yappi-1.3.2/tests/test_tags.py --- old/yappi-1.3.0/tests/test_tags.py 2020-10-07 10:30:32.000000000 +0200 +++ new/yappi-1.3.2/tests/test_tags.py 2020-11-27 15:50:15.000000000 +0100 @@ -8,7 +8,6 @@ class MultiThreadTests(YappiUnitTestCase): def test_tagging_walltime(self): - tlocal = threading.local() def tag_cbk(): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yappi-1.3.0/tests/utils.py new/yappi-1.3.2/tests/utils.py --- old/yappi-1.3.0/tests/utils.py 2020-10-07 10:30:32.000000000 +0200 +++ new/yappi-1.3.2/tests/utils.py 2020-11-27 15:50:15.000000000 +0100 @@ -2,7 +2,6 @@ import yappi import time import unittest -import gevent class YappiUnitTestCase(unittest.TestCase): @@ -69,8 +68,13 @@ self.assert_almost_equal(ttot_orig, ctx.ttot, err_msg=tline) def assert_almost_equal( - self, x, y, negative_err=0.2, positive_err=0.4, err_msg=None + self, x, y, negative_err=0.2, positive_err=0.6, err_msg=None ): + # time sensitive tests fail on MacOS CI, increase threshold + if sys.platform == 'darwin': + positive_err = 1.5 + negative_err = 0.6 + pos_epsilon = (x * positive_err) neg_epsilon = (x * negative_err) @@ -125,11 +129,13 @@ if stat.name == name: return stat + def find_ctx_stats_by_name(ctx_stats, name): for stat in ctx_stats: if stat.name == name: return stat + def get_stat_names(stats): return [stat.name for stat in stats] @@ -152,9 +158,12 @@ def burn_io(sec): time.sleep(sec) + def burn_io_gevent(sec): + import gevent gevent.sleep(sec) + from contextlib import contextmanager diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yappi-1.3.0/yappi/_yappi.c new/yappi-1.3.2/yappi/_yappi.c --- old/yappi-1.3.0/yappi/_yappi.c 2020-10-07 10:53:22.000000000 +0200 +++ new/yappi-1.3.2/yappi/_yappi.c 2020-11-27 15:50:15.000000000 +0100 @@ -213,6 +213,16 @@ va_end(vargs); } +int +IS_SUSPENDED(PyFrameObject *frame) +{ +#if PY_MAJOR_VERSION >= 3 && PY_MINOR_VERSION >= 10 + return (frame->f_state == FRAME_SUSPENDED); +#else + return (frame->f_stacktop != NULL); +#endif +} + int IS_ASYNC(PyFrameObject *frame) { int result = 0; @@ -999,13 +1009,10 @@ return; } - //if (frame->f_code->co_flags & CO_GENERATOR) { - //printf("is a generator func.\n"); - //} - - // TODO: Comment + // if the function that the frame belongs is a coroutine, we check if we RETURN + // or YIELD from the coroutine to calculate the correct walltime if (IS_ASYNC(frame)) { - if (frame->f_stacktop) { + if (IS_SUSPENDED(frame)) { yielded = 1; if (get_timing_clock_type() == WALL_CLOCK) { // In fact setting this zero means following: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yappi-1.3.0/yappi/yappi.egg-info/PKG-INFO new/yappi-1.3.2/yappi/yappi.egg-info/PKG-INFO --- old/yappi-1.3.0/yappi/yappi.egg-info/PKG-INFO 2020-10-08 10:29:16.000000000 +0200 +++ new/yappi-1.3.2/yappi/yappi.egg-info/PKG-INFO 2020-11-27 16:22:23.000000000 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: yappi -Version: 1.3.0 +Version: 1.3.2 Summary: Yet Another Python Profiler Home-page: https://github.com/sumerc/yappi Author: Sumer Cip @@ -17,7 +17,7 @@ <p align="center"> <img src="https://www.travis-ci.org/sumerc/yappi.svg?branch=master"> - <img src="https://ci.appveyor.com/api/projects/status/github/sumerc/yappi?branch=master&svg=true"> + <img src="https://github.com/sumerc/yappi/workflows/CI/badge.svg?branch=master"> <img src="https://img.shields.io/pypi/v/yappi.svg"> <img src="https://img.shields.io/pypi/dw/yappi.svg"> <img src="https://img.shields.io/pypi/pyversions/yappi.svg"> @@ -212,7 +212,7 @@ ''' ``` - ### Profile an async application: + ### Profile an asyncio application: You can see that coroutine wall-time's are correctly profiled. @@ -247,7 +247,7 @@ ''' ``` - ### Profile a greenlet application: + ### Profile a gevent application: You can use yappi to profile greenlet applications now! @@ -282,6 +282,7 @@ - [Clock Types](https://github.com/sumerc/yappi/blob/master/doc/clock_types.md) - [API](https://github.com/sumerc/yappi/blob/master/doc/api.md) - [Coroutine Profiling](https://github.com/sumerc/yappi/blob/master/doc/coroutine-profiling.md) _(new in 1.2)_ + - [Greenlet Profiling](https://github.com/sumerc/yappi/blob/master/doc/greenlet-profiling.md) _(new in 1.3)_ Note: Yes. I know I should be moving docs to readthedocs.io. Stay tuned! @@ -308,6 +309,8 @@ Classifier: Programming Language :: Python :: 3.6 Classifier: Programming Language :: Python :: 3.7 Classifier: Programming Language :: Python :: 3.8 +Classifier: Programming Language :: Python :: 3.9 +Classifier: Programming Language :: Python :: 3.10 Classifier: Programming Language :: Python :: Implementation :: CPython Classifier: Operating System :: OS Independent Classifier: Topic :: Software Development :: Libraries diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yappi-1.3.0/yappi/yappi.egg-info/SOURCES.txt new/yappi-1.3.2/yappi/yappi.egg-info/SOURCES.txt --- old/yappi-1.3.0/yappi/yappi.egg-info/SOURCES.txt 2020-10-08 10:29:16.000000000 +0200 +++ new/yappi-1.3.2/yappi/yappi.egg-info/SOURCES.txt 2020-11-27 16:22:23.000000000 +0100 @@ -2,6 +2,7 @@ MANIFEST.in README.md THANKS.md +run_tests.py setup.py tests/__init__.py tests/merge_stats.py