[Python-modules-commits] [logilab-common] 01/04: Import logilab-common_1.2.2.orig.tar.gz

Sandro Tosi morph at moszumanska.debian.org
Mon Jul 18 18:23:26 UTC 2016


This is an automated email from the git hooks/post-receive script.

morph pushed a commit to branch master
in repository logilab-common.

commit 17cc71e2bf3831698799d95c5ee67f80a4076e9e
Author: Sandro Tosi <morph at debian.org>
Date:   Mon Jul 18 19:16:14 2016 +0100

    Import logilab-common_1.2.2.orig.tar.gz
---
 PKG-INFO                         |  2 +-
 __pkginfo__.py                   |  2 +-
 logilab/common/configuration.py  |  4 ++--
 logilab/common/pytest.py         |  4 ++++
 logilab/common/registry.py       | 21 +++++++++++++--------
 logilab_common.egg-info/PKG-INFO |  2 +-
 6 files changed, 22 insertions(+), 13 deletions(-)

diff --git a/PKG-INFO b/PKG-INFO
index 16aeabc..cda2328 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: logilab-common
-Version: 1.2.1
+Version: 1.2.2
 Summary: collection of low-level Python packages and modules used by Logilab projects
 Home-page: http://www.logilab.org/project/logilab-common
 Author: Logilab
diff --git a/__pkginfo__.py b/__pkginfo__.py
index 5d8621c..bd1dfcc 100644
--- a/__pkginfo__.py
+++ b/__pkginfo__.py
@@ -25,7 +25,7 @@ modname = 'common'
 subpackage_of = 'logilab'
 subpackage_master = True
 
-numversion = (1, 2, 1)
+numversion = (1, 2, 2)
 version = '.'.join([str(num) for num in numversion])
 
 license = 'LGPL' # 2.1 or later
diff --git a/logilab/common/configuration.py b/logilab/common/configuration.py
index b7f364b..bdea905 100644
--- a/logilab/common/configuration.py
+++ b/logilab/common/configuration.py
@@ -122,7 +122,7 @@ from os.path import exists, expanduser
 from copy import copy
 from warnings import warn
 
-from six import string_types
+from six import integer_types, string_types
 from six.moves import range, configparser as cp, input
 
 from logilab.common.compat import str_encode as _encode
@@ -372,7 +372,7 @@ def format_option_value(optdict, value):
         value = value and 'yes' or 'no'
     elif isinstance(value, string_types) and value.isspace():
         value = "'%s'" % value
-    elif optdict.get('type') == 'time' and isinstance(value, (float, int, long)):
+    elif optdict.get('type') == 'time' and isinstance(value, (float, ) + integer_types):
         value = format_time(value)
     elif optdict.get('type') == 'bytes' and hasattr(value, '__int__'):
         value = format_bytes(value)
diff --git a/logilab/common/pytest.py b/logilab/common/pytest.py
index 11647b7..f5fb8ff 100644
--- a/logilab/common/pytest.py
+++ b/logilab/common/pytest.py
@@ -1296,3 +1296,7 @@ else:
     unittest.FunctionTestCase.__bases__ = (testlib.TestCase,)
 unittest.TestSuite.run = _ts_run
 unittest.TestSuite._wrapped_run = _ts_wrapped_run
+
+if __name__ == '__main__':
+    run()
+
diff --git a/logilab/common/registry.py b/logilab/common/registry.py
index f337efe..35b8eb7 100644
--- a/logilab/common/registry.py
+++ b/logilab/common/registry.py
@@ -58,8 +58,11 @@ You'll eventually find one concrete predicate: :class:`yes`
 Predicates
 ----------
 .. autoclass:: Predicate
-.. autofunc:: objectify_predicate
+.. autofunction:: objectify_predicate
 .. autoclass:: yes
+.. autoclass:: AndPredicate
+.. autoclass:: OrPredicate
+.. autoclass:: NotPredicate
 
 Debugging
 ---------
@@ -237,15 +240,15 @@ class Registry(dict):
 
     Registration methods:
 
-    .. automethod: register
-    .. automethod: unregister
+    .. automethod:: register
+    .. automethod:: unregister
 
     Selection methods:
 
-    .. automethod: select
-    .. automethod: select_or_none
-    .. automethod: possible_objects
-    .. automethod: object_by_id
+    .. automethod:: select
+    .. automethod:: select_or_none
+    .. automethod:: possible_objects
+    .. automethod:: object_by_id
     """
     def __init__(self, debugmode):
         super(Registry, self).__init__()
@@ -487,7 +490,7 @@ class RegistryStore(dict):
     :meth:`register_objects` method, given a list of directories to
     inspect for python modules.
 
-    .. automethod: register_objects
+    .. automethod:: register_objects
 
     For each module, by default, all compatible objects are registered
     automatically. However if some objects come as replacement of
@@ -734,6 +737,8 @@ class RegistryStore(dict):
         # module
         self._lastmodifs[filepath] = mdate
         # load the module
+        if sys.version_info < (3,) and not isinstance(modname, str):
+            modname = str(modname)
         module = __import__(modname, fromlist=modname.split('.')[:-1])
         self.load_module(module)
 
diff --git a/logilab_common.egg-info/PKG-INFO b/logilab_common.egg-info/PKG-INFO
index 16aeabc..cda2328 100644
--- a/logilab_common.egg-info/PKG-INFO
+++ b/logilab_common.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: logilab-common
-Version: 1.2.1
+Version: 1.2.2
 Summary: collection of low-level Python packages and modules used by Logilab projects
 Home-page: http://www.logilab.org/project/logilab-common
 Author: Logilab

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/logilab-common.git



More information about the Python-modules-commits mailing list