[Checkins] SVN: zope.sqlalchemy/trunk/s changes now in sqlalchemy
svn, update setup.py etc.
Laurence Rowe
l at lrowe.co.uk
Mon May 5 20:56:01 EDT 2008
Log message for revision 86481:
changes now in sqlalchemy svn, update setup.py etc.
Changed:
A zope.sqlalchemy/trunk/setup.cfg
U zope.sqlalchemy/trunk/setup.py
D zope.sqlalchemy/trunk/sqlalchemy.diff
U zope.sqlalchemy/trunk/src/zope/sqlalchemy/README.txt
U zope.sqlalchemy/trunk/src/zope/sqlalchemy/datamanager.py
-=-
Added: zope.sqlalchemy/trunk/setup.cfg
===================================================================
--- zope.sqlalchemy/trunk/setup.cfg (rev 0)
+++ zope.sqlalchemy/trunk/setup.cfg 2008-05-06 00:56:00 UTC (rev 86481)
@@ -0,0 +1,3 @@
+[egg_info]
+tag_build = dev
+tag_svn_revision = true
Modified: zope.sqlalchemy/trunk/setup.py
===================================================================
--- zope.sqlalchemy/trunk/setup.py 2008-05-06 00:05:29 UTC (rev 86480)
+++ zope.sqlalchemy/trunk/setup.py 2008-05-06 00:56:00 UTC (rev 86481)
@@ -30,7 +30,7 @@
install_requires=[
# -*- Extra requirements: -*-
'setuptools',
- 'SQLAlchemy>=0.4.4',
+ 'SQLAlchemy>=0.4.6.dev-r4655,==dev',
'transaction',
'zope.interface',
],
Deleted: zope.sqlalchemy/trunk/sqlalchemy.diff
===================================================================
--- zope.sqlalchemy/trunk/sqlalchemy.diff 2008-05-06 00:05:29 UTC (rev 86480)
+++ zope.sqlalchemy/trunk/sqlalchemy.diff 2008-05-06 00:56:00 UTC (rev 86481)
@@ -1,67 +0,0 @@
-Index: test/orm/session.py
-===================================================================
---- test/orm/session.py (revision 4574)
-+++ test/orm/session.py (working copy)
-@@ -881,19 +881,20 @@
- log.append('after_flush')
- def after_flush_postexec(self, session, flush_context):
- log.append('after_flush_postexec')
-+ def after_begin(self, session, transaction, connection):
-+ log.append('after_begin')
- sess = create_session(extension = MyExt())
- u = User()
- sess.save(u)
- sess.flush()
-+ assert log == ['before_flush', 'after_begin', 'after_flush', 'before_commit', 'after_commit', 'after_flush_postexec']
-
-- assert log == ['before_flush', 'after_flush', 'before_commit', 'after_commit', 'after_flush_postexec']
--
- log = []
- sess = create_session(transactional=True, extension=MyExt())
- u = User()
- sess.save(u)
- sess.flush()
-- assert log == ['before_flush', 'after_flush', 'after_flush_postexec']
-+ assert log == ['before_flush', 'after_begin', 'after_flush', 'after_flush_postexec']
-
- log = []
- u.user_name = 'ed'
-@@ -903,6 +904,11 @@
- log = []
- sess.commit()
- assert log == ['before_commit', 'after_commit']
-+
-+ log = []
-+ sess = create_session(transactional=True, extension=MyExt(), bind=testing.db)
-+ conn = sess.connection()
-+ assert log == ['after_begin']
-
- def test_pickled_update(self):
- mapper(User, users)
-Index: lib/sqlalchemy/orm/session.py
-===================================================================
---- lib/sqlalchemy/orm/session.py (revision 4574)
-+++ lib/sqlalchemy/orm/session.py (working copy)
-@@ -127,6 +127,13 @@
- state. An actual commit() may or may not have occured, depending on whether or not
- the flush started its own transaction or participated in a larger transaction.
- """
-+
-+ def after_begin(self, session, transaction, connection):
-+ """Execute after a transaction is begun on a connection
-+
-+ `transaction` is the SessionTransaction. This method is called after an
-+ engine level transaction is begun on a connection.
-+ """
-
- class SessionTransaction(object):
- """Represents a Session-level Transaction.
-@@ -214,6 +221,8 @@
- transaction = conn.begin()
-
- self._connections[conn] = self._connections[conn.engine] = (conn, transaction, conn is not bind)
-+ if self.session.extension is not None:
-+ self.session.extension.after_begin(self.session, self, conn)
- return conn
-
- def prepare(self):
Modified: zope.sqlalchemy/trunk/src/zope/sqlalchemy/README.txt
===================================================================
--- zope.sqlalchemy/trunk/src/zope/sqlalchemy/README.txt 2008-05-06 00:05:29 UTC (rev 86480)
+++ zope.sqlalchemy/trunk/src/zope/sqlalchemy/README.txt 2008-05-06 00:56:00 UTC (rev 86481)
@@ -14,8 +14,6 @@
Running the tests
-----------------
-NOTE: Currently you must patch sqlalchemy with the included sqlalchemy.diff. Bug #1023
-
This package is distributed as a buildout. Using your desired python run:
$ python bootstrap.py
Modified: zope.sqlalchemy/trunk/src/zope/sqlalchemy/datamanager.py
===================================================================
--- zope.sqlalchemy/trunk/src/zope/sqlalchemy/datamanager.py 2008-05-06 00:05:29 UTC (rev 86480)
+++ zope.sqlalchemy/trunk/src/zope/sqlalchemy/datamanager.py 2008-05-06 00:56:00 UTC (rev 86481)
@@ -122,7 +122,7 @@
def tpc_abort(self, trans):
if self.tx is not None: # we may not have voted, and been aborted already
- self.tx._rollback_impl() # XXX change to self.tx.rollback() when #1024 fixed
+ self.tx.rollback()
self.session.close()
self.tx = self.session = None
self.state = 'aborted commit'
More information about the Checkins
mailing list