# HG changeset patch # User Pierre-Yves David # Date 1366891855 -7200 # Node ID 6a02be3044860aa6744fe8607111cdc7896a7b1e # Parent b747f2532e03732e4ef382d9d126c16ff5027d8f remove unused import pyflakes say they are unused. Tests suite confirms. diff -r b747f2532e03 -r 6a02be304486 appobject.py --- a/appobject.py Thu Apr 25 17:30:09 2013 +0200 +++ b/appobject.py Thu Apr 25 14:10:55 2013 +0200 @@ -34,7 +34,6 @@ from logging import getLogger from logilab.common.deprecation import deprecated, class_renamed -from logilab.common.decorators import classproperty from logilab.common.logging_ext import set_log_methods # first line imports for bw compat diff -r b747f2532e03 -r 6a02be304486 cwctl.py --- a/cwctl.py Thu Apr 25 17:30:09 2013 +0200 +++ b/cwctl.py Thu Apr 25 14:10:55 2013 +0200 @@ -836,7 +836,6 @@ name = 'versions' def versions_instance(self, appid): - from logilab.common.changelog import Version config = cwcfg.config_for(appid) # should not raise error if db versions don't match fs versions config.repairing = True diff -r b747f2532e03 -r 6a02be304486 cwvreg.py --- a/cwvreg.py Thu Apr 25 17:30:09 2013 +0200 +++ b/cwvreg.py Thu Apr 25 14:10:55 2013 +0200 @@ -197,14 +197,14 @@ from os.path import join, dirname, realpath from warnings import warn from datetime import datetime, date, time, timedelta -from functools import partial, reduce +from functools import reduce from logilab.common.decorators import cached, clear_cache from logilab.common.deprecation import deprecated, class_deprecated from logilab.common.modutils import cleanup_sys_modules from logilab.common.registry import ( RegistryStore, Registry, obj_registries, - ObjectNotFound, NoSelectableObject, RegistryNotFound) + ObjectNotFound, RegistryNotFound) from rql import RQLHelper from yams.constraints import BASE_CONVERTERS diff -r b747f2532e03 -r 6a02be304486 dataimport.py --- a/dataimport.py Thu Apr 25 17:30:09 2013 +0200 +++ b/dataimport.py Thu Apr 25 14:10:55 2013 +0200 @@ -75,7 +75,6 @@ import os.path as osp import inspect from collections import defaultdict -from contextlib import contextmanager from copy import copy from datetime import date, datetime from time import asctime diff -r b747f2532e03 -r 6a02be304486 devtools/__init__.py --- a/devtools/__init__.py Thu Apr 25 17:30:09 2013 +0200 +++ b/devtools/__init__.py Thu Apr 25 14:10:55 2013 +0200 @@ -28,15 +28,14 @@ import warnings from hashlib import sha1 # pylint: disable=E0611 from datetime import timedelta -from os.path import (abspath, join, exists, basename, dirname, normpath, split, - isfile, isabs, splitext, isdir, expanduser) +from os.path import (abspath, join, exists, split, isabs, isdir) from functools import partial from logilab.common.date import strptime from logilab.common.decorators import cached, clear_cache -from cubicweb import ConfigurationError, ExecutionError, BadConnectionId -from cubicweb import CW_SOFTWARE_ROOT, schema, cwconfig +from cubicweb import ExecutionError, BadConnectionId +from cubicweb import schema, cwconfig from cubicweb.server.serverconfig import ServerConfiguration from cubicweb.etwist.twconfig import TwistedConfiguration diff -r b747f2532e03 -r 6a02be304486 devtools/devctl.py --- a/devtools/devctl.py Thu Apr 25 17:30:09 2013 +0200 +++ b/devtools/devctl.py Thu Apr 25 14:10:55 2013 +0200 @@ -122,7 +122,6 @@ def _generate_schema_pot(w, vreg, schema, libconfig=None): - from copy import deepcopy from cubicweb.i18n import add_msg from cubicweb.schema import NO_I18NCONTEXT, CONSTRAINTS w('# schema pot file, generated on %s\n' diff -r b747f2532e03 -r 6a02be304486 devtools/fake.py --- a/devtools/fake.py Thu Apr 25 17:30:09 2013 +0200 +++ b/devtools/fake.py Thu Apr 25 14:10:55 2013 +0200 @@ -25,7 +25,6 @@ from cubicweb.req import RequestSessionBase from cubicweb.cwvreg import CWRegistryStore from cubicweb.web.request import CubicWebRequestBase -from cubicweb.web.http_headers import Headers from cubicweb.devtools import BASE_URL, BaseApptestConfiguration diff -r b747f2532e03 -r 6a02be304486 devtools/qunit.py --- a/devtools/qunit.py Thu Apr 25 17:30:09 2013 +0200 +++ b/devtools/qunit.py Thu Apr 25 14:10:55 2013 +0200 @@ -29,7 +29,6 @@ from logilab.common.shellutils import getlogin import cubicweb -from cubicweb.view import StartupView from cubicweb.web.controller import Controller from cubicweb.devtools.httptest import CubicWebServerTC diff -r b747f2532e03 -r 6a02be304486 devtools/test/unittest_dbfill.py --- a/devtools/test/unittest_dbfill.py Thu Apr 25 17:30:09 2013 +0200 +++ b/devtools/test/unittest_dbfill.py Thu Apr 25 14:10:55 2013 +0200 @@ -24,7 +24,6 @@ from logilab.common.testlib import TestCase, unittest_main -from cubicweb.schema import Schema, EntitySchema from cubicweb.devtools.fill import ValueGenerator, make_tel from cubicweb.devtools import ApptestConfiguration diff -r b747f2532e03 -r 6a02be304486 devtools/test/unittest_fill.py --- a/devtools/test/unittest_fill.py Thu Apr 25 17:30:09 2013 +0200 +++ b/devtools/test/unittest_fill.py Thu Apr 25 14:10:55 2013 +0200 @@ -18,12 +18,10 @@ """unit tests for cubicweb.devtools.fill module """ +import re from logilab.common.testlib import TestCase, unittest_main -from cubicweb.schema import Schema, EntitySchema - -import re from cubicweb.devtools.fill import ValueGenerator, _ValueGenerator ISODATE_SRE = re.compile('(?P\d{4})-(?P\d{2})-(?P\d{2})$') diff -r b747f2532e03 -r 6a02be304486 devtools/test/unittest_httptest.py --- a/devtools/test/unittest_httptest.py Thu Apr 25 17:30:09 2013 +0200 +++ b/devtools/test/unittest_httptest.py Thu Apr 25 14:10:55 2013 +0200 @@ -20,7 +20,7 @@ import httplib from logilab.common.testlib import Tags -from cubicweb.devtools.httptest import CubicWebServerTC, CubicWebServerConfig +from cubicweb.devtools.httptest import CubicWebServerTC class TwistedCWAnonTC(CubicWebServerTC): diff -r b747f2532e03 -r 6a02be304486 devtools/test/unittest_qunit.py --- a/devtools/test/unittest_qunit.py Thu Apr 25 17:30:09 2013 +0200 +++ b/devtools/test/unittest_qunit.py Thu Apr 25 14:10:55 2013 +0200 @@ -1,5 +1,5 @@ from logilab.common.testlib import unittest_main -from cubicweb.devtools.qunit import make_qunit_html, QUnitTestCase +from cubicweb.devtools.qunit import QUnitTestCase from os import path as osp diff -r b747f2532e03 -r 6a02be304486 devtools/testlib.py --- a/devtools/testlib.py Thu Apr 25 17:30:09 2013 +0200 +++ b/devtools/testlib.py Thu Apr 25 14:10:55 2013 +0200 @@ -18,7 +18,6 @@ """this module contains base classes and utilities for cubicweb tests""" __docformat__ = "restructuredtext en" -import os import sys import re import urlparse @@ -40,15 +39,14 @@ from logilab.common.deprecation import deprecated, class_deprecated from logilab.common.shellutils import getlogin -from cubicweb import ValidationError, NoSelectableObject, AuthenticationError +from cubicweb import ValidationError, NoSelectableObject from cubicweb import cwconfig, dbapi, devtools, web, server from cubicweb.utils import json from cubicweb.sobjects import notification from cubicweb.web import Redirect, application -from cubicweb.server.session import Session from cubicweb.server.hook import SendMailOp from cubicweb.devtools import SYSTEM_ENTITIES, SYSTEM_RELATIONS, VIEW_VALIDATORS -from cubicweb.devtools import BASE_URL, fake, htmlparser, DEFAULT_EMPTY_DB_ID +from cubicweb.devtools import fake, htmlparser, DEFAULT_EMPTY_DB_ID from cubicweb.utils import json # low-level utilities ########################################################## diff -r b747f2532e03 -r 6a02be304486 doc/book/en/conf.py --- a/doc/book/en/conf.py Thu Apr 25 17:30:09 2013 +0200 +++ b/doc/book/en/conf.py Thu Apr 25 14:10:55 2013 +0200 @@ -31,7 +31,6 @@ # All configuration values have a default value; values that are commented out # serve to show the default value. -import sys, os from os import path as osp path = __file__ diff -r b747f2532e03 -r 6a02be304486 doc/tools/generate_modules.py --- a/doc/tools/generate_modules.py Thu Apr 25 17:30:09 2013 +0200 +++ b/doc/tools/generate_modules.py Thu Apr 25 14:10:55 2013 +0200 @@ -19,8 +19,6 @@ """ -import sys - EXCLUDE_DIRS = ('test', 'tests', 'examples', 'data', 'doc', 'dist', '.hg', 'migration') if __name__ == '__main__': diff -r b747f2532e03 -r 6a02be304486 doc/tutorials/dataimport/schema.py --- a/doc/tutorials/dataimport/schema.py Thu Apr 25 17:30:09 2013 +0200 +++ b/doc/tutorials/dataimport/schema.py Thu Apr 25 14:10:55 2013 +0200 @@ -18,7 +18,6 @@ """cubicweb-diseasome schema""" from yams.buildobjs import EntityType, SubjectRelation, String, Int -from cubicweb.schemas.base import ExternalUri class Disease(EntityType): diff -r b747f2532e03 -r 6a02be304486 entities/__init__.py --- a/entities/__init__.py Thu Apr 25 17:30:09 2013 +0200 +++ b/entities/__init__.py Thu Apr 25 14:10:55 2013 +0200 @@ -19,10 +19,8 @@ __docformat__ = "restructuredtext en" -from warnings import warn -from logilab.common.deprecation import deprecated -from logilab.common.decorators import cached, classproperty +from logilab.common.decorators import classproperty from cubicweb import Unauthorized from cubicweb.entity import Entity diff -r b747f2532e03 -r 6a02be304486 entities/adapters.py --- a/entities/adapters.py Thu Apr 25 17:30:09 2013 +0200 +++ b/entities/adapters.py Thu Apr 25 14:10:55 2013 +0200 @@ -26,12 +26,11 @@ from logilab.mtconverter import TransformError from logilab.common.decorators import cached -from logilab.common.deprecation import class_deprecated from cubicweb import ValidationError, view from cubicweb.predicates import (implements, is_instance, relation_possible, match_exception) -from cubicweb.interfaces import IDownloadable, ITree, IProgress, IMileStone +from cubicweb.interfaces import IDownloadable, ITree class IEmailableAdapter(view.EntityAdapter): diff -r b747f2532e03 -r 6a02be304486 entities/lib.py --- a/entities/lib.py Thu Apr 25 17:30:09 2013 +0200 +++ b/entities/lib.py Thu Apr 25 14:10:55 2013 +0200 @@ -23,8 +23,6 @@ from urlparse import urlsplit, urlunsplit from datetime import datetime -from logilab.common.deprecation import deprecated - from cubicweb import UnknownProperty from cubicweb.entity import _marker from cubicweb.entities import AnyEntity, fetch_config diff -r b747f2532e03 -r 6a02be304486 entities/sources.py --- a/entities/sources.py Thu Apr 25 17:30:09 2013 +0200 +++ b/entities/sources.py Thu Apr 25 14:10:55 2013 +0200 @@ -27,7 +27,6 @@ from logilab.common.configuration import OptionError from logilab.mtconverter import xml_escape -from cubicweb import ValidationError from cubicweb.entities import AnyEntity, fetch_config class _CWSourceCfgMixIn(object): diff -r b747f2532e03 -r 6a02be304486 entities/test/unittest_base.py --- a/entities/test/unittest_base.py Thu Apr 25 17:30:09 2013 +0200 +++ b/entities/test/unittest_base.py Thu Apr 25 14:10:55 2013 +0200 @@ -25,7 +25,6 @@ from cubicweb.devtools.testlib import CubicWebTC -from cubicweb import ValidationError from cubicweb.interfaces import IMileStone, ICalendarable from cubicweb.entities import AnyEntity diff -r b747f2532e03 -r 6a02be304486 entities/wfobjs.py --- a/entities/wfobjs.py Thu Apr 25 17:30:09 2013 +0200 +++ b/entities/wfobjs.py Thu Apr 25 14:10:55 2013 +0200 @@ -24,7 +24,6 @@ __docformat__ = "restructuredtext en" -from warnings import warn from logilab.common.decorators import cached, clear_cache from logilab.common.deprecation import deprecated diff -r b747f2532e03 -r 6a02be304486 entity.py --- a/entity.py Thu Apr 25 17:30:09 2013 +0200 +++ b/entity.py Thu Apr 25 14:10:55 2013 +0200 @@ -26,7 +26,7 @@ from logilab.common.decorators import cached from logilab.common.deprecation import deprecated from logilab.common.registry import yes -from logilab.mtconverter import TransformData, TransformError, xml_escape +from logilab.mtconverter import TransformData, xml_escape from rql.utils import rqlvar_maker from rql.stmts import Select diff -r b747f2532e03 -r 6a02be304486 etwist/http.py --- a/etwist/http.py Thu Apr 25 17:30:09 2013 +0200 +++ b/etwist/http.py Thu Apr 25 14:10:55 2013 +0200 @@ -8,8 +8,6 @@ __docformat__ = "restructuredtext en" -from cubicweb.web.http_headers import Headers - class HTTPResponse(object): """An object representing an HTTP Response to be sent to the client. """ diff -r b747f2532e03 -r 6a02be304486 etwist/request.py --- a/etwist/request.py Thu Apr 25 17:30:09 2013 +0200 +++ b/etwist/request.py Thu Apr 25 14:10:55 2013 +0200 @@ -19,14 +19,8 @@ __docformat__ = "restructuredtext en" -from datetime import datetime -from twisted.web import http - -from cubicweb.web import DirectResponse from cubicweb.web.request import CubicWebRequestBase -from cubicweb.web.httpcache import GMTOFFSET -from cubicweb.web.http_headers import Headers class CubicWebTwistedRequestAdapter(CubicWebRequestBase): diff -r b747f2532e03 -r 6a02be304486 etwist/server.py --- a/etwist/server.py Thu Apr 25 17:30:09 2013 +0200 +++ b/etwist/server.py Thu Apr 25 14:10:55 2013 +0200 @@ -19,35 +19,25 @@ __docformat__ = "restructuredtext en" import sys -import os -import os.path as osp import select import traceback import threading -import re -from hashlib import md5 # pylint: disable=E0611 -from os.path import join -from time import mktime -from datetime import date, timedelta from urlparse import urlsplit, urlunsplit from cgi import FieldStorage, parse_header from twisted.internet import reactor, task, threads -from twisted.internet.defer import maybeDeferred from twisted.web import http, server -from twisted.web import static, resource +from twisted.web import resource from twisted.web.server import NOT_DONE_YET from logilab.mtconverter import xml_escape from logilab.common.decorators import monkeypatch -from cubicweb import (AuthenticationError, ConfigurationError, - CW_EVENT_MANAGER, CubicWebException) +from cubicweb import ConfigurationError, CW_EVENT_MANAGER from cubicweb.utils import json_dumps from cubicweb.web import DirectResponse from cubicweb.web.application import CubicWebPublisher -from cubicweb.web.http_headers import generateDateTime from cubicweb.etwist.request import CubicWebTwistedRequestAdapter from cubicweb.etwist.http import HTTPResponse