From 8063cec65d1e7ad5d640bf689c01079e2d8c89ae Mon Sep 17 00:00:00 2001 From: Violet Folino Gallo <48537601+galloviolet@users.noreply.github.com> Date: Wed, 30 Jul 2025 15:43:17 -0700 Subject: [PATCH] review comments, fix type hint --- doc/build/changelog/unreleased_21/12596.rst | 7 +++++++ lib/sqlalchemy/sql/_elements_constructors.py | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 doc/build/changelog/unreleased_21/12596.rst 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]: -- 2.47.3