]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
remove __getattr__ from root
authorMike Bayer <mike_mp@zzzcomputing.com>
Tue, 13 May 2025 15:28:25 +0000 (11:28 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Tue, 13 May 2025 15:28:25 +0000 (11:28 -0400)
Removed ``__getattr__()`` rule from ``sqlalchemy/__init__.py`` that
appeared to be trying to correct for a previous typographical error in the
imports. This rule interferes with type checking and is removed.

Fixes: #12588
Change-Id: I682b1f3c13b842d6f43ed02d28d9774b55477516

doc/build/changelog/unreleased_20/12588.rst [new file with mode: 0644]
lib/sqlalchemy/__init__.py

diff --git a/doc/build/changelog/unreleased_20/12588.rst b/doc/build/changelog/unreleased_20/12588.rst
new file mode 100644 (file)
index 0000000..2d30a76
--- /dev/null
@@ -0,0 +1,8 @@
+.. change::
+    :tags: bug, typing
+    :tickets: 12588
+
+    Removed ``__getattr__()`` rule from ``sqlalchemy/__init__.py`` that
+    appeared to be trying to correct for a previous typographical error in the
+    imports. This rule interferes with type checking and is removed.
+
index 53c1dbb7d19410e85b526b05f19717bd9cd5a830..be099c29b3e0168c5016a67785923be889456462 100644 (file)
@@ -279,14 +279,3 @@ def __go(lcls: Any) -> None:
 
 
 __go(locals())
-
-
-def __getattr__(name: str) -> Any:
-    if name == "SingleonThreadPool":
-        _util.warn_deprecated(
-            "SingleonThreadPool was a typo in the v2 series. "
-            "Please use the correct SingletonThreadPool name.",
-            "2.0.24",
-        )
-        return SingletonThreadPool
-    raise AttributeError(f"module {__name__!r} has no attribute {name!r}")