Hello community,

here is the log from the commit of package python-futures for openSUSE:Factory 
checked in at 2015-03-01 14:47:07
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-futures (Old)
 and      /work/SRC/openSUSE:Factory/.python-futures.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-futures"

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-futures/python-futures.changes    
2014-04-26 10:11:01.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.python-futures.new/python-futures.changes       
2015-03-01 14:47:08.000000000 +0100
@@ -1,0 +2,8 @@
+Fri Feb 27 11:57:58 UTC 2015 - [email protected]
+
+- update to version 2.2.0:
+  - Added the set_exception_info() and exception_info() methods to Future
+    to enable extraction of tracebacks on Python 2.x
+  - Added support for Future.set_exception_info() to ThreadPoolExecutor
+
+-------------------------------------------------------------------

Old:
----
  futures-2.1.6.tar.gz

New:
----
  futures-2.2.0.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-futures.spec ++++++
--- /var/tmp/diff_new_pack.PsnkXP/_old  2015-03-01 14:47:09.000000000 +0100
+++ /var/tmp/diff_new_pack.PsnkXP/_new  2015-03-01 14:47:09.000000000 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package python-futures
 #
-# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -13,15 +13,16 @@
 # published by the Open Source Initiative.
 
 # Please submit bugfixes or comments via http://bugs.opensuse.org/
+#
 
 
 Name:           python-futures
-Version:        2.1.6
+Version:        2.2.0
 Release:        0
-License:        BSD-2-Clause
 Summary:        Backport of the concurrent.futures package from Python 3.2
-Url:            http://code.google.com/p/pythonfutures
+License:        BSD-2-Clause
 Group:          Development/Languages/Python
+Url:            http://code.google.com/p/pythonfutures
 Source:         
http://pypi.python.org/packages/source/f/futures/futures-%{version}.tar.gz
 BuildRequires:  python-devel
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build

++++++ futures-2.1.6.tar.gz -> futures-2.2.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/futures-2.1.6/CHANGES new/futures-2.2.0/CHANGES
--- old/futures-2.1.6/CHANGES   2014-01-14 10:02:33.000000000 +0100
+++ new/futures-2.2.0/CHANGES   2014-09-08 05:46:16.000000000 +0200
@@ -1,3 +1,11 @@
+2.2.0
+=====
+
+- Added the set_exception_info() and exception_info() methods to Future
+  to enable extraction of tracebacks on Python 2.x
+- Added support for Future.set_exception_info() to ThreadPoolExecutor
+
+
 2.1.6
 =====
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/futures-2.1.6/PKG-INFO new/futures-2.2.0/PKG-INFO
--- old/futures-2.1.6/PKG-INFO  2014-01-14 10:20:42.000000000 +0100
+++ new/futures-2.2.0/PKG-INFO  2014-09-25 23:20:56.000000000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 1.0
 Name: futures
-Version: 2.1.6
+Version: 2.2.0
 Summary: Backport of the concurrent.futures package from Python 3.2
 Home-page: http://code.google.com/p/pythonfutures
 Author: Alex Gronholm
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/futures-2.1.6/concurrent/futures/_base.py 
new/futures-2.2.0/concurrent/futures/_base.py
--- old/futures-2.1.6/concurrent/futures/_base.py       2013-06-23 
21:47:06.000000000 +0200
+++ new/futures-2.2.0/concurrent/futures/_base.py       2014-09-06 
16:05:41.000000000 +0200
@@ -6,6 +6,8 @@
 import threading
 import time
 
+from concurrent.futures._compat import reraise
+
 try:
     from collections import namedtuple
 except ImportError:
@@ -290,6 +292,7 @@
         self._state = PENDING
         self._result = None
         self._exception = None
+        self._traceback = None
         self._waiters = []
         self._done_callbacks = []
 
@@ -353,7 +356,7 @@
 
     def __get_result(self):
         if self._exception:
-            raise self._exception
+            reraise(self._exception, self._traceback)
         else:
             return self._result
 
@@ -405,8 +408,9 @@
             else:
                 raise TimeoutError()
 
-    def exception(self, timeout=None):
-        """Return the exception raised by the call that the future represents.
+    def exception_info(self, timeout=None):
+        """Return a tuple of (exception, traceback) raised by the call that the
+        future represents.
 
         Args:
             timeout: The number of seconds to wait for the exception if the
@@ -422,22 +426,40 @@
             TimeoutError: If the future didn't finish executing before the 
