]> git.ipfire.org Git - thirdparty/psycopg.git/commit
Add constraints to the Row type variable
authorDenis Laxalde <denis.laxalde@dalibo.com>
Thu, 11 Feb 2021 11:22:32 +0000 (12:22 +0100)
committerDenis Laxalde <denis.laxalde@dalibo.com>
Thu, 11 Feb 2021 15:55:55 +0000 (16:55 +0100)
commit39287db88368b3ae0370a9049781d3e8ec5d9f41
treef35a5b4ce69c463ca7a629bf3e38a9426f3a2f7a
parentafd8bffbbd083174db546607b31c3d8879280b02
Add constraints to the Row type variable

We constrain Row to be either a Tuple[Any, ...] (for the case no row
factory is in use) or Any (otherwise).

This avoids the artificial cast() in cursor code and will make changes
in followup commits much easier.
psycopg3/psycopg3/cursor.py
psycopg3/psycopg3/proto.py