]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
rename MappedCollection and related
authorMike Bayer <mike_mp@zzzcomputing.com>
Fri, 7 Oct 2022 18:03:16 +0000 (14:03 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Tue, 11 Oct 2022 14:23:08 +0000 (10:23 -0400)
commit4ef7bcf580844a431c5354896e954ca4ce1042ce
treea57cbd80bc367ff2296bb8338188a364f9e0b66b
parent231897cf10d731c6bab4bca562374c60558a0177
rename MappedCollection and related

For consistency with the prominent ORM concept :class:`_orm.Mapped`, the
names of the dictionary-oriented collections,
:func:`_orm.attribute_mapped_collection`,
:func:`_orm.column_mapped_collection`, and :class:`_orm.MappedCollection`,
are changed to :func:`_orm.attribute_keyed_dict`,
:func:`_orm.column_keyed_dict` and :class:`_orm.KeyFuncDict`, using the
phrase "dict" to minimize any confusion against the term "mapped". The old
names will remain indefinitely with no schedule for removal.

Docs here are also updated for typing as we can type
these collections as ``Mapped[dict[str, cls]]``, don't need
KeyFuncDict / MappedCollection for these

Fixes: #8608
Change-Id: Ib5cf63e0aef1c389e023a75e454bb21f9d779b54
23 files changed:
doc/build/changelog/unreleased_20/8608.rst [new file with mode: 0644]
doc/build/orm/collection_api.rst
doc/build/orm/extensions/associationproxy.rst
examples/adjacency_list/adjacency_list.py
examples/association/dict_of_sets_with_default.py
examples/versioned_rows/versioned_map.py
examples/vertical/dictlike-polymorphic.py
examples/vertical/dictlike.py
lib/sqlalchemy/orm/__init__.py
lib/sqlalchemy/orm/collections.py
lib/sqlalchemy/orm/mapped_collection.py
test/ext/mypy/plain_files/keyfunc_dict.py [new file with mode: 0644]
test/ext/mypy/plain_files/trad_relationship_uselist.py
test/ext/test_associationproxy.py
test/orm/declarative/test_tm_future_annotations.py
test/orm/declarative/test_typed_mapping.py
test/orm/test_attributes.py
test/orm/test_cascade.py
test/orm/test_collection.py
test/orm/test_deprecations.py
test/orm/test_merge.py
test/orm/test_pickled.py
test/orm/test_validators.py