[tryton-debian-vcs] tryton-server branch upstream-3.4 updated. upstream/3.4.3-1-g875445b

Mathias Behrle tryton-debian-vcs at alioth.debian.org
Wed May 20 20:18:57 UTC 2015


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

commit 875445b1fba0302a22b87041f04f0a261d1b04da
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Wed May 20 15:02:09 2015 +0200

    Adding upstream version 3.4.4.
    
    Signed-off-by: Mathias Behrle <mathiasb at m9s.biz>

diff --git a/CHANGELOG b/CHANGELOG
index 8aa419c..4e58c26 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,6 @@
+Version 3.4.4 - 2015-05-19
+* Bug fixes (see mercurial logs for details)
+
 Version 3.4.3 - 2015-03-30
 * Bug fixes (see mercurial logs for details)
 
diff --git a/PKG-INFO b/PKG-INFO
index b0a810f..157b7a5 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: trytond
-Version: 3.4.3
+Version: 3.4.4
 Summary: Tryton server
 Home-page: http://www.tryton.org/
 Author: Tryton
diff --git a/trytond.egg-info/PKG-INFO b/trytond.egg-info/PKG-INFO
index b0a810f..157b7a5 100644
--- a/trytond.egg-info/PKG-INFO
+++ b/trytond.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: trytond
-Version: 3.4.3
+Version: 3.4.4
 Summary: Tryton server
 Home-page: http://www.tryton.org/
 Author: Tryton
diff --git a/trytond/backend/postgresql/database.py b/trytond/backend/postgresql/database.py
index 8316f63..c0ebb41 100644
--- a/trytond/backend/postgresql/database.py
+++ b/trytond/backend/postgresql/database.py
@@ -142,6 +142,7 @@ class Database(DatabaseInterface):
         database.create(cursor, database_name)
         cursor.commit()
         cursor.close()
+        database.close()
 
         cmd = ['pg_restore', '--no-owner']
         env = {}
diff --git a/trytond/cache.py b/trytond/cache.py
index 6ccd039..c89e727 100644
--- a/trytond/cache.py
+++ b/trytond/cache.py
@@ -116,6 +116,11 @@ class Cache(object):
                 Cache._resets[dbname].clear()
             cursor.commit()
 
+    @classmethod
+    def drop(cls, dbname):
+        for inst in cls._cache_instance:
+            inst._cache.pop(dbname, None)
+
 
 class LRUDict(OrderedDict):
     """
diff --git a/trytond/model/modelstorage.py b/trytond/model/modelstorage.py
index 5831c9d..a33d5fc 100644
--- a/trytond/model/modelstorage.py
+++ b/trytond/model/modelstorage.py
@@ -294,10 +294,11 @@ class ModelStorage(Model):
                 or isinstance(f, fields.Property))]
         ids = map(int, records)
         datas = cls.read(ids, fields_names=fields_names)
+        datas = dict((d['id'], d) for d in datas)
         field_defs = cls.fields_get(fields_names=fields_names)
         to_create = []
-        for data in datas:
-            data = convert_data(field_defs, data)
+        for id in ids:
+            data = convert_data(field_defs, datas[id])
             to_create.append(data)
         new_records = cls.create(to_create)
         new_ids = dict(izip(ids, map(int, new_records)))
diff --git a/trytond/protocols/dispatcher.py b/trytond/protocols/dispatcher.py
index 05e3345..19b5dc7 100644
--- a/trytond/protocols/dispatcher.py
+++ b/trytond/protocols/dispatcher.py
@@ -272,6 +272,7 @@ def drop(database_name, password):
         else:
             logger.info('DROP DB: %s' % (database_name))
             Pool.stop(database_name)
+            Cache.drop(database_name)
     return True
 
 
diff --git a/trytond/tests/test_tryton.py b/trytond/tests/test_tryton.py
index 94bfab9..ee02fd7 100644
--- a/trytond/tests/test_tryton.py
+++ b/trytond/tests/test_tryton.py
@@ -193,7 +193,7 @@ def drop_db():
 
 
 def drop_create():
-    if db_exist:
+    if db_exist():
         drop_db()
     create_db()
 
diff --git a/trytond/version.py b/trytond/version.py
index d6fb88c..3e50d7f 100644
--- a/trytond/version.py
+++ b/trytond/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 = "trytond"
-VERSION = "3.4.3"
+VERSION = "3.4.4"
 LICENSE = "GPL-3"
 WEBSITE = "http://www.tryton.org/"
-- 
tryton-server



More information about the tryton-debian-vcs mailing list