Author: phd
Date: 2009-01-13 10:08:23 -0700 (Tue, 13 Jan 2009)
New Revision: 3770
Modified:
SQLObject/trunk/sqlobject/dbconnection.py
SQLObject/trunk/sqlobject/firebird/__init__.py
SQLObject/trunk/sqlobject/maxdb/__init__.py
SQLObject/trunk/sqlobject/mssql/__init__.py
SQLObject/trunk/sqlobject/mysql/__init__.py
SQLObject/trunk/sqlobject/postgres/__init__.py
SQLObject/trunk/sqlobject/sqlite/__init__.py
SQLObject/trunk/sqlobject/sybase/__init__.py
Log:
Removed unused isSupported.
Modified: SQLObject/trunk/sqlobject/dbconnection.py
===================================================================
--- SQLObject/trunk/sqlobject/dbconnection.py 2009-01-13 16:36:15 UTC (rev 3769)
+++ SQLObject/trunk/sqlobject/dbconnection.py 2009-01-13 17:08:23 UTC (rev 3770)
@@ -100,10 +100,6 @@
db = path[1:]
return uri + db
- def isSupported(cls):
- raise NotImplemented
- isSupported = classmethod(isSupported)
-
def connectionFromURI(cls, uri):
raise NotImplemented
connectionFromURI = classmethod(connectionFromURI)
@@ -899,17 +895,15 @@
def __init__(self):
self.schemeBuilders = {}
- self.schemeSupported = {}
self.instanceNames = {}
self.cachedURIs = {}
- def registerConnection(self, schemes, builder, isSupported):
+ def registerConnection(self, schemes, builder):
for uriScheme in schemes:
assert not self.schemeBuilders.has_key(uriScheme) \
or self.schemeBuilders[uriScheme] is builder, \
"A driver has already been registered for the URI scheme %s" % uriScheme
self.schemeBuilders[uriScheme] = builder
- self.schemeSupported = isSupported
def registerConnectionInstance(self, inst):
if inst.name:
Modified: SQLObject/trunk/sqlobject/firebird/__init__.py
===================================================================
--- SQLObject/trunk/sqlobject/firebird/__init__.py 2009-01-13 16:36:15 UTC (rev 3769)
+++ SQLObject/trunk/sqlobject/firebird/__init__.py 2009-01-13 17:08:23 UTC (rev 3770)
@@ -4,11 +4,4 @@
import firebirdconnection
return firebirdconnection.FirebirdConnection
-def isSupported():
- try:
- import kinterbasdb
- except ImportError:
- return False
- return True
-
-registerConnection(['firebird', 'interbase'], builder, isSupported)
+registerConnection(['firebird', 'interbase'], builder)
Modified: SQLObject/trunk/sqlobject/maxdb/__init__.py
===================================================================
--- SQLObject/trunk/sqlobject/maxdb/__init__.py 2009-01-13 16:36:15 UTC (rev 3769)
+++ SQLObject/trunk/sqlobject/maxdb/__init__.py 2009-01-13 17:08:23 UTC (rev 3770)
@@ -4,11 +4,4 @@
import maxdbconnection
return maxdbconnection.MaxdbConnection
-def isSupported():
- try:
- import sapdb
- except ImportError:
- return False
- return True
-
-registerConnection(['maxdb','sapdb'],builder, isSupported)
+registerConnection(['maxdb','sapdb'],builder)
Modified: SQLObject/trunk/sqlobject/mssql/__init__.py
===================================================================
--- SQLObject/trunk/sqlobject/mssql/__init__.py 2009-01-13 16:36:15 UTC (rev 3769)
+++ SQLObject/trunk/sqlobject/mssql/__init__.py 2009-01-13 17:08:23 UTC (rev 3770)
@@ -4,14 +4,4 @@
import mssqlconnection
return mssqlconnection.MSSQLConnection
-def isSupported(cls):
- try:
- import pymssql
- except ImportError:
- try:
- import adodbapi
- except ImportError:
- return False
- return True
-
-registerConnection(['mssql'], builder, isSupported)
+registerConnection(['mssql'], builder)
Modified: SQLObject/trunk/sqlobject/mysql/__init__.py
===================================================================
--- SQLObject/trunk/sqlobject/mysql/__init__.py 2009-01-13 16:36:15 UTC (rev 3769)
+++ SQLObject/trunk/sqlobject/mysql/__init__.py 2009-01-13 17:08:23 UTC (rev 3770)
@@ -5,11 +5,4 @@
import mysqlconnection
return mysqlconnection.MySQLConnection
-def isSupported():
- try:
- import MySQLdb
- except ImportError:
- return False
- return True
-
-registerConnection(['mysql'], builder, isSupported)
+registerConnection(['mysql'], builder)
Modified: SQLObject/trunk/sqlobject/postgres/__init__.py
===================================================================
--- SQLObject/trunk/sqlobject/postgres/__init__.py 2009-01-13 16:36:15 UTC (rev 3769)
+++ SQLObject/trunk/sqlobject/postgres/__init__.py 2009-01-13 17:08:23 UTC (rev 3770)
@@ -4,15 +4,4 @@
import pgconnection
return pgconnection.PostgresConnection
-def isSupported():
- try:
- import psycopg2
- except ImportError:
- try:
- import psycopg
- except ImportError:
- return False
- return True
-
-registerConnection(['postgres', 'postgresql', 'psycopg'],
- builder, isSupported)
+registerConnection(['postgres', 'postgresql', 'psycopg'], builder)
Modified: SQLObject/trunk/sqlobject/sqlite/__init__.py
===================================================================
--- SQLObject/trunk/sqlobject/sqlite/__init__.py 2009-01-13 16:36:15 UTC (rev 3769)
+++ SQLObject/trunk/sqlobject/sqlite/__init__.py 2009-01-13 17:08:23 UTC (rev 3770)
@@ -4,14 +4,4 @@
import sqliteconnection
return sqliteconnection.SQLiteConnection
-def isSupported():
- try:
- from pysqlite2 import dbapi2 as sqlite
- except ImportError:
- try:
- import sqlite
- except ImportError:
- return False
- return True
-
-registerConnection(['sqlite'], builder, isSupported)
+registerConnection(['sqlite'], builder)
Modified: SQLObject/trunk/sqlobject/sybase/__init__.py
===================================================================
--- SQLObject/trunk/sqlobject/sybase/__init__.py 2009-01-13 16:36:15 UTC (rev 3769)
+++ SQLObject/trunk/sqlobject/sybase/__init__.py 2009-01-13 17:08:23 UTC (rev 3770)
@@ -4,11 +4,4 @@
import sybaseconnection
return sybaseconnection.SybaseConnection
-def isSupported(cls):
- try:
- import Sybase
- except ImportError:
- return False
- return True
-
-registerConnection(['sybase'], builder, isSupported)
+registerConnection(['sybase'], builder)
|