[tryton-debian-vcs] tryton-modules-ldap-connection branch debian updated. debian/3.0.0-3-4-g88fdfae

Mathias Behrle tryton-debian-vcs at alioth.debian.org
Tue Apr 22 13:07:57 UTC 2014


The following commit has been merged in the debian branch:
https://alioth.debian.org/plugins/scmgit/cgi-bin/gitweb.cgi/?p=tryton/tryton-modules-ldap-connection.git;a=commitdiff;h=debian/3.0.0-3-4-g88fdfae

commit 88fdfae67b9f27fcbfb737d49d96e506457c6a31
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Tue Apr 22 14:59:57 2014 +0200

    Bumping minimal required Python version to 2.7.

diff --git a/debian/control b/debian/control
index 185e7a6..d574cfa 100644
--- a/debian/control
+++ b/debian/control
@@ -9,7 +9,7 @@ Standards-Version: 3.9.5
 Homepage: http://www.tryton.org/
 Vcs-Browser: http://anonscm.debian.org/gitweb/?p=tryton/tryton-modules-ldap-connection.git
 Vcs-Git: git://anonscm.debian.org/tryton/tryton-modules-ldap-connection.git
-X-Python-Version: >= 2.6
+X-Python-Version: >= 2.7
 
 Package: tryton-modules-ldap-connection
 Architecture: all
commit b909c2b29cd71ad03400123c9cdfe36abfc1c1d0
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Tue Apr 22 14:46:09 2014 +0200

    Updating copyright.

diff --git a/debian/copyright b/debian/copyright
index 64f5aee..74cea77 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -1,9 +1,9 @@
 Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
 
 Files: *
-Copyright: 2006-2013 Cédric Krier
+Copyright: 2006-2014 Cédric Krier
            2009-2012 Bertrand Chenal
-           2009-2013 B2CK SPRL
+           2009-2014 B2CK SPRL
            2008 Josh Dukes
            2008 Micro-Vu
            2008-2010 Udo Spallek
commit 1ae31b09a6e9d14b142294f135b8f22dbd50d1b6
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Tue Apr 22 14:22:11 2014 +0200

    Merging upstream version 3.2.0.

diff --git a/CHANGELOG b/CHANGELOG
index 38379c2..3f62371 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,6 @@
+Version 3.2.0 - 2014-04-21
+* Bug fixes (see mercurial logs for details)
+
 Version 3.0.0 - 2013-10-21
 * Bug fixes (see mercurial logs for details)
 
diff --git a/COPYRIGHT b/COPYRIGHT
index 4c82393..00fdb6c 100644
--- a/COPYRIGHT
+++ b/COPYRIGHT
@@ -1,6 +1,6 @@
-Copyright (C) 2006-2013 Cédric Krier.
+Copyright (C) 2006-2014 Cédric Krier.
 Copyright (C) 2009-2012 Bertrand Chenal.
-Copyright (C) 2009-2013 B2CK SPRL.
+Copyright (C) 2009-2014 B2CK SPRL.
 Copyright (C) 2008 Josh Dukes.
 Copyright (C) 2008 Micro-Vu.
 Copyright (C) 2008-2010 Udo Spallek.
diff --git a/INSTALL b/INSTALL
index 895eb90..bb724d9 100644
--- a/INSTALL
+++ b/INSTALL
@@ -4,7 +4,7 @@ Installing trytond_ldap_connection
 Prerequisites
 -------------
 
- * Python 2.6 or later (http://www.python.org/)
+ * Python 2.7 or later (http://www.python.org/)
  * trytond (http://www.tryton.org/)
  * python-ldap (http://python-ldap.sourceforge.net/)
 
diff --git a/MANIFEST.in b/MANIFEST.in
index 2569955..e013c00 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -1,12 +1,10 @@
 include INSTALL
 include README
-include TODO
 include COPYRIGHT
 include CHANGELOG
 include LICENSE
 include tryton.cfg
 include *.xml
 include view/*.xml
-include *.odt
 include locale/*.po
 include doc/*
diff --git a/PKG-INFO b/PKG-INFO
index a9ab577..1c94a66 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,12 +1,12 @@
 Metadata-Version: 1.1
 Name: trytond_ldap_connection
-Version: 3.0.0
+Version: 3.2.0
 Summary: Tryton module to add LDAP connection
 Home-page: http://www.tryton.org/
 Author: Tryton
-Author-email: UNKNOWN
+Author-email: issue_tracker at tryton.org
 License: GPL-3
-Download-URL: http://downloads.tryton.org/3.0/
+Download-URL: http://downloads.tryton.org/3.2/
 Description: trytond_ldap_connection
         =======================
         
@@ -43,6 +43,7 @@ Description: trytond_ldap_connection
         
           http://www.tryton.org/
         
+Keywords: tryton ldap connection
 Platform: UNKNOWN
 Classifier: Development Status :: 5 - Production/Stable
 Classifier: Environment :: Plugins
@@ -62,7 +63,6 @@ Classifier: Natural Language :: Russian
 Classifier: Natural Language :: Slovenian
 Classifier: Natural Language :: Spanish
 Classifier: Operating System :: OS Independent
-Classifier: Programming Language :: Python :: 2.6
 Classifier: Programming Language :: Python :: 2.7
 Classifier: Topic :: Office/Business
 Classifier: Topic :: System :: Systems Administration :: Authentication/Directory :: LDAP
diff --git a/connection.py b/connection.py
index 0cbc5ca..fd8776b 100644
--- a/connection.py
+++ b/connection.py
@@ -20,7 +20,7 @@ class Connection(ModelSingleton, ModelSQL, ModelView):
         ('never', 'Never'),
         ('ssl', 'SSL'),
         ('tls', 'TLS'),
-        ], 'Secure', on_change=['secure'], required=True,
+        ], 'Secure', required=True,
         help='LDAP secure connection')
     bind_dn = fields.Char('Bind DN', help='LDAP DN used to bind')
     bind_pass = fields.Char('Bind Pass', states={
@@ -50,6 +50,7 @@ class Connection(ModelSingleton, ModelSQL, ModelView):
     def default_active_directory():
         return False
 
+    @fields.depends('secure')
     def on_change_secure(self):
         res = {}
         if self.secure in ('never', 'tls'):
@@ -68,11 +69,15 @@ class Connection(ModelSingleton, ModelSQL, ModelView):
         pass
 
     @classmethod
-    def write(cls, connections, values):
-        if 'bind_dn' in values and not values['bind_dn']:
-            values = values.copy()
-            values['bind_pass'] = None
-        return super(Connection, cls).write(connections, values)
+    def write(cls, *args):
+        actions = iter(args)
+        args = []
+        for connections, values in zip(actions, actions):
+            if 'bind_dn' in values and not values['bind_dn']:
+                values = values.copy()
+                values['bind_pass'] = None
+            args.extend((connections, values))
+        return super(Connection, cls).write(*args)
 
 
 class TestConnectionResult(ModelView):
diff --git a/locale/ca_ES.po b/locale/ca_ES.po
index f4f09e8..7dbc0ba 100644
--- a/locale/ca_ES.po
+++ b/locale/ca_ES.po
@@ -60,23 +60,23 @@ msgstr "ID"
 
 msgctxt "help:ldap.connection,bind_dn:"
 msgid "LDAP DN used to bind"
-msgstr "DN LDAP utilitzat per enllaçar"
+msgstr "DN LDAP utilitzat per enllaçar."
 
 msgctxt "help:ldap.connection,bind_pass:"
 msgid "LDAP password used to bind"
-msgstr "Contrasenya LDAP utilitzada per enllaçar"
+msgstr "Contrasenya LDAP utilitzada per enllaçar."
 
 msgctxt "help:ldap.connection,port:"
 msgid "LDAP server port"
-msgstr "Port del servidor LDAP"
+msgstr "Port del servidor LDAP."
 
 msgctxt "help:ldap.connection,secure:"
 msgid "LDAP secure connection"
-msgstr "Connexió LDAP segura"
+msgstr "Connexió LDAP segura."
 
 msgctxt "help:ldap.connection,server:"
 msgid "LDAP server name"
-msgstr "Nom del servidor LDAP"
+msgstr "Nom del servidor LDAP."
 
 msgctxt "model:ir.action,name:act_connection_form"
 msgid "Connection"
diff --git a/locale/es_CO.po b/locale/es_CO.po
index b4a4595..1c3e96d 100644
--- a/locale/es_CO.po
+++ b/locale/es_CO.po
@@ -4,7 +4,7 @@ msgstr "Content-Type: text/plain; charset=utf-8\n"
 
 msgctxt "field:ldap.connection,active_directory:"
 msgid "Active Directory"
-msgstr "Directorio activo"
+msgstr "Directorio Activo"
 
 msgctxt "field:ldap.connection,bind_dn:"
 msgid "Bind DN"
diff --git a/setup.py b/setup.py
index ac9d5de..568f786 100644
--- a/setup.py
+++ b/setup.py
@@ -11,33 +11,51 @@ import ConfigParser
 def read(fname):
     return open(os.path.join(os.path.dirname(__file__), fname)).read()
 
+
+def get_require_version(name):
+    if minor_version % 2:
+        require = '%s >= %s.%s.dev0, < %s.%s'
+    else:
+        require = '%s >= %s.%s, < %s.%s'
+    require %= (name, major_version, minor_version,
+        major_version, minor_version + 1)
+    return require
+
 config = ConfigParser.ConfigParser()
 config.readfp(open('tryton.cfg'))
 info = dict(config.items('tryton'))
 for key in ('depends', 'extras_depend', 'xml'):
     if key in info:
         info[key] = info[key].strip().splitlines()
-major_version, minor_version, _ = info.get('version', '0.0.1').split('.', 2)
+version = info.get('version', '0.0.1')
+major_version, minor_version, _ = version.split('.', 2)
 major_version = int(major_version)
 minor_version = int(minor_version)
+name = 'trytond_ldap_connection'
+
+download_url = 'http://downloads.tryton.org/%s.%s/' % (
+    major_version, minor_version)
+if minor_version % 2:
+    version = '%s.%s.dev0' % (major_version, minor_version)
+    download_url = (
+        'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % (
+            name[8:], name, version))
 
 requires = ['python-ldap']
 for dep in info.get('depends', []):
     if not re.match(r'(ir|res|webdav)(\W|$)', dep):
-        requires.append('trytond_%s >= %s.%s, < %s.%s' %
-            (dep, major_version, minor_version, major_version,
-                minor_version + 1))
-requires.append('trytond >= %s.%s, < %s.%s' %
-    (major_version, minor_version, major_version, minor_version + 1))
+        requires.append(get_require_version('trytond_%s' % dep))
+requires.append(get_require_version('trytond'))
 
-setup(name='trytond_ldap_connection',
-    version=info.get('version', '0.0.1'),
+setup(name=name,
+    version=version,
     description='Tryton module to add LDAP connection',
     long_description=read('README'),
     author='Tryton',
+    author_email='issue_tracker at tryton.org',
     url='http://www.tryton.org/',
-    download_url=("http://downloads.tryton.org/" +
-        info.get('version', '0.0.1').rsplit('.', 1)[0] + '/'),
+    download_url=download_url,
+    keywords='tryton ldap connection',
     package_dir={'trytond.modules.ldap_connection': '.'},
     packages=[
         'trytond.modules.ldap_connection',
@@ -66,7 +84,6 @@ setup(name='trytond_ldap_connection',
         'Natural Language :: Slovenian',
         'Natural Language :: Spanish',
         'Operating System :: OS Independent',
-        'Programming Language :: Python :: 2.6',
         'Programming Language :: Python :: 2.7',
         'Topic :: Office/Business',
         ('Topic :: System :: Systems Administration '
diff --git a/tests/test_ldap_connection.py b/tests/test_ldap_connection.py
index 3a0971f..9374907 100644
--- a/tests/test_ldap_connection.py
+++ b/tests/test_ldap_connection.py
@@ -1,37 +1,22 @@
-#!/usr/bin/env python
 #This file is part of Tryton.  The COPYRIGHT file at the top level of
 #this repository contains the full copyright notices and license terms.
-
-import sys
-import os
-DIR = os.path.abspath(os.path.normpath(os.path.join(__file__,
-    '..', '..', '..', '..', '..', 'trytond')))
-if os.path.isdir(DIR):
-    sys.path.insert(0, os.path.dirname(DIR))
-
 import unittest
 import trytond.tests.test_tryton
 from trytond.tests.test_tryton import test_view, test_depends
 
 
 class LDAPConnectionTestCase(unittest.TestCase):
-    '''
-    Test LDAPConnection module.
-    '''
+    'Test LDAPConnection module'
 
     def setUp(self):
         trytond.tests.test_tryton.install_module('ldap_connection')
 
     def test0005views(self):
-        '''
-        Test views.
-        '''
+        'Test views'
         test_view('ldap_connection')
 
     def test0006depends(self):
-        '''
-        Test depends.
-        '''
+        'Test depends'
         test_depends()
 
 
@@ -40,6 +25,3 @@ def suite():
     suite.addTests(unittest.TestLoader().loadTestsFromTestCase(
         LDAPConnectionTestCase))
     return suite
-
-if __name__ == '__main__':
-    unittest.TextTestRunner(verbosity=2).run(suite())
diff --git a/tryton.cfg b/tryton.cfg
index 7b48603..88e6acd 100644
--- a/tryton.cfg
+++ b/tryton.cfg
@@ -1,5 +1,5 @@
 [tryton]
-version=3.0.0
+version=3.2.0
 depends:
     ir
     res
diff --git a/trytond_ldap_connection.egg-info/PKG-INFO b/trytond_ldap_connection.egg-info/PKG-INFO
index 1806706..f3ff3d1 100644
--- a/trytond_ldap_connection.egg-info/PKG-INFO
+++ b/trytond_ldap_connection.egg-info/PKG-INFO
@@ -1,12 +1,12 @@
 Metadata-Version: 1.1
 Name: trytond-ldap-connection
-Version: 3.0.0
+Version: 3.2.0
 Summary: Tryton module to add LDAP connection
 Home-page: http://www.tryton.org/
 Author: Tryton
-Author-email: UNKNOWN
+Author-email: issue_tracker at tryton.org
 License: GPL-3
-Download-URL: http://downloads.tryton.org/3.0/
+Download-URL: http://downloads.tryton.org/3.2/
 Description: trytond_ldap_connection
         =======================
         
@@ -43,6 +43,7 @@ Description: trytond_ldap_connection
         
           http://www.tryton.org/
         
+Keywords: tryton ldap connection
 Platform: UNKNOWN
 Classifier: Development Status :: 5 - Production/Stable
 Classifier: Environment :: Plugins
@@ -62,7 +63,6 @@ Classifier: Natural Language :: Russian
 Classifier: Natural Language :: Slovenian
 Classifier: Natural Language :: Spanish
 Classifier: Operating System :: OS Independent
-Classifier: Programming Language :: Python :: 2.6
 Classifier: Programming Language :: Python :: 2.7
 Classifier: Topic :: Office/Business
 Classifier: Topic :: System :: Systems Administration :: Authentication/Directory :: LDAP
diff --git a/trytond_ldap_connection.egg-info/requires.txt b/trytond_ldap_connection.egg-info/requires.txt
index a428f45..efbc36c 100644
--- a/trytond_ldap_connection.egg-info/requires.txt
+++ b/trytond_ldap_connection.egg-info/requires.txt
@@ -1,2 +1,2 @@
 python-ldap
-trytond >= 3.0, < 3.1
\ No newline at end of file
+trytond >= 3.2, < 3.3
\ No newline at end of file
diff --git a/view/connection_form.xml b/view/connection_form.xml
index bb5fa0c..556f63e 100644
--- a/view/connection_form.xml
+++ b/view/connection_form.xml
@@ -11,7 +11,7 @@ this repository contains the full copyright notices and license terms. -->
     <label name="bind_dn"/>
     <field name="bind_dn"/>
     <label name="bind_pass"/>
-    <field name="bind_pass" widget="sha"/>
+    <field name="bind_pass" widget="password"/>
     <label name="active_directory"/>
     <field name="active_directory"/>
     <group colspan="6" id="buttons">
-- 
tryton-modules-ldap-connection



More information about the tryton-debian-vcs mailing list