[Zodb-checkins] CVS: ZODB4/ZODB - interfaces.py:1.1 ZTransaction.py:1.4 Connection.py:1.94 IZTransaction.py:NONE IConnection.py:NONE

Jeremy Hylton jeremy@zope.com
Fri, 20 Dec 2002 13:30:46 -0500


Update of /cvs-repository/ZODB4/ZODB
In directory cvs.zope.org:/tmp/cvs-serv3178/ZODB

Modified Files:
	ZTransaction.py Connection.py 
Added Files:
	interfaces.py 
Removed Files:
	IZTransaction.py IConnection.py 
Log Message:
Consolidate interfaces definitions


=== Added File ZODB4/ZODB/interfaces.py ===
##############################################################################
#
# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
# All Rights Reserved.
# 
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (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.
# 
##############################################################################
from Interface import Interface
from Transaction.ITransaction import ITransaction

class IConnection(Interface):
    """Interface required of Connection by ZODB DB.

    The Connection also implements IPersistentDataManager.
    """

    def reset(version):
        """Reset connection to use specified version."""

    def getVersion():
        """Return the version that connection is using."""

    def invalidate(oid):
        """Invalidate a particular oid

        This marks the oid as invalid, but doesn't actually invalidate
        it.  The object data will be actually invalidated at certain
        transaction boundaries.

        XXX The code suggests that invalidate() may sometimes be
        called with None as the oid, which would mean the "entire
        transaction" is invalidated.
        """
        
    def close():
        pass

    def cacheGC():
        pass

class IZTransaction(ITransaction):
    """Extends base ITransaction with with metadata."""

    def note(text):
        """Add the text to the transaction description

        If there previous description isn't empty, a blank line is
        added before the new text.
        """

    def setUser(user_name, path="/"):
        """Set the transaction user name.

        The user is actually set to the path followed by a space and
        the user name.
        """

    def setExtendedInfo(name, value):
        """Set extended information."""


=== ZODB4/ZODB/ZTransaction.py 1.3 => 1.4 ===
--- ZODB4/ZODB/ZTransaction.py:1.3	Fri Nov 15 16:49:42 2002
+++ ZODB4/ZODB/ZTransaction.py	Fri Dec 20 13:30:45 2002
@@ -14,7 +14,7 @@
 from Transaction import set_factory
 from Transaction.Transaction import Transaction as BaseTransaction
 
-from ZODB.IZTransaction import IZTransaction
+from ZODB.interfaces import IZTransaction
 
 class Transaction(BaseTransaction):
 


=== ZODB4/ZODB/Connection.py 1.93 => 1.94 ===
--- ZODB4/ZODB/Connection.py:1.93	Thu Dec 19 17:00:13 2002
+++ ZODB4/ZODB/Connection.py	Fri Dec 20 13:30:45 2002
@@ -46,7 +46,7 @@
 from ZODB import ExportImport
 from ZODB.TmpStore import TmpStore
 from ZODB.ConflictResolution import ResolvedSerial
-from ZODB.IConnection import IConnection
+from ZODB.interfaces import IConnection
 from ZODB.POSException import ConflictError, RollbackError
 from ZODB.Serialize import ConnectionObjectReader, \
      getClassMetadata, ObjectWriter

=== Removed File ZODB4/ZODB/IZTransaction.py ===

=== Removed File ZODB4/ZODB/IConnection.py ===