From: Mike Bayer Date: Fri, 17 Sep 2021 21:27:46 +0000 (-0400) Subject: add attribute sphinx is breaking on X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6919a48337b3788e02389e738b5fb8a8b2d36f19;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git add attribute sphinx is breaking on the hybridmethod internal seems to be confusing a recent version of sphinx autodoc, add attribute it's searching for. Change-Id: I27f671a51f857b62337cc2374bbc87383ae9710d (cherry picked from commit c50183274728544e40e7da4fd35cf240da5df656) --- diff --git a/lib/sqlalchemy/util/langhelpers.py b/lib/sqlalchemy/util/langhelpers.py index 764eef8ac8..4b8969e1b3 100644 --- a/lib/sqlalchemy/util/langhelpers.py +++ b/lib/sqlalchemy/util/langhelpers.py @@ -1202,7 +1202,8 @@ class hybridmethod(object): """Decorate a function as cls- or instance- level.""" def __init__(self, func): - self.func = func + self.func = self.__func__ = func + self.clslevel = func def __get__(self, instance, owner): if instance is None: