--- a/devtools/__init__.py Tue Dec 22 15:35:10 2015 +0100
+++ b/devtools/__init__.py Fri Dec 18 09:36:58 2015 +0100
@@ -30,9 +30,9 @@
import warnings
import tempfile
import getpass
-from hashlib import sha1 # pylint: disable=E0611
+from hashlib import sha1 # pylint: disable=E0611
from datetime import timedelta
-from os.path import (abspath, realpath, join, exists, split, isabs, isdir)
+from os.path import abspath, join, exists, split, isabs, isdir
from functools import partial
from six import text_type
--- a/server/sqlutils.py Tue Dec 22 15:35:10 2015 +0100
+++ b/server/sqlutils.py Fri Dec 18 09:36:58 2015 +0100
@@ -48,6 +48,7 @@
lgc.USE_MX_DATETIME = False
SQL_PREFIX = 'cw_'
+
def _run_command(cmd):
if isinstance(cmd, string_types):
print(cmd)
@@ -96,7 +97,7 @@
try:
# some dbapi modules doesn't accept unicode for sql string
execute(str(sql))
- except Exception as err:
+ except Exception:
if cnx:
cnx.rollback()
failed.append(sql)
--- a/server/test/unittest_querier.py Tue Dec 22 15:35:10 2015 +0100
+++ b/server/test/unittest_querier.py Fri Dec 18 09:36:58 2015 +0100
@@ -24,8 +24,9 @@
import pytz
from six import PY2, integer_types, binary_type, text_type
+
from logilab.common.testlib import TestCase, unittest_main
-from rql import BadRQLQuery, RQLSyntaxError
+from rql import BadRQLQuery
from cubicweb import QueryError, Unauthorized, Binary
from cubicweb.server.sqlutils import SQL_PREFIX
@@ -35,6 +36,7 @@
from cubicweb.devtools.testlib import CubicWebTC
from cubicweb.devtools.repotest import tuplify, BaseQuerierTC
+
class FixedOffset(tzinfo):
def __init__(self, hours=0):
self.hours = hours
--- a/web/views/forms.py Tue Dec 22 15:35:10 2015 +0100
+++ b/web/views/forms.py Fri Dec 18 09:36:58 2015 +0100
@@ -45,8 +45,6 @@
__docformat__ = "restructuredtext en"
-from warnings import warn
-
import time
import inspect
@@ -55,13 +53,11 @@
from logilab.common import dictattr, tempattr
from logilab.common.decorators import iclassmethod, cached
from logilab.common.textutils import splitstrip
-from logilab.common.deprecation import deprecated
from cubicweb import ValidationError, neg_role
-from cubicweb.utils import support_args
from cubicweb.predicates import non_final_entity, match_kwargs, one_line_rset
from cubicweb.web import RequestError, ProcessFormError
-from cubicweb.web import form, formwidgets as fwdgs
+from cubicweb.web import form
from cubicweb.web.views import uicfg
from cubicweb.web.formfields import guess_field
--- a/web/views/sessions.py Tue Dec 22 15:35:10 2015 +0100
+++ b/web/views/sessions.py Fri Dec 18 09:36:58 2015 +0100
@@ -1,4 +1,4 @@
-# copyright 2003-2014 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
+# copyright 2003-2015 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
# contact http://www.logilab.fr/ -- mailto:contact@logilab.fr
#
# This file is part of CubicWeb.
@@ -21,10 +21,9 @@
from time import time
from logging import getLogger
-from logilab.common.registry import RegistrableObject
+from logilab.common.registry import RegistrableObject, yes
-from cubicweb import RepositoryError, Unauthorized, BadConnectionId, set_log_methods
-from cubicweb.predicates import yes
+from cubicweb import RepositoryError, Unauthorized, set_log_methods
from cubicweb.web import InvalidSession
from cubicweb.web.views import authentication