[tryton-debian-vcs] tryton-proteus branch upstream updated. upstream/2.8.0-1-g57f1730

git repository hosting tryton-debian-vcs at m9s.biz
Mon Nov 25 19:39:04 UTC 2013


The following commit has been merged in the upstream branch:
http://debian.tryton.org/gitweb/?p=packages/tryton-proteus.git;a=commitdiff;h=upstream/2.8.0-1-g57f1730

commit 57f17304b3f77f93e1eb2f08c696d6e72346a536
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Sun Nov 24 17:28:48 2013 +0100

    Adding upstream version 3.0.0.

diff --git a/CHANGELOG b/CHANGELOG
index 628c5ee..6579877 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,6 @@
+Version 3.0.0 - 2013-10-21
+* Bug fixes (see mercurial logs for details)
+
 Version 2.8.0 - 2013-04-22
 * Bug fixes (see mercurial logs for details)
 * Add support of fields.Dict
diff --git a/PKG-INFO b/PKG-INFO
index 528d96a..9a334cb 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,12 +1,12 @@
 Metadata-Version: 1.1
 Name: proteus
-Version: 2.8.0
+Version: 3.0.0
 Summary: Library to access Tryton server as a client
 Home-page: http://www.tryton.org/
 Author: Tryton
 Author-email: UNKNOWN
 License: LGPL-3
-Download-URL: http://downloads.tryton.org/2.8/
+Download-URL: http://downloads.tryton.org/3.0/
 Description: proteus
         =======
         
diff --git a/proteus.egg-info/PKG-INFO b/proteus.egg-info/PKG-INFO
index 528d96a..9a334cb 100644
--- a/proteus.egg-info/PKG-INFO
+++ b/proteus.egg-info/PKG-INFO
@@ -1,12 +1,12 @@
 Metadata-Version: 1.1
 Name: proteus
-Version: 2.8.0
+Version: 3.0.0
 Summary: Library to access Tryton server as a client
 Home-page: http://www.tryton.org/
 Author: Tryton
 Author-email: UNKNOWN
 License: LGPL-3
-Download-URL: http://downloads.tryton.org/2.8/
+Download-URL: http://downloads.tryton.org/3.0/
 Description: proteus
         =======
         
diff --git a/proteus.egg-info/requires.txt b/proteus.egg-info/requires.txt
index d9c9147..2275f28 100644
--- a/proteus.egg-info/requires.txt
+++ b/proteus.egg-info/requires.txt
@@ -4,7 +4,7 @@ python-dateutil
 cdecimal
 
 [trytond]
-trytond >= 2.8, < 2.9
+trytond >= 3.0, < 3.1
 
 [simplejson]
 simplejson
\ No newline at end of file
diff --git a/proteus/__init__.py b/proteus/__init__.py
index 257d1c9..9843977 100644
--- a/proteus/__init__.py
+++ b/proteus/__init__.py
@@ -3,7 +3,7 @@
 '''
 A library to access Tryton's models like a client.
 '''
-__version__ = "2.8.0"
+__version__ = "3.0.0"
 __all__ = ['Model', 'Wizard']
 import sys
 try:
@@ -351,6 +351,7 @@ class MetaModelFactory(object):
         'reference': ReferenceDescriptor,
         'date': DateDescriptor,
         'datetime': DateTimeDescriptor,
+        'timestamp': DateTimeDescriptor,
         'time': TimeDescriptor,
         'dict': DictDescriptor,
         'many2one': Many2OneDescriptor,
@@ -630,7 +631,8 @@ class Model(object):
     def __cmp__(self, other):
         'Compare with other'
         if isinstance(other, Model):
-            return cmp(self.id, other.id)
+            return cmp((self.__class__.__name__, self.id),
+                (other.__class__.__name__, other.id))
         if isinstance(other, (bool, NoneType)):
             return 1
         raise NotImplementedError
diff --git a/proteus/config.py b/proteus/config.py
index 436ce8e..39a3148 100644
--- a/proteus/config.py
+++ b/proteus/config.py
@@ -178,10 +178,11 @@ class TrytondConfig(Config):
         super(TrytondConfig, self).__init__()
         from trytond.config import CONFIG
         CONFIG.update_etc(config_file)
+        CONFIG.set_timezone()
         if database_type is not None:
             CONFIG['db_type'] = database_type
         from trytond.pool import Pool
-        from trytond.backend import Database
+        from trytond import backend
         from trytond.protocols.dispatcher import create
         from trytond.cache import Cache
         from trytond.transaction import Transaction
@@ -197,12 +198,9 @@ class TrytondConfig(Config):
 
         Pool.start()
 
-        database = Database().connect()
-        cursor = database.cursor()
-        try:
-            databases = database.list(cursor)
-        finally:
-            cursor.close()
+        with Transaction().start(None, 0) as transaction:
+            cursor = transaction.cursor
+            databases = backend.get('Database').list(cursor)
         if database_name not in databases:
             create(database_name, CONFIG['admin_passwd'], language, password)
 
-- 
tryton-proteus



More information about the tryton-debian-vcs mailing list