Author: ivo
Date: Thu Sep 29 13:42:54 2005
New Revision: 17970
Modified:
z3/sqlos/branch/ivo-3_1-branch/container/__init__.py
z3/sqlos/branch/ivo-3_1-branch/transaction/__init__.py
Log:
Some minor changes to get SQLOS to at least *load* in Zope3.1
Still works far from perfect - documentation is inaccurate/outdated, too many deprecation warnings and oddities
Giving up for now...
Modified: z3/sqlos/branch/ivo-3_1-branch/container/__init__.py
==============================================================================
--- z3/sqlos/branch/ivo-3_1-branch/container/__init__.py (original)
+++ z3/sqlos/branch/ivo-3_1-branch/container/__init__.py Thu Sep 29 13:42:54 2005
@@ -99,6 +99,8 @@
"""
for factoryName in self.allowedFactories():
factory = getFactory(factoryName)
+ if factory is None: ## XXX
+ continue
for obj in factory.select():
name = '%s.%s' % (factoryName, obj.id)
yield (name, contained(obj, parent=self, name=name))
Modified: z3/sqlos/branch/ivo-3_1-branch/transaction/__init__.py
==============================================================================
--- z3/sqlos/branch/ivo-3_1-branch/transaction/__init__.py (original)
+++ z3/sqlos/branch/ivo-3_1-branch/transaction/__init__.py Thu Sep 29 13:42:54 2005
@@ -17,8 +17,8 @@
# the global 'transaction' module from zope3.
from transaction import get_transaction
-from transaction.interfaces import IDataManager, IRollback
-from transaction.util import NoSavepointSupportRollback
+from transaction.interfaces import IDataManager
+# from transaction.util import NoSavepointSupportRollback
from zope.interface import implements
from zope.app.event.objectevent import modified
from sqlos.interfaces import ISQLObject
@@ -261,7 +261,10 @@
raise TypeError("Can't get savepoint during two-phase commit")
self._checkTransaction(txn)
self.transaction = txn
- return NoSavepointSupportRollback(self)
+ # return NoSavepointSupportRollback(self)
+ # savepoint/rollback never really worked -
+ # see http://www.mail-archive.com/zope3-dev@zope.org/msg00216.html
+ raise NotImplementedError
def sortKey(self):
return str(id(self))