]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
Import all legacy classes by sqlalchemy.orm.collections.* 11432/head
authorTakashi Kajinami <kajinamit@oss.nttdata.com>
Fri, 31 May 2024 12:06:08 +0000 (21:06 +0900)
committerTakashi Kajinami <kajinamit@oss.nttdata.com>
Fri, 31 May 2024 13:40:01 +0000 (22:40 +0900)
Ensure all of the legacy class names like attribute_mapped_collection
are imported by *, instead of only importing the old names partially.

Also remove repeated items from __all__ because these are redundant.

Fixes: #11435
doc/build/changelog/unreleased_20/11435.rst [new file with mode: 0644]
lib/sqlalchemy/orm/collections.py

diff --git a/doc/build/changelog/unreleased_20/11435.rst b/doc/build/changelog/unreleased_20/11435.rst
new file mode 100644 (file)
index 0000000..68eac70
--- /dev/null
@@ -0,0 +1,6 @@
+.. change::
+    :tags: bug
+    :tickets: 11435
+
+    Fixed some of the legacy class names not imported by
+    ``sqlalalchemy.orm.collections.*``.
index 394a4eaba548f807ed5ba1100c05981a20caed19..956cbd651ac0a5a12086b16e6219fab2981d4b75 100644 (file)
@@ -148,10 +148,12 @@ __all__ = [
     "keyfunc_mapping",
     "column_keyed_dict",
     "attribute_keyed_dict",
-    "column_keyed_dict",
-    "attribute_keyed_dict",
-    "MappedCollection",
     "KeyFuncDict",
+    # old names in < 2.0
+    "mapped_collection",
+    "column_mapped_collection",
+    "attribute_mapped_collection",
+    "MappedCollection",
 ]
 
 __instrumentation_mutex = threading.Lock()