# HG changeset patch # User Mads Kiilerich # Date 2019-11-23 21:28:37 # Node ID d2904a0c5d4125ba2df4c91c1cbf90f671c69d7a # Parent d1f091d4b7656161f5d4c238e7f95a7d2eb0c7cc py3: use .__func__ instead of .im_func Based on 2to3 -f methodattrs ... but manually dropping a __func__ because py3 unbound methods *are* the func itself. diff --git a/kallithea/lib/auth_modules/__init__.py b/kallithea/lib/auth_modules/__init__.py --- a/kallithea/lib/auth_modules/__init__.py +++ b/kallithea/lib/auth_modules/__init__.py @@ -309,7 +309,7 @@ def loadplugin(plugin): "a subclass of %s" % (plugin, KallitheaAuthPluginBase)) plugin = pluginclass() - if plugin.plugin_settings.im_func != KallitheaAuthPluginBase.plugin_settings.im_func: + if plugin.plugin_settings.__func__ != KallitheaAuthPluginBase.plugin_settings: raise TypeError("Authentication class %s.KallitheaAuthPluginBase " "has overridden the plugin_settings method, which is " "forbidden." % plugin)