]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
repair mapper sort
authorMike Bayer <mike_mp@zzzcomputing.com>
Thu, 20 Jan 2022 14:31:42 +0000 (09:31 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Thu, 20 Jan 2022 14:33:20 +0000 (09:33 -0500)
commita3ee2a731b4a3e4177293104e47c4cf1fc7b9a11
tree5d42b7c47a3ffa49b14ee732fccdc19dbed2f72c
parent541debf1e381d639bc3da78de78ab7282bfb57d3
repair mapper sort

Fixed issue in :meth:`_orm.Session.bulk_save_mappings` where the sorting
that takes place when the ``preserve_order`` parameter is set to False
would sort partially on ``Mapper`` objects, which is rejected in Python
3.11.

Also uses typing_extensions for NotRequired as this symbol
does not seem to be in Python 3.11.0a4 yet. (2.0 only)

Fixes: #7591
Change-Id: I24a62f2322ad7dac5d8e4a00853f8a9408877c9c
(cherry picked from commit 8d3d934c16a91adcdc7f374c01761b18fbba74d9)
doc/build/changelog/unreleased_14/7591.rst [new file with mode: 0644]
lib/sqlalchemy/orm/session.py