Remove uses of logilab.common.compat.{all,any}
authorRémi Cardona <remi.cardona@logilab.fr>
Thu, 17 Jul 2014 11:08:56 +0200
changeset 9892 928732ec00dd
parent 9891 3386fd89c914
child 9897 fa44db7da2dc
Remove uses of logilab.common.compat.{all,any} They're just aliases to the builtin ones on python 2.5+. If anyone needs convincing: >>> from logilab.common import compat >>> compat.any <built-in function any> >>> compat.all <built-in function all>
entities/wfobjs.py
hooks/email.py
predicates.py
schema.py
server/querier.py
server/rqlannotation.py
server/sources/native.py
toolsutils.py
web/facet.py
web/test/unittest_form.py
web/test/unittest_views_editforms.py
web/views/forms.py
web/views/uicfg.py
--- a/entities/wfobjs.py	Wed Jul 09 15:44:09 2014 +0200
+++ b/entities/wfobjs.py	Thu Jul 17 11:08:56 2014 +0200
@@ -27,7 +27,6 @@
 
 from logilab.common.decorators import cached, clear_cache
 from logilab.common.deprecation import deprecated
-from logilab.common.compat import any
 
 from cubicweb.entities import AnyEntity, fetch_config
 from cubicweb.view import EntityAdapter
--- a/hooks/email.py	Wed Jul 09 15:44:09 2014 +0200
+++ b/hooks/email.py	Thu Jul 17 11:08:56 2014 +0200
@@ -21,8 +21,6 @@
 
 from cubicweb.server import hook
 
-from logilab.common.compat import any
-
 
 class SetUseEmailRelationOp(hook.Operation):
     """delay this operation to commit to avoid conflict with a late rql query
--- a/predicates.py	Wed Jul 09 15:44:09 2014 +0200
+++ b/predicates.py	Thu Jul 17 11:08:56 2014 +0200
@@ -188,7 +188,6 @@
 from warnings import warn
 from operator import eq
 
-from logilab.common.compat import all, any
 from logilab.common.interface import implements as implements_iface
 from logilab.common.registry import Predicate, objectify_predicate, yes
 
--- a/schema.py	Wed Jul 09 15:44:09 2014 +0200
+++ b/schema.py	Thu Jul 17 11:08:56 2014 +0200
@@ -31,7 +31,6 @@
 from logilab.common.deprecation import deprecated, class_moved, moved
 from logilab.common.textutils import splitstrip
 from logilab.common.graph import get_cycles
-from logilab.common.compat import any
 
 from yams import BadSchemaDefinition, buildobjs as ybo
 from yams.schema import Schema, ERSchema, EntitySchema, RelationSchema, \
--- a/server/querier.py	Wed Jul 09 15:44:09 2014 +0200
+++ b/server/querier.py	Thu Jul 17 11:08:56 2014 +0200
@@ -22,7 +22,6 @@
 
 from itertools import repeat
 
-from logilab.common.compat import any
 from rql import RQLSyntaxError, CoercionError
 from rql.stmts import Union
 from rql.nodes import ETYPE_PYOBJ_MAP, etype_from_pyobj, Relation, Exists, Not
--- a/server/rqlannotation.py	Wed Jul 09 15:44:09 2014 +0200
+++ b/server/rqlannotation.py	Thu Jul 17 11:08:56 2014 +0200
@@ -21,8 +21,6 @@
 
 __docformat__ = "restructuredtext en"
 
-from logilab.common.compat import any
-
 from rql import BadRQLQuery
 from rql.nodes import Relation, VariableRef, Constant, Variable, Or, Exists
 from rql.utils import common_parent
--- a/server/sources/native.py	Wed Jul 09 15:44:09 2014 +0200
+++ b/server/sources/native.py	Thu Jul 17 11:08:56 2014 +0200
@@ -42,7 +42,6 @@
 import logging
 import sys
 
-from logilab.common.compat import any
 from logilab.common.decorators import cached, clear_cache
 from logilab.common.configuration import Method
 from logilab.common.shellutils import getlogin
--- a/toolsutils.py	Wed Jul 09 15:44:09 2014 +0200
+++ b/toolsutils.py	Thu Jul 17 11:08:56 2014 +0200
@@ -38,7 +38,6 @@
         raise NotImplementedError
 
 from logilab.common.clcommands import Command as BaseCommand
-from logilab.common.compat import any
 from logilab.common.shellutils import ASK
 
 from cubicweb import warning # pylint: disable=E0611
--- a/web/facet.py	Wed Jul 09 15:44:09 2014 +0200
+++ b/web/facet.py	Thu Jul 17 11:08:56 2014 +0200
@@ -61,7 +61,6 @@
 from logilab.common.graph import has_path
 from logilab.common.decorators import cached, cachedproperty
 from logilab.common.date import datetime2ticks, ustrftime, ticks2datetime
-from logilab.common.compat import all
 from logilab.common.deprecation import deprecated
 from logilab.common.registry import yes
 
--- a/web/test/unittest_form.py	Wed Jul 09 15:44:09 2014 +0200
+++ b/web/test/unittest_form.py	Thu Jul 17 11:08:56 2014 +0200
@@ -19,7 +19,6 @@
 from xml.etree.ElementTree import fromstring
 
 from logilab.common.testlib import unittest_main, mock_object
-from logilab.common.compat import any
 
 from cubicweb import Binary, ValidationError
 from cubicweb.devtools.testlib import CubicWebTC
--- a/web/test/unittest_views_editforms.py	Wed Jul 09 15:44:09 2014 +0200
+++ b/web/test/unittest_views_editforms.py	Thu Jul 17 11:08:56 2014 +0200
@@ -19,7 +19,6 @@
 
 """
 from logilab.common.testlib import unittest_main, mock_object
-from logilab.common.compat import any
 
 from cubicweb.devtools.testlib import CubicWebTC
 from cubicweb.web.views import uicfg
--- a/web/views/forms.py	Wed Jul 09 15:44:09 2014 +0200
+++ b/web/views/forms.py	Thu Jul 17 11:08:56 2014 +0200
@@ -48,7 +48,6 @@
 
 from logilab.common import dictattr, tempattr
 from logilab.common.decorators import iclassmethod, cached
-from logilab.common.compat import any
 from logilab.common.textutils import splitstrip
 from logilab.common.deprecation import deprecated
 
--- a/web/views/uicfg.py	Wed Jul 09 15:44:09 2014 +0200
+++ b/web/views/uicfg.py	Thu Jul 17 11:08:56 2014 +0200
@@ -57,8 +57,6 @@
 
 from warnings import warn
 
-from logilab.common.compat import any
-
 from cubicweb import neg_role
 from cubicweb.rtags import (RelationTags, RelationTagsBool, RelationTagsSet,
                             RelationTagsDict, NoTargetRelationTagsDict,