From 8a665b23062dbd90e4e813655a568f00c94ef685 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Sun, 27 Sep 2020 11:06:48 -0400 Subject: Repair erroneous "future" symbol the change in 1e800285508ecd869c6874fed failed to fully remove the "future" symbol which then got confused against the import of the "future" package itself, which is also not needed. remove it entirely. pin pytest < 6.1 to see if new error condition may be avoided Change-Id: Ibe45040120d3772c39faef4a61ed26f90b60c79e --- lib/sqlalchemy/orm/session.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'lib') diff --git a/lib/sqlalchemy/orm/session.py b/lib/sqlalchemy/orm/session.py index 2574e2bbd..bebe015f7 100644 --- a/lib/sqlalchemy/orm/session.py +++ b/lib/sqlalchemy/orm/session.py @@ -29,7 +29,6 @@ from .base import state_str from .unitofwork import UOWTransaction from .. import engine from .. import exc as sa_exc -from .. import future from .. import sql from .. import util from ..inspection import inspect @@ -124,7 +123,6 @@ class ORMExecuteState(util.MemoizedSlots): "_compile_state_cls", "_starting_event_idx", "_events_todo", - "_future", "_update_execution_options", ) @@ -137,7 +135,6 @@ class ORMExecuteState(util.MemoizedSlots): bind_arguments, compile_state_cls, events_todo, - future, ): self.session = session self.statement = statement @@ -149,7 +146,6 @@ class ORMExecuteState(util.MemoizedSlots): self.bind_arguments = bind_arguments self._compile_state_cls = compile_state_cls self._events_todo = list(events_todo) - self._future = future def _remaining_events(self): return self._events_todo[self._starting_event_idx + 1 :] @@ -1504,7 +1500,7 @@ class Session(_SessionClassMethods): elif not bind_arguments: bind_arguments = {} - if future and ( + if ( statement._propagate_attrs.get("compile_state_plugin", None) == "orm" ): @@ -1551,7 +1547,6 @@ class Session(_SessionClassMethods): bind_arguments, compile_state_cls, events_todo, - future, ) for idx, fn in enumerate(events_todo): orm_exec_state._starting_event_idx = idx @@ -2117,7 +2112,7 @@ class Session(_SessionClassMethods): with_for_update = query.ForUpdateArg._from_argument(with_for_update) - stmt = future.select(object_mapper(instance)) + stmt = sql.select(object_mapper(instance)) if ( loading.load_on_ident( self, -- cgit v1.2.1