Skip to content

deregister zope.sqlalchemy.register() #9

@philtay

Description

@philtay

There should be a deregister() counterpart to the new zope.sqlalchemy.register() function. It will be useful in contexts where you have to use the same Session but with different transactional behaviours.
For instance, depending on the situation, you may need to (dynamically) set keep_session=False or keep_session=True. This is very easy to accomplish using the old SQLAlchemy extension system. You just use Session.configure. On the other hand, using the new register() function, there is no way to do it.
I think that sqlalchemy.event.remove should do the trick.

http://docs.sqlalchemy.org/en/rel_0_9/core/event.html#sqlalchemy.event.remove

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions