[tryton-debian-vcs] tryton-proteus branch debian updated. debian/3.8.1-2-5-gb8d9349

Mathias Behrle tryton-debian-vcs at alioth.debian.org
Thu Jun 2 16:29:46 UTC 2016


The following commit has been merged in the debian branch:
https://alioth.debian.org/plugins/scmgit/cgi-bin/gitweb.cgi/?p=tryton/tryton-proteus.git;a=commitdiff;h=debian/3.8.1-2-5-gb8d9349

commit b8d9349a8e19a7e8975c918c689dcea054d5e504
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Wed Jun 1 21:47:37 2016 +0200

    Releasing debian version 4.0.0-1.
    
    Signed-off-by: Mathias Behrle <mathiasb at m9s.biz>

diff --git a/debian/changelog b/debian/changelog
index a28b738..3dc30c7 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,12 @@
+tryton-proteus (4.0.0-1) unstable; urgency=medium
+
+  * Updating signing-key.asc with the actual upstream maintainer keys.
+  * Merging upstream version 4.0.0.
+  * Updating the copyright file.
+  * Adapting and improving the man page.
+
+ -- Mathias Behrle <mathiasb at m9s.biz>  Mon, 30 May 2016 19:33:14 +0200
+
 tryton-proteus (3.8.1-2) unstable; urgency=medium
 
   * Updating to standards version 3.9.7, no changes needed.
commit 01824b4a04e3768ce9f9fc2cfde3ae24c500fd50
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Mon May 30 19:15:10 2016 +0200

    Adapting and improving the man page.

diff --git a/debian/manpages/proteus.1 b/debian/manpages/proteus.1
index 0b33ce5..7b7c53f 100644
--- a/debian/manpages/proteus.1
+++ b/debian/manpages/proteus.1
@@ -1,23 +1,22 @@
-.TH PROTEUS 1 "2015\-04\-23" "3.6" "Tryton Application Platform"
-
+.TH PROTEUS 1 "2016\-05\-30" "4.0" "Tryton Application Platform"
 .SH NAME
 proteus \- Tryton Application Platform (Proteus)
-
 .SH SYNOPSIS
-\fBtryton\fR
-
+\fBfrom proteus import config, Model, Wizard, Report\fR
 .SH DESCRIPTION
 Tryton is a high-level general purpose application platform written in Python and using PostgreSQL as database engine. It is the core base of an ERP.
-
+.sp
+Proteus is a Python command line client for the Tryton Application Platform.
 .SH OPTIONS
 \fBproteus\fR has no options.
-
+.sp
 .SH SEE ALSO
-\fItrytond\fR(8)
-
+\fItryton\fR(1)
+\fItrytond\fR(1)
+.sp
 .SH HOMEPAGE
 More information about Tryton Proteus and the Tryton project can be found at <\fIhttp://www.tryton.org/\fR>.
-
+.sp
 .SH AUTHOR
 Tryton proteus was written by the Tryton project <\fIhttp://www.tryton.org/\fR>.
 .PP
commit cb3c01314411bfce0cd08f08a22202d78cbc48a3
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Fri May 27 19:01:03 2016 +0200

    Updating the copyright file.

diff --git a/debian/copyright b/debian/copyright
index 4093559..e445e47 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -1,12 +1,12 @@
 Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
 
 Files: *
-Copyright: 2010-2015 Cédric Krier
-           2010-2015 B2CK SPRL
+Copyright: 2010-2016 Cédric Krier
+           2010-2016 B2CK SPRL
 License: LGPL-3+
 
 Files: debian/*
-Copyright: 2011-2015 Mathias Behrle <mathiasb at m9s.biz>
+Copyright: 2011-2016 Mathias Behrle <mathiasb at m9s.biz>
 License: GPL-3+
 
 License: LGPL-3+
commit 44c8a9125b40788336286b3ebb6f6f551fc65b1e
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Fri May 27 18:26:26 2016 +0200

    Merging upstream version 4.0.0.

diff --git a/CHANGELOG b/CHANGELOG
index f00fe39..adcd04d 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,5 +1,6 @@
-Version 3.8.1 - 2016-01-11
+Version 4.0.0 - 2016-05-02
 * Bug fixes (see mercurial logs for details)
+* Add Python3 support
 
 Version 3.8.0 - 2015-11-02
 * Bug fixes (see mercurial logs for details)
diff --git a/COPYRIGHT b/COPYRIGHT
index 674c885..29bd825 100644
--- a/COPYRIGHT
+++ b/COPYRIGHT
@@ -1,5 +1,5 @@
-Copyright (C) 2010-2015 Cédric Krier.
-Copyright (C) 2010-2015 B2CK SPRL.
+Copyright (C) 2010-2016 Cédric Krier.
+Copyright (C) 2010-2016 B2CK SPRL.
 
 This program is free software: you can redistribute it and/or modify
 it under the terms of the GNU Lesser General Public License as published by
diff --git a/PKG-INFO b/PKG-INFO
index 8be1447..79d83d5 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,12 +1,12 @@
 Metadata-Version: 1.1
 Name: proteus
-Version: 3.8.1
+Version: 4.0.0
 Summary: Library to access Tryton server as a client
 Home-page: http://www.tryton.org/
 Author: Tryton
 Author-email: issue_tracker at tryton.org
 License: LGPL-3
-Download-URL: http://downloads.tryton.org/3.8/
+Download-URL: http://downloads.tryton.org/4.0/
 Description: proteus
         =======
         
@@ -152,6 +152,9 @@ Classifier: Intended Audience :: Legal Industry
 Classifier: License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)
 Classifier: Operating System :: OS Independent
 Classifier: Programming Language :: Python :: 2.7
+Classifier: Programming Language :: Python :: 3.3
+Classifier: Programming Language :: Python :: 3.4
+Classifier: Programming Language :: Python :: 3.5
 Classifier: Programming Language :: Python :: Implementation :: CPython
 Classifier: Programming Language :: Python :: Implementation :: PyPy
 Classifier: Topic :: Office/Business
diff --git a/proteus.egg-info/PKG-INFO b/proteus.egg-info/PKG-INFO
index 8be1447..79d83d5 100644
--- a/proteus.egg-info/PKG-INFO
+++ b/proteus.egg-info/PKG-INFO
@@ -1,12 +1,12 @@
 Metadata-Version: 1.1
 Name: proteus
-Version: 3.8.1
+Version: 4.0.0
 Summary: Library to access Tryton server as a client
 Home-page: http://www.tryton.org/
 Author: Tryton
 Author-email: issue_tracker at tryton.org
 License: LGPL-3
-Download-URL: http://downloads.tryton.org/3.8/
+Download-URL: http://downloads.tryton.org/4.0/
 Description: proteus
         =======
         
@@ -152,6 +152,9 @@ Classifier: Intended Audience :: Legal Industry
 Classifier: License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)
 Classifier: Operating System :: OS Independent
 Classifier: Programming Language :: Python :: 2.7
+Classifier: Programming Language :: Python :: 3.3
+Classifier: Programming Language :: Python :: 3.4
+Classifier: Programming Language :: Python :: 3.5
 Classifier: Programming Language :: Python :: Implementation :: CPython
 Classifier: Programming Language :: Python :: Implementation :: PyPy
 Classifier: Topic :: Office/Business
diff --git a/proteus.egg-info/requires.txt b/proteus.egg-info/requires.txt
index b8145a5..4e8fa73 100644
--- a/proteus.egg-info/requires.txt
+++ b/proteus.egg-info/requires.txt
@@ -3,8 +3,8 @@ python-dateutil
 [cdecimal]
 cdecimal
 
-[trytond]
-trytond >= 3.8, < 3.9
-
 [simplejson]
-simplejson
\ No newline at end of file
+simplejson
+
+[trytond]
+trytond >= 4.0, < 4.1
diff --git a/proteus/__init__.py b/proteus/__init__.py
index dc1906d..a9b904d 100644
--- a/proteus/__init__.py
+++ b/proteus/__init__.py
@@ -3,7 +3,7 @@
 '''
 A library to access Tryton's models like a client.
 '''
-__version__ = "3.8.1"
+__version__ = "4.0.0"
 __all__ = ['Model', 'Wizard', 'Report']
 import sys
 try:
@@ -18,7 +18,6 @@ import threading
 import datetime
 import functools
 from decimal import Decimal
-from types import NoneType
 
 import proteus.config
 
@@ -159,14 +158,14 @@ class BinaryDescriptor(FieldDescriptor):
 class IntegerDescriptor(FieldDescriptor):
 
     def __set__(self, instance, value):
-        assert isinstance(value, (int, long, NoneType))
+        assert isinstance(value, (int, long, type(None)))
         super(IntegerDescriptor, self).__set__(instance, value)
 
 
 class FloatDescriptor(FieldDescriptor):
 
     def __set__(self, instance, value):
-        assert isinstance(value, (int, long, float, Decimal, NoneType))
+        assert isinstance(value, (int, long, float, Decimal, type(None)))
         if value is not None:
             value = float(value)
         super(FloatDescriptor, self).__set__(instance, value)
@@ -175,7 +174,7 @@ class FloatDescriptor(FieldDescriptor):
 class NumericDescriptor(FieldDescriptor):
 
     def __set__(self, instance, value):
-        assert isinstance(value, (NoneType, Decimal))
+        assert isinstance(value, (type(None), Decimal))
         # TODO add digits validation
         super(NumericDescriptor, self).__set__(instance, value)
 
@@ -192,7 +191,7 @@ class ReferenceDescriptor(FieldDescriptor):
         return value
 
     def __set__(self, instance, value):
-        assert isinstance(value, (Model, NoneType, basestring))
+        assert isinstance(value, (Model, type(None), basestring))
         if isinstance(value, basestring):
             assert value.startswith(',')
         elif isinstance(value, Model):
@@ -254,7 +253,7 @@ class Many2OneDescriptor(FieldDescriptor):
         return value
 
     def __set__(self, instance, value):
-        assert isinstance(value, (Model, NoneType))
+        assert isinstance(value, (Model, type(None)))
         if value:
             assert value._config == instance._config
         super(Many2OneDescriptor, self).__set__(instance, value)
@@ -661,7 +660,7 @@ class Model(object):
     @classmethod
     def get(cls, name, config=None):
         'Get a class for the named Model'
-        if isinstance(name, unicode):
+        if (bytes == str) and isinstance(name, unicode):
             name = name.encode('utf-8')
 
         class Spam(Model):
@@ -692,14 +691,17 @@ class Model(object):
                 repr(self._config), self.id)
     __repr__.__doc__ = object.__repr__.__doc__
 
-    def __cmp__(self, other):
-        'Compare with other'
+    def __eq__(self, other):
         if isinstance(other, Model):
-            return cmp((self.__class__.__name__, self.id),
+            return ((self.__class__.__name__, self.id) ==
                 (other.__class__.__name__, other.id))
-        if isinstance(other, (bool, NoneType)):
-            return 1
-        raise NotImplementedError
+        return NotImplemented
+
+    def __ne__(self, other):
+        return not self == other
+
+    def __hash__(self):
+        return hash(self.__class__.__name__) ^ hash(self.id)
 
     @property
     def id(self):
@@ -1074,7 +1076,7 @@ class Wizard(object):
                 ctx['active_ids'] = None
                 ctx['active_model'] = None
             if self.action:
-                ctx['action_id'] = self.action.id
+                ctx['action_id'] = self.action['id']
             else:
                 ctx['action_id'] = None
 
@@ -1096,7 +1098,6 @@ class Wizard(object):
                 self.form._default_set(view['defaults'])
                 self.states = [b['state'] for b in view['buttons']]
                 self.form_state = view['state']
-                return
             else:
                 self.state = self.end_state
 
@@ -1107,6 +1108,9 @@ class Wizard(object):
                 if proteus_action:
                     self.actions.append(proteus_action)
 
+            if 'view' in result:
+                return
+
         if self.state == self.end_state:
             self._proxy.delete(self.session_id, self._config.context)
             if self.models:
diff --git a/proteus/config.py b/proteus/config.py
index 6a58069..967a152 100644
--- a/proteus/config.py
+++ b/proteus/config.py
@@ -181,7 +181,7 @@ class _TrytondMethod(object):
                     result = [rpc.result(meth(i, *args, **kwargs))
                         for i in inst]
             if not rpc.readonly:
-                transaction.cursor.commit()
+                transaction.commit()
             Cache.resets(self._config.database_name)
         return result
 
diff --git a/proteus/tests/common.py b/proteus/tests/common.py
index f075a20..dcbcc24 100644
--- a/proteus/tests/common.py
+++ b/proteus/tests/common.py
@@ -9,7 +9,10 @@ from proteus import config
 
 class ProteusTestCase(TestCase):
 
-    def setUp(self):
+    @classmethod
+    def setUpClass(cls):
         if not db_exist():
             create_db()
+
+    def setUp(self):
         self.config = config.set_trytond()
diff --git a/proteus/tests/test_config.py b/proteus/tests/test_config.py
index 78de2f6..d6420a7 100644
--- a/proteus/tests/test_config.py
+++ b/proteus/tests/test_config.py
@@ -26,7 +26,7 @@ class TestConfig(ProteusTestCase):
         self.assertRaises(NotImplementedError, config1.__eq__, None)
 
     def test_repr(self):
-        config = proteus.config.TrytondConfig()
+        config = proteus.config.TrytondConfig('sqlite:///:memory:')
         self.assertEqual(repr(config),
             "proteus.config.TrytondConfig("
             "'sqlite:///:memory:', 'admin', config_file=None)")
diff --git a/proteus/tests/test_model.py b/proteus/tests/test_model.py
index a07ed35..627bdfd 100644
--- a/proteus/tests/test_model.py
+++ b/proteus/tests/test_model.py
@@ -233,21 +233,22 @@ class TestModel(ProteusTestCase):
         self.assertEqual(test.groups, [])
         self.assertEqual(len(Group.find([('id', '=', group_id)])), 0)
 
-    def test_cmp(self):
+    def test_eq(self):
         User = Model.get('res.user')
         test = User()
-        test.name = 'Test cmp'
-        test.login = 'test_cmp'
+        test.name = 'Test eq'
+        test.login = 'test_eq'
         test.save()
         admin1 = User.find([('login', '=', 'admin')])[0]
         admin2 = User.find([('login', '=', 'admin')])[0]
 
         self.assertEqual(admin1, admin2)
+        self.assertFalse(admin1 != admin2)
         self.assertNotEqual(admin1, test)
+        self.assertFalse(admin1 == test)
         self.assertNotEqual(admin1, None)
         self.assertNotEqual(admin1, False)
-
-        self.assertRaises(NotImplementedError, lambda: admin1 == 1)
+        self.assertNotEqual(admin1, 1)
 
     def test_default_set(self):
         User = Model.get('res.user')
diff --git a/proteus/tests/test_wizard.py b/proteus/tests/test_wizard.py
index d2c384f..7edf200 100644
--- a/proteus/tests/test_wizard.py
+++ b/proteus/tests/test_wizard.py
@@ -46,3 +46,8 @@ class TestWizard(ProteusTestCase):
         self.assertEqual(len(print_model_graph.actions), 0)
         print_model_graph.execute('update')
         self.assertEqual(len(print_model_graph.actions), 1)
+
+    def test_configuration_wizard(self):
+        config_wizard = Wizard('ir.module.config_wizard')
+        config_wizard.execute('action')
+        self.assertTrue(config_wizard.actions)
diff --git a/setup.py b/setup.py
index 235a7dd..7846c4e 100644
--- a/setup.py
+++ b/setup.py
@@ -3,11 +3,19 @@
 # this repository contains the full copyright notices and license terms.
 from setuptools import setup, find_packages
 import os
-import proteus
+import re
+import io
 
 
 def read(fname):
-    return open(os.path.join(os.path.dirname(__file__), fname)).read()
+    return io.open(
+        os.path.join(os.path.dirname(__file__), fname),
+        'r', encoding='utf-8').read()
+
+
+def get_version():
+    init = read(os.path.join('proteus', '__init__.py'))
+    return re.search('__version__ = "([0-9.]*)"', init).group(1)
 
 
 def get_require_version(name):
@@ -20,7 +28,7 @@ def get_require_version(name):
     return require
 
 name = 'proteus'
-version = proteus.__version__
+version = get_version()
 major_version, minor_version, _ = version.split('.', 2)
 major_version = int(major_version)
 minor_version = int(minor_version)
@@ -58,6 +66,9 @@ setup(name=name,
         'GNU Library or Lesser General Public License (LGPL)',
         'Operating System :: OS Independent',
         'Programming Language :: Python :: 2.7',
+        'Programming Language :: Python :: 3.3',
+        'Programming Language :: Python :: 3.4',
+        'Programming Language :: Python :: 3.5',
         'Programming Language :: Python :: Implementation :: CPython',
         'Programming Language :: Python :: Implementation :: PyPy',
         'Topic :: Office/Business',
@@ -77,4 +88,5 @@ setup(name=name,
     test_suite='proteus.tests',
     tests_require=[get_require_version('trytond'),
         get_require_version('trytond_party')],
+    use_2to3=True,
     )
-- 
tryton-proteus



More information about the tryton-debian-vcs mailing list