]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
change state.load_options to a tuple
authorMike Bayer <mike_mp@zzzcomputing.com>
Tue, 11 Jan 2022 03:11:50 +0000 (22:11 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Tue, 11 Jan 2022 14:27:58 +0000 (09:27 -0500)
commit3b77079321d35f63103ead5092d9eeeb5ef546ca
tree440d9e6d0f9e8ca92e57ba6ad5c48df42357a91f
parent4e9fe6e3b7a72fc3b116403ea9b27e847b5bf186
change state.load_options to a tuple

having this be an immutable sequence is safer
and possibly lower overhead.

The change here went in with no issues save
for tests that asserted it was a set.
InstanceState.load_options is only referred
towards when the object is first loaded, and then
within the logic that emits an object refresh
as well as within a lazy loader.   it's only
accessed as a whole collection.

Fixes: #7558
Change-Id: Id1adbec0f93bcfbfc934ec9cd39e71e74727845d
lib/sqlalchemy/orm/context.py
lib/sqlalchemy/orm/state.py
lib/sqlalchemy/orm/strategies.py
test/orm/inheritance/test_poly_loading.py
test/orm/test_merge.py