]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
use read-only Mapping for values dictionary type
authorMike Bayer <mike_mp@zzzcomputing.com>
Sun, 26 Feb 2023 20:34:57 +0000 (15:34 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Mon, 27 Feb 2023 01:09:07 +0000 (20:09 -0500)
commit3b8123965bca6b854ccdeca79713b27136233d9a
treee39e4595e54f96667a68b9f277ad61fd81160c9b
parent16d3dad4490fc4915096b7963f21e6b591b15ba7
use read-only Mapping for values dictionary type

Improved typing for the mapping passed to :meth:`.UpdateBase.values` to be
more open-ended about collection type, by indicating read-only ``Mapping``
instead of writeable ``Dict``, the latter of which would error out under
typing tools on too limited of a key type.

Fixes: #9376
Change-Id: Ib7fdbba05ca7e1082409e1b5616e6a010262f032
doc/build/changelog/unreleased_20/9376.rst [new file with mode: 0644]
lib/sqlalchemy/sql/_typing.py
lib/sqlalchemy/sql/dml.py
test/ext/mypy/plain_files/dml.py [new file with mode: 0644]