[tryton-debian-vcs] tryton-neso branch upstream updated. upstream/3.2.0-1-g565269c

Mathias Behrle tryton-debian-vcs at alioth.debian.org
Mon Apr 28 19:04:38 UTC 2014


The following commit has been merged in the upstream branch:
https://alioth.debian.org/plugins/scmgit/cgi-bin/gitweb.cgi/?p=tryton/tryton-neso.git;a=commitdiff;h=upstream/3.2.0-1-g565269c

commit 565269c47a145212b79b309fcf1e01c906a34473
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Mon Apr 28 20:52:52 2014 +0200

    Adding upstream version 3.2.1.

diff --git a/CHANGELOG b/CHANGELOG
index 3e1e3f8..2e97db8 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,6 @@
+Version 3.2.1 - 2014-04-27
+* Bug fixes (see mercurial logs for details)
+
 Version 3.2.0 - 2014-04-21
 * Bug fixes (see mercurial logs for details)
 * Drop support of Python 2.6
diff --git a/PKG-INFO b/PKG-INFO
index 49bad7d..e62a117 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: neso
-Version: 3.2.0
+Version: 3.2.1
 Summary: Standalone Client/Server for the Tryton Application Platform
 Home-page: http://www.tryton.org/
 Author: Tryton
diff --git a/bin/neso b/bin/neso
index 9c443e6..851d8ab 100755
--- a/bin/neso
+++ b/bin/neso
@@ -7,6 +7,8 @@ import time
 import threading
 import xmlrpclib
 import traceback
+from functools import partial
+from contextlib import contextmanager
 
 import gobject
 
@@ -160,6 +162,49 @@ class LocalProxy(xmlrpclib.ServerProxy):
 
 rpc.ServerProxy = LocalProxy
 
+
+# TODO: replace LocalPool by ServerPool using a parameter for ServerProxy
+class LocalPool(object):
+
+    def __init__(self, *args, **kwargs):
+        self.LocalProxy = partial(LocalProxy, *args, **kwargs)
+        self._lock = threading.Lock()
+        self._pool = []
+        self._used = {}
+
+    def getconn(self):
+        with self._lock:
+            if self._pool:
+                conn = self._pool.pop()
+            else:
+                conn = self.LocalProxy()
+            self._used[id(conn)] = conn
+            return conn
+
+    def putconn(self, conn):
+        with self._lock:
+            self._pool.append(conn)
+            del self._used[id(conn)]
+
+    def close(self):
+        with self._lock:
+            for conn in self._pool + self._used.values():
+                conn.close()
+
+    @property
+    def ssl(self):
+        for conn in self._pool + self._used.values():
+            return conn.ssl
+        return False
+
+    @contextmanager
+    def __call__(self):
+        conn = self.getconn()
+        yield conn
+        self.putconn(conn)
+
+rpc.ServerPool = LocalPool
+
 CRON_RUNNING = True
 
 
diff --git a/neso.egg-info/PKG-INFO b/neso.egg-info/PKG-INFO
index 49bad7d..e62a117 100644
--- a/neso.egg-info/PKG-INFO
+++ b/neso.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: neso
-Version: 3.2.0
+Version: 3.2.1
 Summary: Standalone Client/Server for the Tryton Application Platform
 Home-page: http://www.tryton.org/
 Author: Tryton
diff --git a/neso/version.py b/neso/version.py
index 45d0584..0e39619 100644
--- a/neso/version.py
+++ b/neso/version.py
@@ -1,6 +1,6 @@
 #This file is part of Tryton.  The COPYRIGHT file at the top level of
 #this repository contains the full copyright notices and license terms.
 PACKAGE = "neso"
-VERSION = "3.2.0"
+VERSION = "3.2.1"
 LICENSE = "GPL-3"
 WEBSITE = "http://www.tryton.org/"
diff --git a/setup.py b/setup.py
index f58303d..d588aae 100644
--- a/setup.py
+++ b/setup.py
@@ -86,6 +86,7 @@ if os.name == 'nt':
                 'SimpleXMLRPCServer',
                 'SimpleHTTPServer',
                 'sql',
+                'stdnum',
             ],
         }
     }
@@ -111,7 +112,7 @@ elif sys.platform == 'darwin':
                     'vobject, vatnumber, suds, email, cPickle, sha, '
                     'contextlib, gtk_osxapplication, ldap, simplejson'),
             'packages': ('xml, logging, lxml, genshi, DAV, pytz, email, '
-                    'relatorio, sql'),
+                    'relatorio, sql', 'stdnum'),
             'excludes': 'tryton, trytond',
             'frameworks': 'librsvg-2.2.dylib',
             'plist': {
@@ -258,6 +259,7 @@ if os.name == 'nt':
     if 'py2exe' in dist.commands:
         import shutil
         import pytz
+        import stdnum
         import zipfile
 
         gtk_dir = find_gtk_dir()
@@ -270,6 +272,13 @@ if os.name == 'nt':
                 pytz.__file__.endswith('__init__.py')), pytz.__file__
         zoneinfo_dir = os.path.join(os.path.dirname(pytz.__file__), 'zoneinfo')
         disk_basedir = os.path.dirname(os.path.dirname(pytz.__file__))
+
+        # stdnum installs dat files in the same directory
+        # Make sure the layout of stdnum hasn't changed
+        assert (stdnum.__file__.endswith('__init__.pyc') or
+                stdnum.__file__.endswith('__init__.py')), stdnum.__file__
+        dat_dir = os.path.join(os.path.dirname(stdnum.__file__))
+
         zipfile_path = os.path.join(dist_dir, 'library.zip')
         z = zipfile.ZipFile(zipfile_path, 'a')
         for absdir, directories, filenames in os.walk(zoneinfo_dir):
@@ -277,6 +286,10 @@ if os.name == 'nt':
             zip_dir = absdir[len(disk_basedir):]
             for f in filenames:
                 z.write(os.path.join(absdir, f), os.path.join(zip_dir, f))
+        for f in os.listdir(dat_dir):
+            if f.endswith('.dat'):
+                z.write(os.path.join(dat_dir, f),
+                    os.path.join(os.path.basename(dat_dir), f))
         z.close()
 
         copy_trytons(dist_dir)
-- 
tryton-neso



More information about the tryton-debian-vcs mailing list