Changeset: cec1b33a93f3 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=cec1b33a93f3
Modified Files:
        clients/python2/monetdb/control.py
        clients/python2/monetdb/sql/connections.py
        clients/python2/test/run.sh
        clients/python3/monetdb/mapi.py
        clients/python3/test/dbapi20.py
Branch: Feb2013
Log Message:

Fix some differences between Python2 and Python3 implementation.
- don't use backward compatible interfaces internally;
- files should end with a newline;
- fix some differences in white space.


diffs (63 lines):

diff --git a/clients/python2/monetdb/control.py 
b/clients/python2/monetdb/control.py
--- a/clients/python2/monetdb/control.py
+++ b/clients/python2/monetdb/control.py
@@ -29,7 +29,7 @@ class Control:
     lock, unlock, destroy your databases and request status information.
     """
     def __init__(self, hostname, port, passphrase):
-        self.server = mapi.Server()
+        self.server = mapi.Connection()
         self.server.connect(hostname, port, 'monetdb', passphrase, 
'merovingian', 'control')
 
     def _send_command(self, database_name, command):
@@ -141,4 +141,4 @@ class Control:
         return self.get("#defaults")
 
     def neighbours(self):
-        return self._send_command("anelosimus", "eximius")
\ No newline at end of file
+        return self._send_command("anelosimus", "eximius")
diff --git a/clients/python2/monetdb/sql/connections.py 
b/clients/python2/monetdb/sql/connections.py
--- a/clients/python2/monetdb/sql/connections.py
+++ b/clients/python2/monetdb/sql/connections.py
@@ -44,7 +44,7 @@ class Connection(object):
             username = user
         if host is not None:
             hostname = host
-        self.mapi = mapi.Server()
+        self.mapi = mapi.Connection()
         self.mapi.connect(hostname=hostname, port=int(port), username=username,
             password=password, database=database, language="sql")
         self.set_autocommit(autocommit)
diff --git a/clients/python2/test/run.sh b/clients/python2/test/run.sh
--- a/clients/python2/test/run.sh
+++ b/clients/python2/test/run.sh
@@ -7,4 +7,4 @@ export TSTPASSWORD="monetdb"
 export TSTDEBUG="no"
 
 nosetests ./runtests.py
-nosetests ./test_control.py
\ No newline at end of file
+nosetests ./test_control.py
diff --git a/clients/python3/monetdb/mapi.py b/clients/python3/monetdb/mapi.py
--- a/clients/python3/monetdb/mapi.py
+++ b/clients/python3/monetdb/mapi.py
@@ -265,7 +265,6 @@ class Connection(object):
         if self.socket:
             self.socket.close()
 
-
 #backwards compatiblity
 Server = Connection
 
diff --git a/clients/python3/test/dbapi20.py b/clients/python3/test/dbapi20.py
--- a/clients/python3/test/dbapi20.py
+++ b/clients/python3/test/dbapi20.py
@@ -878,6 +878,7 @@ class DatabaseAPI20Test(unittest.TestCas
         self.assertTrue(hasattr(self.driver,'ROWID'),
             'module.ROWID must be defined.'
             )
+
     def test_utf8(self):
         con = self._connect()
         try:
_______________________________________________
checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to