# HG changeset patch # User Alexandre Fayolle # Date 1261476427 -3600 # Node ID 0441165c7e59d6e97341127b0446c0ed9804030b # Parent f0ab2b6d3553f0f865313d94b7ce388d9748828a# Parent 92a10d2a09af897c1efb25cc6720feeccc0a2a05 merge diff -r 92a10d2a09af -r 0441165c7e59 debian/control --- a/debian/control Tue Dec 22 10:42:51 2009 +0100 +++ b/debian/control Tue Dec 22 11:07:07 2009 +0100 @@ -77,7 +77,7 @@ Package: cubicweb-common Architecture: all XB-Python-Version: ${python:Versions} -Depends: ${python:Depends}, graphviz, gettext, python-logilab-mtconverter (>= 0.6.0), python-logilab-common (>= 0.45.2), python-yams (>= 0.25.0), python-rql (>= 0.22.3), python-lxml +Depends: ${python:Depends}, graphviz, gettext, python-logilab-mtconverter (>= 0.6.0), python-logilab-common (>= 0.46.0), python-yams (>= 0.25.0), python-rql (>= 0.22.3), python-lxml Recommends: python-simpletal (>= 4.0) Conflicts: cubicweb-core Replaces: cubicweb-core diff -r 92a10d2a09af -r 0441165c7e59 server/serverctl.py --- a/server/serverctl.py Tue Dec 22 10:42:51 2009 +0100 +++ b/server/serverctl.py Tue Dec 22 11:07:07 2009 +0100 @@ -57,7 +57,8 @@ else: password = getpass('password: ') return get_connection(driver, dbhost, dbname, user, password=password, - port=source.get('db-port')) + port=source.get('db-port'), + extra_args=source.get('db-extra-arguments')) def system_source_cnx(source, dbms_system_base=False, special_privs='CREATE/DROP DATABASE', verbose=True): @@ -368,7 +369,8 @@ get_connection( system['db-driver'], database=system['db-name'], host=system.get('db-host'), port=system.get('db-port'), - user=system.get('db-user'), password=system.get('db-password')) + user=system.get('db-user'), password=system.get('db-password'), + extra_args=system.get('db-extra-arguments')) except Exception, ex: raise ConfigurationError( 'You seem to have provided wrong connection information in '\ diff -r 92a10d2a09af -r 0441165c7e59 server/sqlutils.py --- a/server/sqlutils.py Tue Dec 22 10:42:51 2009 +0100 +++ b/server/sqlutils.py Tue Dec 22 11:07:07 2009 +0100 @@ -144,6 +144,7 @@ self.dbpasswd = source_config.get('db-password') self.encoding = source_config.get('db-encoding', 'UTF-8') self.dbapi_module = db.get_dbapi_compliant_module(self.dbdriver) + self.dbdriver_extra_args = source_config.get('db-extra-arguments') self.binary = self.dbapi_module.Binary self.dbhelper = self.dbapi_module.adv_func_helper self.sqlgen = SQLGenerator() @@ -159,7 +160,8 @@ cnx = self.dbapi_module.connect(self.dbhost, self.dbname, user or self.dbuser, password or self.dbpasswd, - port=self.dbport) + port=self.dbport, + extra_args=self.dbdriver_extra_args) init_cnx(self.dbdriver, cnx) #self.dbapi_module.type_code_test(cnx.cursor()) return cnx @@ -241,6 +243,7 @@ value = value.getvalue() else: value = crypt_password(value) + value = self.binary(value) # XXX needed for sqlite but I don't think it is for other backends elif atype == 'Datetime' and isinstance(value, date): value = todatetime(value)