given
                 timeout.
         """
-
         with self._condition:
             if self._state in [CANCELLED, CANCELLED_AND_NOTIFIED]:
                 raise CancelledError()
             elif self._state == FINISHED:
-                return self._exception
+                return self._exception, self._traceback
 
             self._condition.wait(timeout)
 
             if self._state in [CANCELLED, CANCELLED_AND_NOTIFIED]:
                 raise CancelledError()
             elif self._state == FINISHED:
-                return self._exception
+                return self._exception, self._traceback
             else:
                 raise TimeoutError()
 
+    def exception(self, timeout=None):
+        """Return the exception raised by the call that the future represents.
+
+        Args:
+            timeout: The number of seconds to wait for the exception if the
+                future isn't done. If None, then there is no limit on the wait
+                time.
+
+        Returns:
+            The exception raised by the call that the future represents or None
+            if the call completed without raising.
+
+        Raises:
+            CancelledError: If the future was cancelled.
+            TimeoutError: If the future didn't finish executing before the 
given
+                timeout.
+        """
+        return self.exception_info(timeout)[0]
+
     # The following methods should only be used by Executors and in tests.
     def set_running_or_notify_cancel(self):
         """Mark the future as running or process any cancel notifications.
@@ -492,19 +514,28 @@
             self._condition.notify_all()
         self._invoke_callbacks()
 
-    def set_exception(self, exception):
-        """Sets the result of the future as being the given exception.
+    def set_exception_info(self, exception, traceback):
+        """Sets the result of the future as being the given exception
+        and traceback.
 
         Should only be used by Executor implementations and unit tests.
         """
         with self._condition:
             self._exception = exception
+            self._traceback = traceback
             self._state = FINISHED
             for waiter in self._waiters:
                 waiter.add_exception(self)
             self._condition.notify_all()
         self._invoke_callbacks()
 
+    def set_exception(self, exception):
+        """Sets the result of the future as being the given exception.
+
+        Should only be used by Executor implementations and unit tests.
+        """
+        self.set_exception_info(exception, None)
+
 class Executor(object):
     """This is an abstract base class for concrete asynchronous executors."""
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/futures-2.1.6/concurrent/futures/_compat.py 
new/futures-2.2.0/concurrent/futures/_compat.py
--- old/futures-2.1.6/concurrent/futures/_compat.py     2012-08-28 
07:08:15.000000000 +0200
+++ new/futures-2.2.0/concurrent/futures/_compat.py     2014-09-06 
16:21:19.000000000 +0200
@@ -99,3 +99,13 @@
         result.__module__ = _sys._getframe(1).f_globals.get('__name__', 
'__main__')
 
     return result
+
+
+if _sys.version_info[0] < 3:
+    def reraise(exc, traceback):
+        locals_ = {'exc_type': type(exc), 'exc_value': exc, 'traceback': 
traceback}
+        exec('raise exc_type, exc_value, traceback', {}, locals_)
+else:
+    def reraise(exc, traceback):
+        # Tracebacks are embedded in exceptions in Python 3
+        raise exc
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/futures-2.1.6/concurrent/futures/thread.py 
new/futures-2.2.0/concurrent/futures/thread.py
--- old/futures-2.1.6/concurrent/futures/thread.py      2013-06-23 
21:11:51.000000000 +0200
+++ new/futures-2.2.0/concurrent/futures/thread.py      2014-09-06 
16:02:09.000000000 +0200
@@ -60,8 +60,8 @@
         try:
             result = self.fn(*self.args, **self.kwargs)
         except BaseException:
-            e = sys.exc_info()[1]
-            self.future.set_exception(e)
+            e, tb = sys.exc_info()[1:]
+            self.future.set_exception_info(e, tb)
         else:
             self.future.set_result(result)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/futures-2.1.6/futures.egg-info/PKG-INFO 
new/futures-2.2.0/futures.egg-info/PKG-INFO
--- old/futures-2.1.6/futures.egg-info/PKG-INFO 2014-01-14 10:20:42.000000000 
+0100
+++ new/futures-2.2.0/futures.egg-info/PKG-INFO 2014-09-25 23:20:56.000000000 
+0200
@@ -1,6 +1,6 @@
 Metadata-Version: 1.0
 Name: futures
-Version: 2.1.6
+Version: 2.2.0
 Summary: Backport of the concurrent.futures package from Python 3.2
 Home-page: http://code.google.com/p/pythonfutures
 Author: Alex Gronholm
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/futures-2.1.6/setup.py new/futures-2.2.0/setup.py
--- old/futures-2.1.6/setup.py  2014-01-14 10:03:20.000000000 +0100
+++ new/futures-2.2.0/setup.py  2014-09-06 16:02:09.000000000 +0200
@@ -12,7 +12,7 @@
     from distutils.core import setup
 
 setup(name='futures',
-      version='2.1.6',
+      version='2.2.0',
       description='Backport of the concurrent.futures package from Python 3.2',
       author='Brian Quinlan',
       author_email='[email protected]',

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to