[Checkins] [zopefoundation/zope.sqlalchemy] ca3a09: Restore possibility to change keep_session param. ...

Michael Howitz noreply at github.com
Mon Feb 17 14:39:36 CET 2020


  Branch: refs/heads/master
  Home:   https://github.com/zopefoundation/zope.sqlalchemy
  Commit: ca3a094dda80ee2ab5e2693df840192192297750
      https://github.com/zopefoundation/zope.sqlalchemy/commit/ca3a094dda80ee2ab5e2693df840192192297750
  Author: Michael Howitz <mh at gocept.com>
  Date:   2020-02-17 (Mon, 17 Feb 2020)

  Changed paths:
    M CHANGES.rst
    M src/zope/sqlalchemy/README.rst
    M src/zope/sqlalchemy/datamanager.py

  Log Message:
  -----------
  Restore possibility to change keep_session param. (#40)

* Restore possibility to change keep_session param.

Before version 1.2 it was possible to change the value of `keep_session` for certain tests.
We used `keep_session=True` to ease unittests which are not forced to re-fetch objects from database after a commit. On the other hand selenium tests should behave more like an actual web server which does not keep the session.
So we switched to `keep_session=False` for some tests with code like this:
https://github.com/gocept/risclog.sqlalchemy/blob/44fe2494337b41e0bc3d5602ebbd7493918d841d/src/risclog/sqlalchemy/fixtures.py#L6

This is no longer possible since zope.sqlalchemy 1.2.
With this commit the ability to access the `ZopeTransactionEvents` instance is restored.

* Add documentation, fix tests.




More information about the checkins mailing list