Added an option to permanently close sessions.
Set to ``False`` the new parameter :paramref:`_orm.Session.close_is_reset`
will prevent a :class:`_orm.Session` from performing any other
operation after :meth:`_orm.Session.close` has been called.
Added new method :meth:`_orm.Session.reset` that will reset a :class:`_orm.Session`
to its initial state. This is an alias of :meth:`_orm.Session.close`,
unless :paramref:`_orm.Session.close_is_reset` is set to ``False``.
Fixes: #7787
Closes: #10137
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/10137
Pull-request-sha:
881241e19b24f34e4553b2d58070bfa99597f4e4
Change-Id: Ic3512874600daff4ed66bb0cd29a3a88f667d258