[Zodb-checkins] CVS: Zope3/lib/python/ZODB - IConnection.py:1.1.2.1
Jeremy Hylton
jeremy@zope.com
Mon, 11 Mar 2002 11:01:54 -0500
Update of /cvs-repository/Zope3/lib/python/ZODB
In directory cvs.zope.org:/tmp/cvs-serv23450
Added Files:
Tag: Zope-3x-branch
IConnection.py
Log Message:
A stab at documenting the interface between DB and Connection.
=== Added File Zope3/lib/python/ZODB/IConnection.py ===
##############################################################################
# Copyright (c) 2001 Zope Corporation and Contributors. All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 1.1 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE.
##############################################################################
# Hack to overcome absense of Interface package
try:
from Interface import Interface
except ImportError:
class Interface:
pass
class IConnection(Interface):
"""Interface required of Connection by ZODB DB.
The Connection also implements IPersistentDataManager.
"""
def registerDB(db):
"""Register Connection with DB.
XXX Perhaps the db should just be passed to the constructor?
"""