[z3-checkins] r25467 - in z3/sqlos/trunk/src/sqlos: . interfaces

jinty at codespeak.net jinty at codespeak.net
Fri Apr 7 02:01:27 CEST 2006


Author: jinty
Date: Fri Apr  7 02:01:23 2006
New Revision: 25467

Modified:
   z3/sqlos/trunk/src/sqlos/__init__.py
   z3/sqlos/trunk/src/sqlos/interfaces/__init__.py
Log:
Move some strange, untested and probably un-necessary class implements closer to where the interfaces are defined.

Modified: z3/sqlos/trunk/src/sqlos/__init__.py
==============================================================================
--- z3/sqlos/trunk/src/sqlos/__init__.py	(original)
+++ z3/sqlos/trunk/src/sqlos/__init__.py	Fri Apr  7 02:01:23 2006
@@ -13,27 +13,8 @@
 __metaclass__ = type
 
 from datetime import datetime, date
-from zope.interface import classImplements
 from zope.app import zapi
-from zope.security.checker import NamesChecker, NoProxy, defineChecker
-
-from sqlobject.dbconnection import DBConnection, DBAPI
-from sqlobject import _mysql, _postgres, _sybase
-from sqlobject.main import SQLObject, SelectResults
-from sqlobject.sqlbuilder import registerConverter, \
-     SQLObjectTable
-from sqlos.interfaces import IDBConnection, IDBAPI, ISQLConnection
-from sqlos.interfaces import IISQLObject, ISQLObject, ISelectResults
-
-defineChecker(SQLObjectTable, NoProxy)
-
-classImplements(DBConnection, IDBConnection)
-classImplements(DBAPI, IDBAPI)
-classImplements(_mysql.builder(), ISQLConnection)
-classImplements(_postgres.builder(), ISQLConnection)
-classImplements(_sybase.builder(), ISQLConnection)
-classImplements(SQLObject, ISQLObject)
-classImplements(SelectResults, ISelectResults)
+from sqlobject.sqlbuilder import registerConverter
 
 from _sqlos import SQLOS
 

Modified: z3/sqlos/trunk/src/sqlos/interfaces/__init__.py
==============================================================================
--- z3/sqlos/trunk/src/sqlos/interfaces/__init__.py	(original)
+++ z3/sqlos/trunk/src/sqlos/interfaces/__init__.py	Fri Apr  7 02:01:23 2006
@@ -11,11 +11,17 @@
 """
 from zope.schema import TextLine
 from zope.interface import Interface, Attribute
-from sqlobject import NoDefault
 from zope.component import getService, ComponentLookupError
+from zope.interface import classImplements
+from zope.security.checker import NamesChecker, NoProxy, defineChecker
 from zope.schema.vocabulary import SimpleVocabulary
 from zope.schema import Choice, List
 from zope.app.annotation.interfaces import IAttributeAnnotatable
+from sqlobject import NoDefault
+from sqlobject.dbconnection import DBConnection, DBAPI
+from sqlobject import _mysql, _postgres, _sybase
+from sqlobject.main import SQLObject, SelectResults
+from sqlobject.sqlbuilder import SQLObjectTable
 
 class IConnectionName(Interface):
     """A marker interface for providing a connection name"""
@@ -248,7 +254,7 @@
 
 class IISQLObjectIsolated(IISQLObject):
     """Support for using this class in isolated containers.
-    
+
     This interface is necessary to move the SQL query logic to the SQLOS class
     as it can be implemented in various ways in the class.
     """
@@ -335,3 +341,17 @@
 
     def next():
         """ Iterator """
+
+# XXX: Why do we need these????
+
+defineChecker(SQLObjectTable, NoProxy)
+
+classImplements(DBConnection, IDBConnection)
+classImplements(DBAPI, IDBAPI)
+classImplements(_mysql.builder(), ISQLConnection)
+classImplements(_postgres.builder(), ISQLConnection)
+classImplements(_sybase.builder(), ISQLConnection)
+classImplements(SQLObject, ISQLObject)
+classImplements(SelectResults, ISelectResults)
+
+


More information about the z3-checkins mailing list