]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Make ARRAY generic on the item_type
authorDenis Laxalde <denis@laxalde.org>
Tue, 18 Mar 2025 16:23:01 +0000 (12:23 -0400)
committersqla-tester <sqla-tester@sqlalchemy.org>
Tue, 18 Mar 2025 16:23:01 +0000 (12:23 -0400)
commit500adfafcb782c5b22ff49e00192a2ed42ed09b6
tree94b070b197a4c4f3da145a18ee21338c5cd9278c
parenta385bd9b50676d6f330471c182793467396bcdf9
Make ARRAY generic on the item_type

Now `Column(type_=ARRAY(Integer)` is inferred as `Column[Sequence[int]]` instead as `Column[Sequence[Any]]` previously. This only works with the `type_` argument to Column, but that's not new.

This follows from a suggestion at
https://github.com/sqlalchemy/sqlalchemy/pull/12386#issuecomment-2694056069.

Related to #6810.

Closes: #12443
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/12443
Pull-request-sha: 2fff4e89cd0b72d9444ce3f3d845b152770fc55d

Change-Id: I87b828fd82d10fbf157141db3c31f0ec8149caad
lib/sqlalchemy/dialects/postgresql/array.py
lib/sqlalchemy/sql/sqltypes.py
test/typing/plain_files/dialects/postgresql/pg_stuff.py