diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2021-10-30 14:44:55 -0400 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2021-10-31 15:37:08 -0400 |
| commit | aa026c302c6b188a7e28508f9ecb603809b9e03f (patch) | |
| tree | bf4de51d5f585dc5b8b07b2b584b6182ab7aab3a /lib/sqlalchemy/engine/default.py | |
| parent | cdce33e2ccb60365f12eb07c0b86fdc2b89b5033 (diff) | |
| download | sqlalchemy-aa026c302c6b188a7e28508f9ecb603809b9e03f.tar.gz | |
2.0 removals: LegacyRow, connectionless execution, close_with_result
in order to remove LegacyRow / LegacyResult, we have
to also lose close_with_result, which connectionless
execution relies upon.
also includes a new profiles.txt file that's all against
py310, as that's what CI is on now. some result counts
changed by one function call which was enough to fail the
low-count result tests.
Replaces Connectable as the common interface between
Connection and Engine with EngineEventsTarget. Engine
is no longer Connectable. Connection and MockConnection
still are.
References: #7257
Change-Id: Iad5eba0313836d347e65490349a22b061356896a
Diffstat (limited to 'lib/sqlalchemy/engine/default.py')
| -rw-r--r-- | lib/sqlalchemy/engine/default.py | 41 |
1 files changed, 2 insertions, 39 deletions
diff --git a/lib/sqlalchemy/engine/default.py b/lib/sqlalchemy/engine/default.py index 75bca1905..002203ddc 100644 --- a/lib/sqlalchemy/engine/default.py +++ b/lib/sqlalchemy/engine/default.py @@ -855,7 +855,6 @@ class DefaultExecutionContext(interfaces.ExecutionContext): _is_implicit_returning = False _is_explicit_returning = False - _is_future_result = False _is_server_side = False _soft_closed = False @@ -890,11 +889,6 @@ class DefaultExecutionContext(interfaces.ExecutionContext): self.execution_options = execution_options - self._is_future_result = ( - connection._is_future - or self.execution_options.get("future_result", False) - ) - self.unicode_statement = util.text_type(compiled) if compiled.schema_translate_map: schema_translate_map = self.execution_options.get( @@ -947,11 +941,6 @@ class DefaultExecutionContext(interfaces.ExecutionContext): self.execution_options = execution_options - self._is_future_result = ( - connection._is_future - or self.execution_options.get("future_result", False) - ) - self.result_column_struct = ( compiled._result_columns, compiled._ordered_columns, @@ -1106,11 +1095,6 @@ class DefaultExecutionContext(interfaces.ExecutionContext): self.execution_options = execution_options - self._is_future_result = ( - connection._is_future - or self.execution_options.get("future_result", False) - ) - if not parameters: if self.dialect.positional: self.parameters = [dialect.execute_sequence_format()] @@ -1157,11 +1141,6 @@ class DefaultExecutionContext(interfaces.ExecutionContext): self.execution_options = execution_options - self._is_future_result = ( - connection._is_future - or self.execution_options.get("future_result", False) - ) - self.cursor = self.create_cursor() return self @@ -1420,18 +1399,7 @@ class DefaultExecutionContext(interfaces.ExecutionContext): if cursor_description is None: strategy = _cursor._NO_CURSOR_DQL - if self._is_future_result: - if self.root_connection.should_close_with_result: - raise exc.InvalidRequestError( - "can't use future_result=True with close_with_result" - ) - result = _cursor.CursorResult( - self, strategy, cursor_description - ) - else: - result = _cursor.LegacyCursorResult( - self, strategy, cursor_description - ) + result = _cursor.CursorResult(self, strategy, cursor_description) if ( self.compiled @@ -1493,12 +1461,7 @@ class DefaultExecutionContext(interfaces.ExecutionContext): if cursor_description is None: strategy = _cursor._NO_CURSOR_DML - if self._is_future_result: - result = _cursor.CursorResult(self, strategy, cursor_description) - else: - result = _cursor.LegacyCursorResult( - self, strategy, cursor_description - ) + result = _cursor.CursorResult(self, strategy, cursor_description) if self.isinsert: if self._is_implicit_returning: |
