rename logilab.db into logilab.database
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Tue, 09 Mar 2010 11:54:27 +0100
changeset 4848 41f84eea63c9
parent 4847 9466604ef448
child 4849 3827b9ee77ac
rename logilab.db into logilab.database
cwconfig.py
devtools/fake.py
entity.py
server/__init__.py
server/serverctl.py
server/sources/native.py
server/sqlutils.py
server/test/data/site_cubicweb.py
server/test/unittest_querier.py
server/test/unittest_rql2sql.py
--- a/cwconfig.py	Tue Mar 09 11:42:06 2010 +0100
+++ b/cwconfig.py	Tue Mar 09 11:54:27 2010 +0100
@@ -998,7 +998,7 @@
 
 _EXT_REGISTERED = False
 def register_stored_procedures():
-    from logilab.db import FunctionDescr
+    from logilab.database import FunctionDescr
     from rql.utils import register_function, iter_funcnode_variables
 
     global _EXT_REGISTERED
--- a/devtools/fake.py	Tue Mar 09 11:42:06 2010 +0100
+++ b/devtools/fake.py	Tue Mar 09 11:54:27 2010 +0100
@@ -7,7 +7,7 @@
 """
 __docformat__ = "restructuredtext en"
 
-from logilab.db import get_db_helper
+from logilab.database import get_db_helper
 
 from cubicweb.req import RequestSessionBase
 from cubicweb.cwvreg import CubicWebVRegistry
--- a/entity.py	Tue Mar 09 11:42:06 2010 +0100
+++ b/entity.py	Tue Mar 09 11:54:27 2010 +0100
@@ -883,12 +883,12 @@
         """used by the full text indexer to get words to index
 
         this method should only be used on the repository side since it depends
-        on the logilab.db package
+        on the logilab.database package
 
         :rtype: list
         :return: the list of indexable word of this entity
         """
-        from logilab.db.fti import tokenize
+        from logilab.database.fti import tokenize
         # take care to cases where we're modyfying the schema
         pending = self._cw.transaction_data.setdefault('pendingrdefs', set())
         words = []
--- a/server/__init__.py	Tue Mar 09 11:42:06 2010 +0100
+++ b/server/__init__.py	Tue Mar 09 11:54:27 2010 +0100
@@ -234,7 +234,7 @@
 
 
 # sqlite'stored procedures have to be registered at connection opening time
-from logilab.db import SQL_CONNECT_HOOKS
+from logilab.database import SQL_CONNECT_HOOKS
 
 # add to this set relations which should have their add security checking done
 # *BEFORE* adding the actual relation (done after by default)
--- a/server/serverctl.py	Tue Mar 09 11:42:06 2010 +0100
+++ b/server/serverctl.py	Tue Mar 09 11:54:27 2010 +0100
@@ -70,7 +70,7 @@
         cnx.logged_user = user
     except AttributeError:
         # C object, __slots__
-        from logilab.db import _SimpleConnectionWrapper
+        from logilab.database import _SimpleConnectionWrapper
         cnx = _SimpleConnectionWrapper(cnx)
         cnx.logged_user = user
     return cnx
@@ -83,7 +83,7 @@
     create/drop the instance database)
     """
     if dbms_system_base:
-        from logilab.db import get_db_helper
+        from logilab.database import get_db_helper
         system_db = get_db_helper(source['db-driver']).system_database()
         return source_cnx(source, system_db, special_privs=special_privs, verbose=verbose)
     return source_cnx(source, special_privs=special_privs, verbose=verbose)
@@ -93,7 +93,7 @@
     or a database
     """
     import logilab.common as lgp
-    from logilab.db import get_db_helper
+    from logilab.database import get_db_helper
     lgp.USE_MX_DATETIME = False
     special_privs = ''
     driver = source['db-driver']
@@ -210,7 +210,7 @@
 
     def cleanup(self):
         """remove instance's configuration and database"""
-        from logilab.db import get_db_helper
+        from logilab.database import get_db_helper
         source = self.config.sources()['system']
         dbname = source['db-name']
         helper = get_db_helper(source['db-driver'])
@@ -293,7 +293,7 @@
         )
     def run(self, args):
         """run the command with its specific arguments"""
-        from logilab.db import get_db_helper
+        from logilab.database import get_db_helper
         verbose = self.get('verbose')
         automatic = self.get('automatic')
         appid = pop_arg(args, msg='No instance specified !')
--- a/server/sources/native.py	Tue Mar 09 11:42:06 2010 +0100
+++ b/server/sources/native.py	Tue Mar 09 11:54:27 2010 +0100
@@ -22,7 +22,7 @@
 from logilab.common.decorators import cached, clear_cache
 from logilab.common.configuration import Method
 from logilab.common.shellutils import getlogin
-from logilab.db import get_db_helper
+from logilab.database import get_db_helper
 
 from cubicweb import UnknownEid, AuthenticationError, Binary, server
 from cubicweb.cwconfig import CubicWebNoAppConfiguration
--- a/server/sqlutils.py	Tue Mar 09 11:42:06 2010 +0100
+++ b/server/sqlutils.py	Tue Mar 09 11:54:27 2010 +0100
@@ -14,7 +14,7 @@
 from logilab import db, common as lgc
 from logilab.common.shellutils import ProgressBar
 from logilab.common.date import todate, todatetime
-from logilab.db.sqlgen import SQLGenerator
+from logilab.database.sqlgen import SQLGenerator
 
 from cubicweb import Binary, ConfigurationError
 from cubicweb.uilib import remove_html_tags
--- a/server/test/data/site_cubicweb.py	Tue Mar 09 11:42:06 2010 +0100
+++ b/server/test/data/site_cubicweb.py	Tue Mar 09 11:54:27 2010 +0100
@@ -6,8 +6,8 @@
 :license: GNU Lesser General Public License, v2.1 - http://www.gnu.org/licenses
 """
 
-from logilab.db import FunctionDescr
-from logilab.db.sqlite import register_sqlite_pyfunc
+from logilab.database import FunctionDescr
+from logilab.database.sqlite import register_sqlite_pyfunc
 from rql.utils import register_function
 
 try:
--- a/server/test/unittest_querier.py	Tue Mar 09 11:42:06 2010 +0100
+++ b/server/test/unittest_querier.py	Tue Mar 09 11:54:27 2010 +0100
@@ -35,7 +35,7 @@
 SQL_CONNECT_HOOKS['sqlite'].append(init_sqlite_connexion)
 
 
-from logilab.db import _GenericAdvFuncHelper
+from logilab.database import _GenericAdvFuncHelper
 TYPEMAP = _GenericAdvFuncHelper.TYPE_MAPPING
 
 class MakeSchemaTC(TestCase):
--- a/server/test/unittest_rql2sql.py	Tue Mar 09 11:42:06 2010 +0100
+++ b/server/test/unittest_rql2sql.py	Tue Mar 09 11:54:27 2010 +0100
@@ -1071,7 +1071,7 @@
 WHERE rel_is0.eid_to=2'''),
 
     ]
-from logilab.db import get_db_helper
+from logilab.database import get_db_helper
 
 class CWRQLTC(RQLGeneratorTC):
     schema = schema