- Nothing changed yet.
- Drop support for Python 2.7, 3.5, 3.6.
- Drop support for
SQLAlchemy < 1.1
(#65) - Add support for Python 3.10, 3.11.
- Add support for Python 2.7 on SQLAlchemy 1.4. (#71)
- Call
mark_changed
also on thedo_orm_execute
event if the operation is an insert, update or delete. This is SQLAlchemy >= 1.4 only, as it introduced that event. (#67) - Fixup get transaction. There was regression introduced in 1.4. (#66)
- Add
mark_changed
andjoin_transaction
methods toZopeTransactionEvents
. (#46) - Reduce DeprecationWarnings with SQLAlchemy 1.4 and require at least SQLAlchemy >= 0.9. (#54)
- Add support for SQLAlchemy 1.4. (#58)
- Prevent using an SQLAlchemy 1.4 version with broken flush support. (#57)
.datamanager.register()
now returns theZopeTransactionEvents
instance which was used to register the events. This allows to change its parameters afterwards. (#40)- Add preliminary support for Python 3.9a3.
Breaking Changes
Drop support for Python 3.4.
Add support for Python 3.7 and 3.8.
Fix deprecation warnings for the event system. We already used it in general but still leveraged the old extension mechanism in some places. (#31)
To make things clearer we renamed the
ZopeTransactionExtension
class toZopeTransactionEvents
. Existing code using the 'register' version stays compatible.
Upgrade from 1.1
Your old code like this:
from zope.sqlalchemy import ZopeTransactionExtension
DBSession = scoped_session(sessionmaker(extension=ZopeTransactionExtension(), **options))
becomes:
from zope.sqlalchemy import register
DBSession = scoped_session(sessionmaker(**options))
register(DBSession)
- Add support to MySQL using pymysql.
- Add support for Python 3.4 up to 3.6.
- Support SQLAlchemy 1.2.
- Drop support for Python 2.6, 3.2 and 3.3.
- Drop support for transaction < 1.6.0.
- Fix hazard that could cause SQLAlchemy session not to be committed when transaction is committed in rare situations. (#23)
- Support SQLAlchemy 1.1. (#15)
- Make version check in register compatible with prereleases.
- Ensure mapped objects are expired following a
transaction.commit()
when no database commit was required. (#8)
- Allow
session.commit()
on nested transactions to facilitate integration of existing code that might not usetransaction.savepoint()
. (#1) - Add a new function zope.sqlalchemy.register(), which replaces the direct use of ZopeTransactionExtension to make use of the newer SQLAlchemy event system to establish instrumentation on the given Session instance/class/factory. Requires at least SQLAlchemy 0.7. (#4)
- Fix keep_session=True doesn't work when a transaction is joined by flush and other manngers bug. (#5)
- Prevent the
Session
object from getting into a "wedged" state if joining a transaction fails. With thread scoped sessions that are reused this can cause persistent errors requiring a server restart. (#2)
- Make life-time of sessions configurable. Specify keep_session=True when setting up the SA extension.
- Python 3.3 compatibility.
- Use
@implementer
as a class decorator instead ofimplements()
at class scope for compatibility withzope.interface
4.0. This requireszope.interface
>= 3.6.0.
- Python 3.2 compatibility.
- Update datamanager.mark_changed to handle sessions which have not yet logged a (ORM) query.
- Implement should_retry for sqlalchemy.orm.exc.ConcurrentModificationError and serialization errors from PostgreSQL and Oracle. (Specify transaction>=1.1 to use this functionality.)
- Include license files.
- Add
transaction_manager
attribute to data managers for compliance with IDataManager interface.
- Remove redundant session.flush() / session.clear() on savepoint operations. These were only needed with SQLAlchemy 0.4.x.
- SQLAlchemy 0.6.x support. Require SQLAlchemy >= 0.5.1.
- Add support for running
python setup.py test
. - Pull in pysqlite explicitly as a test dependency.
- Setup sqlalchemy mappers in test setup and clear them in tear down. This makes the tests more robust and clears up the global state after. It caused the tests to fail when other tests in the same run called clear_mappers.
Bugs fixed:
- Only raise errors in tpc_abort if we have committed.
- Remove the session id from the SESSION_STATE just before we de-reference the session (i.e. all work is already successfuly completed). This fixes cases where the transaction commit failed but SESSION_STATE was already cleared. In those cases, the transaction was wedeged as abort would always error. This happened on PostgreSQL where invalid SQL was used and the error caught.
- Call session.flush() unconditionally in tpc_begin.
- Change error message on session.commit() to be friendlier to non zope users.
Feature changes:
- Support for bulk update and delete with SQLAlchemy 0.5.1
Bugs fixed:
- New objects added to a session did not cause a transaction join, so were not committed at the end of the transaction unless the database was accessed. SQLAlchemy 0.4.7 or 0.5beta3 now required.
Feature changes:
- For correctness and consistency with ZODB, renamed the function 'invalidate' to 'mark_changed' and the status 'invalidated' to 'changed'.
Feature changes:
- Updated to support SQLAlchemy 0.5. (0.4.6 is still supported).
- Initial public release.