]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Make ARRAY generic on the item_type 12443/head
authorDenis Laxalde <denis@laxalde.org>
Mon, 3 Mar 2025 09:30:56 +0000 (10:30 +0100)
committerDenis Laxalde <denis@laxalde.org>
Tue, 18 Mar 2025 09:50:11 +0000 (10:50 +0100)
commit2fff4e89cd0b72d9444ce3f3d845b152770fc55d
treee3afe6b4a77812a280cea5238becf7cfa069368d
parentae221534846eb095e50fce99d641f794916bf917
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.
lib/sqlalchemy/dialects/postgresql/array.py
lib/sqlalchemy/sql/sqltypes.py
test/typing/plain_files/dialects/postgresql/pg_stuff.py