summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2020-09-27 11:06:48 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2020-09-27 13:31:43 -0400
commit8a665b23062dbd90e4e813655a568f00c94ef685 (patch)
treed0ef645841615598a15b81f694e6883dd7cf1a21
parentffafbd4b9657a4ee8bec57c0861414144f37bdc5 (diff)
downloadsqlalchemy-8a665b23062dbd90e4e813655a568f00c94ef685.tar.gz
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
-rw-r--r--lib/sqlalchemy/orm/session.py9
-rw-r--r--tox.ini2
2 files changed, 3 insertions, 8 deletions
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,
diff --git a/tox.ini b/tox.ini
index aeef37b91..d62db1c25 100644
--- a/tox.ini
+++ b/tox.ini
@@ -15,7 +15,7 @@ install_command=python -m pip install {env:TOX_PIP_OPTS:} {opts} {packages}
usedevelop=
cov: True
-deps=pytest!=3.9.1,!=3.9.2
+deps=pytest<6.1
pytest-xdist
greenlet
mock; python_version < '3.3'