[tryton-debian-vcs] tryton-proteus branch debian-jessie-3.2 updated. debian/3.2.3-1-2-g5d29813
Mathias Behrle
tryton-debian-vcs at alioth.debian.org
Tue Mar 31 12:45:24 UTC 2015
The following commit has been merged in the debian-jessie-3.2 branch:
https://alioth.debian.org/plugins/scmgit/cgi-bin/gitweb.cgi/?p=tryton/tryton-proteus.git;a=commitdiff;h=debian/3.2.3-1-2-g5d29813
commit 5d298138c5c55bdbbdaf4d9f891cbc9f65d16791
Author: Mathias Behrle <mathiasb at m9s.biz>
Date: Tue Mar 31 14:31:53 2015 +0200
Releasing debian version 3.2.4-1.
Signed-off-by: Mathias Behrle <mathiasb at m9s.biz>
diff --git a/debian/changelog b/debian/changelog
index 4fa8d5e..581b2b6 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+tryton-proteus (3.2.4-1) unstable; urgency=medium
+
+ * Merging upstream version 3.2.4.
+
+ -- Mathias Behrle <mathiasb at m9s.biz> Tue, 31 Mar 2015 14:31:53 +0200
+
tryton-proteus (3.2.3-1) unstable; urgency=medium
* Adding actual upstream signing key.
commit e9a7a0acde6cca48cb2af3dc7a459a8d8912fd62
Author: Mathias Behrle <mathiasb at m9s.biz>
Date: Tue Mar 31 14:31:53 2015 +0200
Merging upstream version 3.2.4.
diff --git a/CHANGELOG b/CHANGELOG
index a7221d9..578a00c 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,6 @@
+Version 3.2.4 - 2015-03-30
+* Bug fixes (see mercurial logs for details)
+
Version 3.2.3 - 2015-02-16
* Bug fixes (see mercurial logs for details)
diff --git a/PKG-INFO b/PKG-INFO
index 27eaa6c..b1e7bd1 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: proteus
-Version: 3.2.3
+Version: 3.2.4
Summary: Library to access Tryton server as a client
Home-page: http://www.tryton.org/
Author: Tryton
diff --git a/proteus.egg-info/PKG-INFO b/proteus.egg-info/PKG-INFO
index 27eaa6c..b1e7bd1 100644
--- a/proteus.egg-info/PKG-INFO
+++ b/proteus.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: proteus
-Version: 3.2.3
+Version: 3.2.4
Summary: Library to access Tryton server as a client
Home-page: http://www.tryton.org/
Author: Tryton
diff --git a/proteus/__init__.py b/proteus/__init__.py
index 5e73936..cdd7b28 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.2.3"
+__version__ = "3.2.4"
__all__ = ['Model', 'Wizard']
import sys
try:
diff --git a/proteus/pyson.py b/proteus/pyson.py
index 462fce9..9e354d9 100644
--- a/proteus/pyson.py
+++ b/proteus/pyson.py
@@ -1,7 +1,7 @@
#This file is part of Tryton. The COPYRIGHT file at the top level of
#this repository contains the full copyright notices and license terms.
__all__ = ['PYSONEncoder', 'PYSONDecoder', 'Eval', 'Not', 'Bool', 'And', 'Or',
- 'Equal', 'Greater', 'Less', 'If', 'Get', 'In', 'Date', 'DateTime']
+ 'Equal', 'Greater', 'Less', 'If', 'Get', 'In', 'Date', 'DateTime', 'Len']
try:
import simplejson as json
except ImportError:
@@ -529,6 +529,32 @@ class DateTime(Date):
)
+class Len(PYSON):
+
+ def __init__(self, value):
+ super(Len, self).__init__()
+ if isinstance(value, PYSON):
+ assert value.types().issubset(set([dict, list, str])), \
+ 'value must be a dict or a list or a string'
+ else:
+ assert type(value) in [dict, list, str], \
+ 'value must be a dict or list or a string'
+ self._value = value
+
+ def pyson(self):
+ return {
+ '__class__': 'Len',
+ 'v': self._value,
+ }
+
+ def types(self):
+ return set([int, long])
+
+ @staticmethod
+ def eval(dct, context):
+ return len(dct['v'])
+
+
CONTEXT = {
'Eval': Eval,
'Not': Not,
@@ -543,4 +569,5 @@ CONTEXT = {
'In': In,
'Date': Date,
'DateTime': DateTime,
+ 'Len': Len,
}
--
tryton-proteus
More information about the tryton-debian-vcs
mailing list