From 80be40300dfe33bdf75f61aaa0d5c48045886bb4 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Fri, 6 Nov 2020 14:56:56 -0500 Subject: Convert to autoload_with internally Fixed bug where the now-deprecated ``autoload`` parameter was being called internally within the reflection routines when a related table were reflected. Fixes: #5684 Change-Id: I6ab439a2f49ff1ae2d3c7a15b531cbafbc3cf594 --- lib/sqlalchemy/sql/base.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib/sqlalchemy/sql') diff --git a/lib/sqlalchemy/sql/base.py b/lib/sqlalchemy/sql/base.py index 4175fe89a..999169f90 100644 --- a/lib/sqlalchemy/sql/base.py +++ b/lib/sqlalchemy/sql/base.py @@ -875,7 +875,9 @@ class Executable(Generative): """Compile and execute this :class:`.Executable`.""" e = self.bind if e is None: - label = getattr(self, "description", self.__class__.__name__) + label = ( + getattr(self, "description", None) or self.__class__.__name__ + ) msg = ( "This %s is not directly bound to a Connection or Engine. " "Use the .execute() method of a Connection or Engine " -- cgit v1.2.1