]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
add attribute sphinx is breaking on
authorMike Bayer <mike_mp@zzzcomputing.com>
Fri, 17 Sep 2021 21:27:46 +0000 (17:27 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Fri, 17 Sep 2021 21:29:37 +0000 (17:29 -0400)
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)

lib/sqlalchemy/util/langhelpers.py

index 764eef8ac8bc70e065fcec18003d43440fe5e673..4b8969e1b347dac377e6fa0e9d1f7d2ea7664074 100644 (file)
@@ -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: