diff -Nru tryton-neso-3.2.0/bin/neso tryton-neso-3.2.1/bin/neso --- tryton-neso-3.2.0/bin/neso 2013-11-25 23:07:15.000000000 +0000 +++ tryton-neso-3.2.1/bin/neso 2014-04-27 12:07:13.000000000 +0000 @@ -7,6 +7,8 @@ import threading import xmlrpclib import traceback +from functools import partial +from contextlib import contextmanager import gobject @@ -160,6 +162,49 @@ 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 -Nru tryton-neso-3.2.0/CHANGELOG tryton-neso-3.2.1/CHANGELOG --- tryton-neso-3.2.0/CHANGELOG 2014-04-21 18:31:46.000000000 +0000 +++ tryton-neso-3.2.1/CHANGELOG 2014-04-27 12:12:25.000000000 +0000 @@ -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 -Nru tryton-neso-3.2.0/debian/changelog tryton-neso-3.2.1/debian/changelog --- tryton-neso-3.2.0/debian/changelog 2014-04-24 13:30:18.000000000 +0000 +++ tryton-neso-3.2.1/debian/changelog 2014-04-28 18:53:53.000000000 +0000 @@ -1,3 +1,9 @@ +tryton-neso (3.2.1-1) unstable; urgency=medium + + * Merging upstream version 3.2.1. + + -- Mathias Behrle Mon, 28 Apr 2014 20:53:31 +0200 + tryton-neso (3.2.0-1) unstable; urgency=medium * Removing LC_ALL=C.UTF-8 as build environment. diff -Nru tryton-neso-3.2.0/neso/version.py tryton-neso-3.2.1/neso/version.py --- tryton-neso-3.2.0/neso/version.py 2014-04-21 18:31:42.000000000 +0000 +++ tryton-neso-3.2.1/neso/version.py 2014-04-21 19:39:40.000000000 +0000 @@ -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 -Nru tryton-neso-3.2.0/neso.egg-info/PKG-INFO tryton-neso-3.2.1/neso.egg-info/PKG-INFO --- tryton-neso-3.2.0/neso.egg-info/PKG-INFO 2014-04-21 18:31:49.000000000 +0000 +++ tryton-neso-3.2.1/neso.egg-info/PKG-INFO 2014-04-27 12:12:29.000000000 +0000 @@ -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 -Nru tryton-neso-3.2.0/PKG-INFO tryton-neso-3.2.1/PKG-INFO --- tryton-neso-3.2.0/PKG-INFO 2014-04-21 18:31:53.000000000 +0000 +++ tryton-neso-3.2.1/PKG-INFO 2014-04-27 12:12:30.000000000 +0000 @@ -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 -Nru tryton-neso-3.2.0/setup.py tryton-neso-3.2.1/setup.py --- tryton-neso-3.2.0/setup.py 2014-03-08 12:02:51.000000000 +0000 +++ tryton-neso-3.2.1/setup.py 2014-04-27 12:07:03.000000000 +0000 @@ -86,6 +86,7 @@ 'SimpleXMLRPCServer', 'SimpleHTTPServer', 'sql', + 'stdnum', ], } } @@ -111,7 +112,7 @@ '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 'py2exe' in dist.commands: import shutil import pytz + import stdnum import zipfile gtk_dir = find_gtk_dir() @@ -270,6 +272,13 @@ 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 @@ 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)