Hello community,

here is the log from the commit of package python-thrift for openSUSE:Factory 
checked in at 2016-03-02 14:21:25
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-thrift (Old)
 and      /work/SRC/openSUSE:Factory/.python-thrift.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-thrift"

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-thrift/python-thrift.changes      
2015-05-18 22:34:49.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.python-thrift.new/python-thrift.changes 
2016-03-02 14:21:26.000000000 +0100
@@ -1,0 +2,6 @@
+Thu Feb 18 13:55:02 UTC 2016 - eshmar...@suse.com
+
+- update to version 0.9.3:
+  * no changelog available
+
+-------------------------------------------------------------------

Old:
----
  thrift-0.9.2.tar.gz

New:
----
  thrift-0.9.3.tar.gz

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

Other differences:
------------------
++++++ python-thrift.spec ++++++
--- /var/tmp/diff_new_pack.di9VwU/_old  2016-03-02 14:21:27.000000000 +0100
+++ /var/tmp/diff_new_pack.di9VwU/_new  2016-03-02 14:21:27.000000000 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package python-thrift
 #
-# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2016 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
@@ -17,7 +17,7 @@
 
 
 Name:           python-thrift
-Version:        0.9.2
+Version:        0.9.3
 Release:        0
 Summary:        Python bindings for the Apache Thrift RPC system
 License:        Apache-2.0

