summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/orm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sqlalchemy/orm')
-rw-r--r--lib/sqlalchemy/orm/scoping.py6
-rw-r--r--lib/sqlalchemy/orm/session.py7
2 files changed, 7 insertions, 6 deletions
diff --git a/lib/sqlalchemy/orm/scoping.py b/lib/sqlalchemy/orm/scoping.py
index 19217ec32..83ce6e44e 100644
--- a/lib/sqlalchemy/orm/scoping.py
+++ b/lib/sqlalchemy/orm/scoping.py
@@ -70,7 +70,7 @@ if TYPE_CHECKING:
from ..sql.base import Executable
from ..sql.elements import ClauseElement
from ..sql.roles import TypedColumnsClauseRole
- from ..sql.selectable import ForUpdateArg
+ from ..sql.selectable import ForUpdateParameter
from ..sql.selectable import TypedReturnsRows
_T = TypeVar("_T", bound=Any)
@@ -889,7 +889,7 @@ class scoped_session(Generic[_S]):
*,
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,
@@ -1592,7 +1592,7 @@ class scoped_session(Generic[_S]):
self,
instance: object,
attribute_names: Optional[Iterable[str]] = None,
- with_for_update: Optional[ForUpdateArg] = None,
+ with_for_update: ForUpdateParameter = None,
) -> None:
r"""Expire and refresh attributes on the given instance.
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,