summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/orm/session.py
diff options
context:
space:
mode:
authormike bayer <mike_mp@zzzcomputing.com>2023-05-10 20:15:15 +0000
committerGerrit Code Review <gerrit@bbpush.zzzcomputing.com>2023-05-10 20:15:15 +0000
commit4f52073370ae2a563fdc3fe05d87ee1ea4ee901d (patch)
tree1f1b87086516abe7dbc5f4f5a6734aa929f0e00a /lib/sqlalchemy/orm/session.py
parentbce61160a9aec321ea0af4a59d4b83ff93a0429f (diff)
parent189039b9d38343b482f1b077bbcf6f6ae99cbacd (diff)
downloadsqlalchemy-4f52073370ae2a563fdc3fe05d87ee1ea4ee901d.tar.gz
Merge "add full parameter types for ORM with_for_update" into main
Diffstat (limited to 'lib/sqlalchemy/orm/session.py')
-rw-r--r--lib/sqlalchemy/orm/session.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/sqlalchemy/orm/session.py b/lib/sqlalchemy/orm/session.py
index 792b59e81..0ce53bcab 100644
--- a/lib/sqlalchemy/orm/session.py
+++ b/lib/sqlalchemy/orm/session.py
@@ -126,6 +126,7 @@ if typing.TYPE_CHECKING:
from ..sql.base import ExecutableOption
from ..sql.elements import ClauseElement
from ..sql.roles import TypedColumnsClauseRole
+ from ..sql.selectable import ForUpdateParameter
from ..sql.selectable import TypedReturnsRows
_T = TypeVar("_T", bound=Any)
@@ -2911,7 +2912,7 @@ class Session(_SessionClassMethods, EventTarget):
self,
instance: object,
attribute_names: Optional[Iterable[str]] = None,
- with_for_update: Optional[ForUpdateArg] = None,
+ with_for_update: ForUpdateParameter = None,
) -> None:
"""Expire and refresh attributes on the given instance.
@@ -3432,7 +3433,7 @@ class Session(_SessionClassMethods, EventTarget):
*,
options: Optional[Sequence[ORMOption]] = None,
populate_existing: bool = False,
- with_for_update: Optional[ForUpdateArg] = None,
+ with_for_update: ForUpdateParameter = None,
identity_token: Optional[Any] = None,
execution_options: OrmExecuteOptionsParameter = util.EMPTY_DICT,
bind_arguments: Optional[_BindArguments] = None,
@@ -3559,7 +3560,7 @@ class Session(_SessionClassMethods, EventTarget):
*,
options: Optional[Sequence[ExecutableOption]] = None,
populate_existing: bool = False,
- with_for_update: Optional[ForUpdateArg] = None,
+ with_for_update: ForUpdateParameter = None,
identity_token: Optional[Any] = None,
execution_options: OrmExecuteOptionsParameter = util.EMPTY_DICT,
bind_arguments: Optional[_BindArguments] = None,