++++++ thrift-0.9.2.tar.gz -> thrift-0.9.3.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/thrift-0.9.2/PKG-INFO new/thrift-0.9.3/PKG-INFO
--- old/thrift-0.9.2/PKG-INFO   2014-11-18 04:29:47.000000000 +0100
+++ new/thrift-0.9.3/PKG-INFO   2015-10-12 03:34:44.000000000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: thrift
-Version: 0.9.2
+Version: 0.9.3
 Summary: Python bindings for the Apache Thrift RPC system
 Home-page: http://thrift.apache.org
 Author: Thrift Developers
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/thrift-0.9.2/setup.py new/thrift-0.9.3/setup.py
--- old/thrift-0.9.2/setup.py   2014-11-18 04:28:47.000000000 +0100
+++ new/thrift-0.9.3/setup.py   2015-10-12 03:34:22.000000000 +0200
@@ -71,7 +71,7 @@
         extensions = dict()
         
     setup(name = 'thrift',
-        version = '0.9.2',
+        version = '0.9.3',
         description = 'Python bindings for the Apache Thrift RPC system',
         author = 'Thrift Developers',
         author_email = 'd...@thrift.apache.org',
@@ -102,7 +102,7 @@
 except BuildFailed:
     print()
     print('*' * 80)
-    print("An error occured while trying to compile with the C extension 
enabled")
+    print("An error occurred while trying to compile with the C extension 
enabled")
     print("Attempting to build without the extension now")
     print('*' * 80)
     print()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/thrift-0.9.2/src/protocol/fastbinary.c 
new/thrift-0.9.3/src/protocol/fastbinary.c
--- old/thrift-0.9.2/src/protocol/fastbinary.c  2014-11-05 02:50:31.000000000 
+0100
+++ new/thrift-0.9.3/src/protocol/fastbinary.c  2015-07-21 06:54:48.000000000 
+0200
@@ -32,7 +32,7 @@
 # if defined(_MSC_VER) && _MSC_VER < 1600
    typedef int _Bool;
 #  define bool _Bool
-#  define false 0 
+#  define false 0
 #  define true 1
 # endif
 # define inline __inline
@@ -197,6 +197,21 @@
   return true;
 }
 
+#define MAX_LIST_SIZE (10000)
+
+static inline bool
+check_list_length(Py_ssize_t len) {
+  // error from getting the int
+  if (INT_CONV_ERROR_OCCURRED(len)) {
+    return false;
+  }
+  if (!CHECK_RANGE(len, 0, MAX_LIST_SIZE)) {
+    PyErr_SetString(PyExc_OverflowError, "list size out of the sanity limit 
(10000 items max)");
+    return false;
+  }
+  return true;
+}
+
 static inline bool
 parse_pyint(PyObject* o, int32_t* ret, int32_t min, int32_t max) {
   long val = PyInt_AsLong(o);
@@ -332,7 +347,7 @@
 }
 
 
-/* --- MAIN RECURSIVE OUTPUT FUCNTION -- */
+/* --- MAIN RECURSIVE OUTPUT FUNCTION -- */
 
 static int
 output_val(PyObject* output, PyObject* value, TType type, PyObject* typeargs) {
@@ -936,7 +951,7 @@
 }
 
 
-/* --- MAIN RECURSIVE INPUT FUCNTION --- */
+/* --- MAIN RECURSIVE INPUT FUNCTION --- */
 
 // Returns a new reference.
 static PyObject*
@@ -1028,7 +1043,7 @@
     }
 
     len = readI32(input);
-    if (!check_ssize_t_32(len)) {
+    if (!check_list_length(len)) {
       return NULL;
     }
 
@@ -1164,7 +1179,7 @@
   PyObject* typeargs = NULL;
   StructTypeArgs parsedargs;
   DecodeBuffer input = {0, 0};
-  
+
   if (!PyArg_ParseTuple(args, "OOO", &output_obj, &transport, &typeargs)) {
     return NULL;
   }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/thrift-0.9.2/src/server/THttpServer.py 
new/thrift-0.9.3/src/server/THttpServer.py
--- old/thrift-0.9.2/src/server/THttpServer.py  2014-11-05 02:50:31.000000000 
+0100
+++ new/thrift-0.9.3/src/server/THttpServer.py  2015-03-19 01:55:01.000000000 
+0100
@@ -73,7 +73,7 @@
         oprot = thttpserver.outputProtocolFactory.getProtocol(otrans)
         try:
           thttpserver.processor.process(iprot, oprot)
-        except ResponseException, exn:
+        except ResponseException as exn:
           exn.handler(self)
         else:
           self.send_response(200)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/thrift-0.9.2/src/server/TNonblockingServer.py 
new/thrift-0.9.3/src/server/TNonblockingServer.py
--- old/thrift-0.9.2/src/server/TNonblockingServer.py   2014-11-05 
02:50:31.000000000 +0100
+++ new/thrift-0.9.3/src/server/TNonblockingServer.py   2015-01-26 
03:06:23.000000000 +0100
@@ -261,7 +261,7 @@
     def wake_up(self):
         """Wake up main thread.
 
-        The server usualy waits in select call in we should terminate one.
+        The server usually waits in select call in we should terminate one.
         The simplest way is using socketpair.
 
         Select always wait to read from the first socket of socketpair.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/thrift-0.9.2/src/server/TProcessPoolServer.py 
new/thrift-0.9.3/src/server/TProcessPoolServer.py
--- old/thrift-0.9.2/src/server/TProcessPoolServer.py   2014-11-05 
02:50:31.000000000 +0100
+++ new/thrift-0.9.3/src/server/TProcessPoolServer.py   2015-03-19 
02:52:05.000000000 +0100
@@ -63,7 +63,7 @@
                 self.serveClient(client)
             except (KeyboardInterrupt, SystemExit):
                 return 0
-            except Exception, x:
+            except Exception as x:
                 logger.exception(x)
 
     def serveClient(self, client):
@@ -76,9 +76,9 @@
         try:
             while True:
                 self.processor.process(iprot, oprot)
-        except TTransportException, tx:
+        except TTransportException as tx:
             pass
-        except Exception, x:
+        except Exception as x:
             logger.exception(x)
 
         itrans.close()
@@ -99,7 +99,7 @@
                 w.daemon = True
                 w.start()
                 self.workers.append(w)
-            except Exception, x:
+            except Exception as x:
                 logger.exception(x)
 
         # wait until the condition is set by stop()
@@ -110,7 +110,7 @@
                 break
             except (SystemExit, KeyboardInterrupt):
                 break
-            except Exception, x:
+            except Exception as x:
                 logger.exception(x)
 
         self.isRunning.value = False
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/thrift-0.9.2/src/server/TServer.py 
new/thrift-0.9.3/src/server/TServer.py
--- old/thrift-0.9.2/src/server/TServer.py      2014-11-05 02:50:31.000000000 
+0100
+++ new/thrift-0.9.3/src/server/TServer.py      2015-03-19 01:53:25.000000000 
+0100
@@ -86,9 +86,9 @@
       try:
         while True:
           self.processor.process(iprot, oprot)
-      except TTransport.TTransportException, tx:
+      except TTransport.TTransportException as tx:
         pass
-      except Exception, x:
+      except Exception as x:
         logger.exception(x)
 
       itrans.close()
@@ -114,7 +114,7 @@
         t.start()
       except KeyboardInterrupt:
         raise
-      except Exception, x:
+      except Exception as x:
         logger.exception(x)
 
   def handle(self, client):
@@ -125,9 +125,9 @@
     try:
       while True:
         self.processor.process(iprot, oprot)
-    except TTransport.TTransportException, tx:
+    except TTransport.TTransportException as tx:
       pass
-    except Exception, x:
+    except Exception as x:
       logger.exception(x)
 
     itrans.close()
@@ -153,7 +153,7 @@
       try:
         client = self.clients.get()
         self.serveClient(client)
-      except Exception, x:
+      except Exception as x:
         logger.exception(x)
 
   def serveClient(self, client):
@@ -165,9 +165,9 @@
     try:
       while True:
         self.processor.process(iprot, oprot)
-    except TTransport.TTransportException, tx:
+    except TTransport.TTransportException as tx:
       pass
-    except Exception, x:
+    except Exception as x:
       logger.exception(x)
 
     itrans.close()
@@ -180,7 +180,7 @@
         t = threading.Thread(target=self.serveThread)
         t.setDaemon(self.daemon)
         t.start()
-      except Exception, x:
+      except Exception as x:
         logger.exception(x)
 
     # Pump the socket for clients
@@ -191,7 +191,7 @@
         if not client:
           continue
         self.clients.put(client)
-      except Exception, x:
+      except Exception as x:
         logger.exception(x)
 
 
@@ -216,7 +216,7 @@
     def try_close(file):
       try:
         file.close()
-      except IOError, e:
+      except IOError as e:
         logger.warning(e, exc_info=True)
 
     self.serverTransport.listen()
@@ -250,9 +250,9 @@
             try:
               while True:
                 self.processor.process(iprot, oprot)
-            except TTransport.TTransportException, tx:
+            except TTransport.TTransportException as tx:
               pass
-            except Exception, e:
+            except Exception as e:
               logger.exception(e)
               ecode = 1
           finally:
@@ -261,9 +261,9 @@
 
           os._exit(ecode)
 
-      except TTransport.TTransportException, tx:
+      except TTransport.TTransportException as tx:
         pass
-      except Exception, x:
+      except Exception as x:
         logger.exception(x)
 
   def collect_children(self):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/thrift-0.9.2/src/transport/THttpClient.py 
new/thrift-0.9.3/src/transport/THttpClient.py
--- old/thrift-0.9.2/src/transport/THttpClient.py       2014-11-05 
02:50:31.000000000 +0100
+++ new/thrift-0.9.3/src/transport/THttpClient.py       2015-03-19 
02:52:05.000000000 +0100
@@ -103,8 +103,10 @@
     def _f(*args, **kwargs):
       orig_timeout = socket.getdefaulttimeout()
       socket.setdefaulttimeout(args[0].__timeout)
-      result = f(*args, **kwargs)
-      socket.setdefaulttimeout(orig_timeout)
+      try:
+        result = f(*args, **kwargs)
+      finally:
+        socket.setdefaulttimeout(orig_timeout)
       return result
     return _f
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/thrift-0.9.2/src/transport/TSSLSocket.py 
new/thrift-0.9.3/src/transport/TSSLSocket.py
--- old/thrift-0.9.2/src/transport/TSSLSocket.py        2014-11-05 
02:50:31.000000000 +0100
+++ new/thrift-0.9.3/src/transport/TSSLSocket.py        2015-03-19 
01:57:23.000000000 +0100
@@ -45,7 +45,8 @@
                ca_certs=None,
                keyfile=None,
                certfile=None,
-               unix_socket=None):
+               unix_socket=None,
+               ciphers=None):
     """Create SSL TSocket
 
     @param validate: Set to False to disable SSL certificate validation
@@ -58,6 +59,9 @@
     @type keyfile: str
     @param certfile: The cert file
     @type certfile: str
+    @param ciphers: The cipher suites to allow. This is passed to
+                    the ssl_wrap function as the 'ciphers' parameter.
+    @type ciphers: str
     
     Raises an IOError exception if validate is True and the ca_certs file is
     None, not present or unreadable.
@@ -72,6 +76,7 @@
     self.ca_certs = ca_certs
     self.keyfile = keyfile
     self.certfile = certfile
+    self.ciphers = ciphers
     if validate:
       if ca_certs is None or not os.access(ca_certs, os.R_OK):
         raise IOError('Certificate Authority ca_certs file "%s" '
@@ -92,17 +97,18 @@
                                       ca_certs=self.ca_certs,
                                       keyfile=self.keyfile,
                                       certfile=self.certfile,
-                                      cert_reqs=self.cert_reqs)
+                                      cert_reqs=self.cert_reqs,
+                                      ciphers=self.ciphers)
         self.handle.settimeout(self._timeout)
         try:
           self.handle.connect(ip_port)
-        except socket.error, e:
+        except socket.error as e:
           if res is not res0[-1]:
             continue
           else:
             raise e
         break
-    except socket.error, e:
+    except socket.error as e:
       if self._unix_socket:
         message = 'Could not connect to secure socket %s: %s' \
                 % (self._unix_socket, e)
@@ -167,7 +173,8 @@
                host=None,
                port=9090,
                certfile='cert.pem',
-               unix_socket=None):
+               unix_socket=None,
+               ciphers=None):
     """Initialize a TSSLServerSocket
 
     @param certfile: filename of the server certificate, defaults to cert.pem
@@ -178,9 +185,14 @@
     @type host: str
     @param port: The port to listen on for inbound connections.
     @type port: int
+    @param ciphers: The cipher suites to allow. This is passed to
+                    the ssl_wrap function as the 'ciphers' parameter.
+    @type ciphers: str
+
     """
     self.setCertfile(certfile)
     TSocket.TServerSocket.__init__(self, host, port)
+    self.ciphers = ciphers
 
   def setCertfile(self, certfile):
     """Set or change the server certificate file used to wrap new connections.
@@ -199,8 +211,9 @@
     plain_client, addr = self.handle.accept()
     try:
       client = ssl.wrap_socket(plain_client, certfile=self.certfile,
-                      server_side=True, ssl_version=self.SSL_VERSION)
-    except ssl.SSLError, ssl_exc:
+                      server_side=True, ssl_version=self.SSL_VERSION,
+                      ciphers=self.ciphers)
+    except ssl.SSLError as ssl_exc:
       # failed handshake/ssl wrap, close socket to client
       plain_client.close()
       # raise ssl_exc
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/thrift-0.9.2/src/transport/TSocket.py 
new/thrift-0.9.3/src/transport/TSocket.py
--- old/thrift-0.9.2/src/transport/TSocket.py   2014-11-05 02:50:31.000000000 
+0100
+++ new/thrift-0.9.3/src/transport/TSocket.py   2015-03-19 02:52:05.000000000 
+0100
@@ -86,13 +86,13 @@
         self.handle.settimeout(self._timeout)
         try:
           self.handle.connect(res[4])
-        except socket.error, e:
+        except socket.error as e:
           if res is not res0[-1]:
             continue
           else:
             raise e
         break
-    except socket.error, e:
+    except socket.error as e:
       if self._unix_socket:
         message = 'Could not connect to socket %s' % self._unix_socket
       else:
@@ -103,7 +103,7 @@
   def read(self, sz):
     try:
       buff = self.handle.recv(sz)
-    except socket.error, e:
+    except socket.error as e:
       if (e.args[0] == errno.ECONNRESET and
           (sys.platform == 'darwin' or sys.platform.startswith('freebsd'))):
         # freebsd and Mach don't follow POSIX semantic of recv
@@ -161,7 +161,7 @@
       tmp = socket.socket(res[0], res[1])
       try:
         tmp.connect(res[4])
-      except socket.error, err:
+      except socket.error as err:
         eno, message = err.args
         if eno == errno.ECONNREFUSED:
           os.unlink(res[4])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/thrift-0.9.2/src/transport/TTransport.py 
new/thrift-0.9.3/src/transport/TTransport.py
--- old/thrift-0.9.2/src/transport/TTransport.py        2014-11-05 
02:50:31.000000000 +0100
+++ new/thrift-0.9.3/src/transport/TTransport.py        2015-03-19 
02:52:05.000000000 +0100
@@ -160,7 +160,12 @@
     return self.__rbuf.read(sz)
 
   def write(self, buf):
-    self.__wbuf.write(buf)
+    try:
+      self.__wbuf.write(buf)
+    except Exception as e:
+      # on exception reset wbuf so it doesn't contain a partial function call
+      self.__wbuf = StringIO()
+      raise e
 
   def flush(self):
     out = self.__wbuf.getvalue()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/thrift-0.9.2/thrift.egg-info/PKG-INFO 
new/thrift-0.9.3/thrift.egg-info/PKG-INFO
--- old/thrift-0.9.2/thrift.egg-info/PKG-INFO   2014-11-18 04:29:46.000000000 
+0100
+++ new/thrift-0.9.3/thrift.egg-info/PKG-INFO   2015-10-12 03:34:44.000000000 
+0200
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: thrift
-Version: 0.9.2
+Version: 0.9.3
 Summary: Python bindings for the Apache Thrift RPC system
 Home-page: http://thrift.apache.org
 Author: Thrift Developers


Reply via email to