]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
improved immutabledict merge_with and union
authorLucasMalor <249807577+LucasMalor@users.noreply.github.com>
Tue, 23 Dec 2025 16:28:35 +0000 (11:28 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Thu, 1 Jan 2026 18:42:11 +0000 (13:42 -0500)
commit11cb95b1d3152bc0291d278fb2d198ef3bab7a22
treedeaa9f185b2d795a40c93c16ec29850c21842382
parenta96c607cc53f16b364d5025c5a5de1470661d3c9
improved immutabledict merge_with and union

Now `immutabledict.merge_with is an alias of `immutabledict.union`,
both accept multiple arguments.
The methods now avoid doing copies of not required: if the method is
called only one `immutabledict` that's not empty it's returned.

Fixes: #13043
Closes: #13042
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/13042
Pull-request-sha: bd53e488432edd5986c28f196b0363b976b26b04

Change-Id: I8078f239e1ca36994b488b15f2fac40facf7f249
lib/sqlalchemy/ext/asyncio/engine.py
lib/sqlalchemy/orm/context.py
lib/sqlalchemy/orm/loading.py
lib/sqlalchemy/orm/strategies.py
lib/sqlalchemy/sql/annotation.py
lib/sqlalchemy/sql/base.py
lib/sqlalchemy/util/_immutabledict_cy.py
test/base/test_utils.py
test/perf/compiled_extensions/collections_.py
test/profiles.txt