Hello community, here is the log from the commit of package python-stevedore for openSUSE:Factory checked in at 2013-07-11 20:13:47 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-stevedore (Old) and /work/SRC/openSUSE:Factory/.python-stevedore.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-stevedore" Changes: -------- --- /work/SRC/openSUSE:Factory/python-stevedore/python-stevedore.changes 2013-06-29 22:26:16.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.python-stevedore.new/python-stevedore.changes 2013-07-11 20:13:48.000000000 +0200 @@ -1,0 +2,10 @@ +Thu Jul 11 14:15:40 UTC 2013 - dmuel...@suse.com + +- update to 0.10: + - Adds ``propagate_map_exceptions`` parameter to all of the extension + managers which specifies whether exceptions are propagated up + through the map call or logged and then ignored. The default is to + preserve the current behavior of logging and ignoring exceptions. +- remove python-2.6.x.diff + +------------------------------------------------------------------- Old: ---- python-2.6.x.diff stevedore-0.9.1.tar.gz New: ---- stevedore-0.10.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-stevedore.spec ++++++ --- /var/tmp/diff_new_pack.BTVEYe/_old 2013-07-11 20:13:49.000000000 +0200 +++ /var/tmp/diff_new_pack.BTVEYe/_new 2013-07-11 20:13:49.000000000 +0200 @@ -17,14 +17,13 @@ Name: python-stevedore -Version: 0.9.1 +Version: 0.10 Release: 0 Summary: Manage dynamic plugins for Python applications License: Apache-2.0 Group: Development/Languages/Python Url: https://github.com/dreamhost/stevedore Source: http://pypi.python.org/packages/source/s/stevedore/stevedore-%{version}.tar.gz -Patch0: python-2.6.x.diff BuildRequires: python-devel BuildRequires: python-distribute # Documentation requirements: @@ -44,7 +43,6 @@ %prep %setup -q -n stevedore-%{version} -%patch0 %build python setup.py build ++++++ stevedore-0.9.1.tar.gz -> stevedore-0.10.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stevedore-0.9.1/PKG-INFO new/stevedore-0.10/PKG-INFO --- old/stevedore-0.9.1/PKG-INFO 2013-06-12 20:07:04.000000000 +0200 +++ new/stevedore-0.10/PKG-INFO 2013-07-08 15:26:52.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: stevedore -Version: 0.9.1 +Version: 0.10 Summary: Manage dynamic plugins for Python applications Home-page: https://github.com/dreamhost/stevedore Author: Doug Hellmann diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stevedore-0.9.1/docs/source/conf.py new/stevedore-0.10/docs/source/conf.py --- old/stevedore-0.9.1/docs/source/conf.py 2013-06-03 17:39:43.000000000 +0200 +++ new/stevedore-0.10/docs/source/conf.py 2013-07-08 15:18:53.000000000 +0200 @@ -54,7 +54,8 @@ # built documents. # # The short X.Y version. -version = subprocess.check_output(['sh', '-c', 'cd ../..; python setup.py --version']) +version = subprocess.Popen(['sh', '-c', 'cd ../..; python setup.py --version'], + stdout=subprocess.PIPE).stdout.read() version = version.strip() # The full version, including alpha/beta/rc tags. release = version diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stevedore-0.9.1/docs/source/history.rst new/stevedore-0.10/docs/source/history.rst --- old/stevedore-0.9.1/docs/source/history.rst 2013-06-12 17:00:38.000000000 +0200 +++ new/stevedore-0.10/docs/source/history.rst 2013-07-08 15:21:25.000000000 +0200 @@ -2,6 +2,14 @@ History ========= +0.10 + +- Adds ``propagate_map_exceptions`` parameter to all of the extension + managers which specifies whether exceptions are propagated up + through the map call or logged and then ignored. The default is to + preserve the current behavior of logging and ignoring exceptions. + Christopher Yeoh <cy...@au1.ibm.com> + 0.9 - Add ``name_order`` parameter to diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stevedore-0.9.1/setup.py new/stevedore-0.10/setup.py --- old/stevedore-0.9.1/setup.py 2013-06-12 20:04:52.000000000 +0200 +++ new/stevedore-0.10/setup.py 2013-07-08 15:22:18.000000000 +0200 @@ -16,7 +16,7 @@ setup( name='stevedore', - version='0.9.1', + version='0.10', description='Manage dynamic plugins for Python applications', long_description=long_description, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stevedore-0.9.1/stevedore/dispatch.py new/stevedore-0.10/stevedore/dispatch.py --- old/stevedore-0.9.1/stevedore/dispatch.py 2013-06-03 17:39:43.000000000 +0200 +++ new/stevedore-0.10/stevedore/dispatch.py 2013-07-08 15:18:53.000000000 +0200 @@ -26,6 +26,10 @@ the object returned by the entry point. Only used if invoke_on_load is True. :type invoke_kwds: dict + :param propagate_map_exceptions: Boolean controlling whether exceptions + are propagated up through the map call or whether they are logged and + then ignored + :type invoke_on_load: bool """ def map(self, filter_func, func, *args, **kwds): @@ -50,8 +54,9 @@ The first argument to func(), 'ext', is the :class:`~stevedore.extension.Extension` instance. - Exceptions raised from within filter_func() and func() are - logged and ignored. + Exceptions raised from within func() are propagated up and + processing stopped if self.propagate_map_exceptions is True, + otherwise they are logged and ignored. :param filter_func: Callable to test each extension. :param func: Callable to invoke for each extension. @@ -95,17 +100,23 @@ the object returned by the entry point. Only used if invoke_on_load is True. :type invoke_kwds: dict + :param propagate_map_exceptions: Boolean controlling whether exceptions + are propagated up through the map call or whether they are logged and + then ignored + :type invoke_on_load: bool """ def __init__(self, namespace, check_func, invoke_on_load=False, - invoke_args=(), invoke_kwds={}): + invoke_args=(), invoke_kwds={}, + propagate_map_exceptions=False): super(NameDispatchExtensionManager, self).__init__( namespace=namespace, check_func=check_func, invoke_on_load=invoke_on_load, invoke_args=invoke_args, invoke_kwds=invoke_kwds, + propagate_map_exceptions=propagate_map_exceptions, ) self.by_name = dict((e.name, e) for e in self.extensions) @@ -121,7 +132,9 @@ The first argument to func(), 'ext', is the :class:`~stevedore.extension.Extension` instance. - Exceptions raised from within func() are logged and ignored. + Exceptions raised from within func() are propagated up and + processing stopped if self.propagate_map_exceptions is True, + otherwise they are logged and ignored. :param names: List or set of name(s) of extension(s) to invoke. :param func: Callable to invoke for each extension. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stevedore-0.9.1/stevedore/enabled.py new/stevedore-0.10/stevedore/enabled.py --- old/stevedore-0.9.1/stevedore/enabled.py 2013-06-03 17:39:43.000000000 +0200 +++ new/stevedore-0.10/stevedore/enabled.py 2013-07-08 15:18:53.000000000 +0200 @@ -28,17 +28,23 @@ the object returned by the entry point. Only used if invoke_on_load is True. :type invoke_kwds: dict + :param propagate_map_exceptions: Boolean controlling whether exceptions + are propagated up through the map call or whether they are logged and + then ignored + :type invoke_on_load: bool """ def __init__(self, namespace, check_func, invoke_on_load=False, - invoke_args=(), invoke_kwds={}): + invoke_args=(), invoke_kwds={}, + propagate_map_exceptions=False): self.check_func = check_func super(EnabledExtensionManager, self).__init__( namespace, invoke_on_load=invoke_on_load, invoke_args=invoke_args, invoke_kwds=invoke_kwds, + propagate_map_exceptions=propagate_map_exceptions, ) def _load_one_plugin(self, ep, invoke_on_load, invoke_args, invoke_kwds): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stevedore-0.9.1/stevedore/extension.py new/stevedore-0.10/stevedore/extension.py --- old/stevedore-0.9.1/stevedore/extension.py 2013-06-06 00:48:58.000000000 +0200 +++ new/stevedore-0.10/stevedore/extension.py 2013-07-08 15:18:53.000000000 +0200 @@ -51,14 +51,20 @@ the object returned by the entry point. Only used if invoke_on_load is True. :type invoke_kwds: dict + :param propagate_map_exceptions: Boolean controlling whether exceptions + are propagated up through the map call or whether they are logged and + then ignored + :type invoke_on_load: bool """ def __init__(self, namespace, invoke_on_load=False, invoke_args=(), - invoke_kwds={}): + invoke_kwds={}, + propagate_map_exceptions=False): self.namespace = namespace + self.propagate_map_exceptions = propagate_map_exceptions self.extensions = self._load_plugins(invoke_on_load, invoke_args, invoke_kwds) @@ -117,7 +123,9 @@ The first argument to func(), 'ext', is the :class:`~stevedore.extension.Extension` instance. - Exceptions raised from within func() are logged and ignored. + Exceptions raised from within func() are propagated up and + processing stopped if self.propagate_map_exceptions is True, + otherwise they are logged and ignored. :param func: Callable to invoke for each extension. :param args: Variable arguments to pass to func() @@ -136,11 +144,11 @@ try: response_callback(func(e, *args, **kwds)) except Exception as err: - # FIXME: Provide an argument to control - # whether to ignore exceptions in each - # plugin or stop processing. - LOG.error('error calling %r: %s', e.name, err) - LOG.exception(err) + if self.propagate_map_exceptions: + raise + else: + LOG.error('error calling %r: %s', e.name, err) + LOG.exception(err) def __iter__(self): """Produce iterator for the manager. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stevedore-0.9.1/stevedore/named.py new/stevedore-0.10/stevedore/named.py --- old/stevedore-0.9.1/stevedore/named.py 2013-06-03 17:39:43.000000000 +0200 +++ new/stevedore-0.10/stevedore/named.py 2013-07-08 15:18:53.000000000 +0200 @@ -25,17 +25,22 @@ :param name_order: If true, sort the loaded extensions to match the order used in ``names``. :type name_order: bool + :param propagate_map_exceptions: Boolean controlling whether exceptions + are propagated up through the map call or whether they are logged and + then ignored + :type invoke_on_load: bool """ def __init__(self, namespace, names, invoke_on_load=False, invoke_args=(), invoke_kwds={}, - name_order=False): + name_order=False, propagate_map_exceptions=False): self._names = names super(NamedExtensionManager, self).__init__( namespace, invoke_on_load=invoke_on_load, invoke_args=invoke_args, invoke_kwds=invoke_kwds, + propagate_map_exceptions=propagate_map_exceptions, ) if name_order: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stevedore-0.9.1/stevedore/tests/test_extension.py new/stevedore-0.10/stevedore/tests/test_extension.py --- old/stevedore-0.9.1/stevedore/tests/test_extension.py 2013-06-05 21:43:23.000000000 +0200 +++ new/stevedore-0.10/stevedore/tests/test_extension.py 2013-07-08 15:18:53.000000000 +0200 @@ -126,6 +126,23 @@ assert results == [] +def test_map_propagate_exceptions(): + + def mapped(ext, *args, **kwds): + raise RuntimeError('hard coded error') + + em = extension.ExtensionManager('stevedore.test.extension', + invoke_on_load=True, + propagate_map_exceptions=True + ) + + try: + em.map(mapped, 1, 2, a='A', b='B') + assert False + except RuntimeError: + pass + + def test_map_errors_when_no_plugins(): def mapped(ext, *args, **kwds): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/stevedore-0.9.1/stevedore.egg-info/PKG-INFO new/stevedore-0.10/stevedore.egg-info/PKG-INFO --- old/stevedore-0.9.1/stevedore.egg-info/PKG-INFO 2013-06-12 20:07:04.000000000 +0200 +++ new/stevedore-0.10/stevedore.egg-info/PKG-INFO 2013-07-08 15:26:52.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: stevedore -Version: 0.9.1 +Version: 0.10 Summary: Manage dynamic plugins for Python applications Home-page: https://github.com/dreamhost/stevedore Author: Doug Hellmann -- To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org For additional commands, e-mail: opensuse-commit+h...@opensuse.org