summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/ext/asyncio/session.py
diff options
context:
space:
mode:
authorFederico Caselli <cfederico87@gmail.com>2022-10-17 22:02:13 +0200
committerMike Bayer <mike_mp@zzzcomputing.com>2022-11-02 21:38:31 -0400
commitd10b62f54e6b9dd0613c0412b924c1b346ec1611 (patch)
tree07d246255d0372c5a7839e1aec354edacf687fdf /lib/sqlalchemy/ext/asyncio/session.py
parent66e591cf8a5de6d5dabdecf2bb279dec90962e15 (diff)
downloadsqlalchemy-d10b62f54e6b9dd0613c0412b924c1b346ec1611.tar.gz
Improve typings of execution options
Fixes: #8605 Change-Id: I4aec83b9f321462427c3f4ac941c3b272255c088
Diffstat (limited to 'lib/sqlalchemy/ext/asyncio/session.py')
-rw-r--r--lib/sqlalchemy/ext/asyncio/session.py34
1 files changed, 17 insertions, 17 deletions
diff --git a/lib/sqlalchemy/ext/asyncio/session.py b/lib/sqlalchemy/ext/asyncio/session.py
index e17b729bf..0aa9661e9 100644
--- a/lib/sqlalchemy/ext/asyncio/session.py
+++ b/lib/sqlalchemy/ext/asyncio/session.py
@@ -47,10 +47,10 @@ if TYPE_CHECKING:
from ...engine import ScalarResult
from ...engine.interfaces import _CoreAnyExecuteParams
from ...engine.interfaces import _CoreSingleExecuteParams
- from ...engine.interfaces import _ExecuteOptionsParameter
from ...event import dispatcher
from ...orm._typing import _IdentityKeyType
from ...orm._typing import _O
+ from ...orm._typing import OrmExecuteOptionsParameter
from ...orm.identity import IdentityMap
from ...orm.interfaces import ORMOption
from ...orm.session import _BindArguments
@@ -264,7 +264,7 @@ class AsyncSession(ReversibleProxy[Session]):
statement: TypedReturnsRows[_T],
params: Optional[_CoreAnyExecuteParams] = None,
*,
- execution_options: _ExecuteOptionsParameter = util.EMPTY_DICT,
+ execution_options: OrmExecuteOptionsParameter = util.EMPTY_DICT,
bind_arguments: Optional[_BindArguments] = None,
_parent_execute_state: Optional[Any] = None,
_add_event: Optional[Any] = None,
@@ -277,7 +277,7 @@ class AsyncSession(ReversibleProxy[Session]):
statement: Executable,
params: Optional[_CoreAnyExecuteParams] = None,
*,
- execution_options: _ExecuteOptionsParameter = util.EMPTY_DICT,
+ execution_options: OrmExecuteOptionsParameter = util.EMPTY_DICT,
bind_arguments: Optional[_BindArguments] = None,
_parent_execute_state: Optional[Any] = None,
_add_event: Optional[Any] = None,
@@ -289,7 +289,7 @@ class AsyncSession(ReversibleProxy[Session]):
statement: Executable,
params: Optional[_CoreAnyExecuteParams] = None,
*,
- execution_options: _ExecuteOptionsParameter = util.EMPTY_DICT,
+ execution_options: OrmExecuteOptionsParameter = util.EMPTY_DICT,
bind_arguments: Optional[_BindArguments] = None,
**kw: Any,
) -> Result[Any]:
@@ -325,7 +325,7 @@ class AsyncSession(ReversibleProxy[Session]):
statement: TypedReturnsRows[Tuple[_T]],
params: Optional[_CoreSingleExecuteParams] = None,
*,
- execution_options: _ExecuteOptionsParameter = util.EMPTY_DICT,
+ execution_options: OrmExecuteOptionsParameter = util.EMPTY_DICT,
bind_arguments: Optional[_BindArguments] = None,
**kw: Any,
) -> Optional[_T]:
@@ -337,7 +337,7 @@ class AsyncSession(ReversibleProxy[Session]):
statement: Executable,
params: Optional[_CoreSingleExecuteParams] = None,
*,
- execution_options: _ExecuteOptionsParameter = util.EMPTY_DICT,
+ execution_options: OrmExecuteOptionsParameter = util.EMPTY_DICT,
bind_arguments: Optional[_BindArguments] = None,
**kw: Any,
) -> Any:
@@ -348,7 +348,7 @@ class AsyncSession(ReversibleProxy[Session]):
statement: Executable,
params: Optional[_CoreSingleExecuteParams] = None,
*,
- execution_options: _ExecuteOptionsParameter = util.EMPTY_DICT,
+ execution_options: OrmExecuteOptionsParameter = util.EMPTY_DICT,
bind_arguments: Optional[_BindArguments] = None,
**kw: Any,
) -> Any:
@@ -383,7 +383,7 @@ class AsyncSession(ReversibleProxy[Session]):
statement: TypedReturnsRows[Tuple[_T]],
params: Optional[_CoreSingleExecuteParams] = None,
*,
- execution_options: _ExecuteOptionsParameter = util.EMPTY_DICT,
+ execution_options: OrmExecuteOptionsParameter = util.EMPTY_DICT,
bind_arguments: Optional[_BindArguments] = None,
**kw: Any,
) -> ScalarResult[_T]:
@@ -395,7 +395,7 @@ class AsyncSession(ReversibleProxy[Session]):
statement: Executable,
params: Optional[_CoreSingleExecuteParams] = None,
*,
- execution_options: _ExecuteOptionsParameter = util.EMPTY_DICT,
+ execution_options: OrmExecuteOptionsParameter = util.EMPTY_DICT,
bind_arguments: Optional[_BindArguments] = None,
**kw: Any,
) -> ScalarResult[Any]:
@@ -406,7 +406,7 @@ class AsyncSession(ReversibleProxy[Session]):
statement: Executable,
params: Optional[_CoreSingleExecuteParams] = None,
*,
- execution_options: _ExecuteOptionsParameter = util.EMPTY_DICT,
+ execution_options: OrmExecuteOptionsParameter = util.EMPTY_DICT,
bind_arguments: Optional[_BindArguments] = None,
**kw: Any,
) -> ScalarResult[Any]:
@@ -442,7 +442,7 @@ class AsyncSession(ReversibleProxy[Session]):
populate_existing: bool = False,
with_for_update: Optional[ForUpdateArg] = None,
identity_token: Optional[Any] = None,
- execution_options: _ExecuteOptionsParameter = util.EMPTY_DICT,
+ execution_options: OrmExecuteOptionsParameter = util.EMPTY_DICT,
) -> Optional[_O]:
"""Return an instance based on the given primary key identifier,
@@ -472,7 +472,7 @@ class AsyncSession(ReversibleProxy[Session]):
statement: TypedReturnsRows[_T],
params: Optional[_CoreAnyExecuteParams] = None,
*,
- execution_options: _ExecuteOptionsParameter = util.EMPTY_DICT,
+ execution_options: OrmExecuteOptionsParameter = util.EMPTY_DICT,
bind_arguments: Optional[_BindArguments] = None,
**kw: Any,
) -> AsyncResult[_T]:
@@ -484,7 +484,7 @@ class AsyncSession(ReversibleProxy[Session]):
statement: Executable,
params: Optional[_CoreAnyExecuteParams] = None,
*,
- execution_options: _ExecuteOptionsParameter = util.EMPTY_DICT,
+ execution_options: OrmExecuteOptionsParameter = util.EMPTY_DICT,
bind_arguments: Optional[_BindArguments] = None,
**kw: Any,
) -> AsyncResult[Any]:
@@ -495,7 +495,7 @@ class AsyncSession(ReversibleProxy[Session]):
statement: Executable,
params: Optional[_CoreAnyExecuteParams] = None,
*,
- execution_options: _ExecuteOptionsParameter = util.EMPTY_DICT,
+ execution_options: OrmExecuteOptionsParameter = util.EMPTY_DICT,
bind_arguments: Optional[_BindArguments] = None,
**kw: Any,
) -> AsyncResult[Any]:
@@ -528,7 +528,7 @@ class AsyncSession(ReversibleProxy[Session]):
statement: TypedReturnsRows[Tuple[_T]],
params: Optional[_CoreSingleExecuteParams] = None,
*,
- execution_options: _ExecuteOptionsParameter = util.EMPTY_DICT,
+ execution_options: OrmExecuteOptionsParameter = util.EMPTY_DICT,
bind_arguments: Optional[_BindArguments] = None,
**kw: Any,
) -> AsyncScalarResult[_T]:
@@ -540,7 +540,7 @@ class AsyncSession(ReversibleProxy[Session]):
statement: Executable,
params: Optional[_CoreSingleExecuteParams] = None,
*,
- execution_options: _ExecuteOptionsParameter = util.EMPTY_DICT,
+ execution_options: OrmExecuteOptionsParameter = util.EMPTY_DICT,
bind_arguments: Optional[_BindArguments] = None,
**kw: Any,
) -> AsyncScalarResult[Any]:
@@ -551,7 +551,7 @@ class AsyncSession(ReversibleProxy[Session]):
statement: Executable,
params: Optional[_CoreSingleExecuteParams] = None,
*,
- execution_options: _ExecuteOptionsParameter = util.EMPTY_DICT,
+ execution_options: OrmExecuteOptionsParameter = util.EMPTY_DICT,
bind_arguments: Optional[_BindArguments] = None,
**kw: Any,
) -> AsyncScalarResult[Any]: