From: Violet Folino Gallo <48537601+galloviolet@users.noreply.github.com> Date: Wed, 30 Jul 2025 22:43:17 +0000 (-0700) Subject: review comments, fix type hint X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8063cec65d1e7ad5d640bf689c01079e2d8c89ae;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git review comments, fix type hint --- diff --git a/doc/build/changelog/unreleased_21/12596.rst b/doc/build/changelog/unreleased_21/12596.rst new file mode 100644 index 0000000000..aa7339f04c --- /dev/null +++ b/doc/build/changelog/unreleased_21/12596.rst @@ -0,0 +1,7 @@ +.. change:: + :tags: bug, sql + :tickets: 12596 + + Updated the :func:`_sql.over` clause to allow fractional values in + :paramref:`_sql.over.range_`. Previously, only integer values + were allowed and any other values would lead to a failure. \ No newline at end of file diff --git a/lib/sqlalchemy/sql/_elements_constructors.py b/lib/sqlalchemy/sql/_elements_constructors.py index b5f3c74515..0d63a4bc59 100644 --- a/lib/sqlalchemy/sql/_elements_constructors.py +++ b/lib/sqlalchemy/sql/_elements_constructors.py @@ -1498,7 +1498,7 @@ def over( element: FunctionElement[_T], partition_by: Optional[_ByArgument] = None, order_by: Optional[_ByArgument] = None, - range_: Optional[typing_Tuple[Optional[int], Optional[int]]] = None, + range_: Optional[typing_Tuple[Optional[Any], Optional[Any]]] = None, rows: Optional[typing_Tuple[Optional[int], Optional[int]]] = None, groups: Optional[typing_Tuple[Optional[int], Optional[int]]] = None, ) -> Over[_T]: