You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
plone.reload.xreload._update_class assumes that Python 3 does not use method objects on class access. However, this is wrong for classmethods: accessing a @classmethod on a class returns a method object (not a function).
The _update_method function uses `six.get_unbound_function" in order to get a function. However, for Python 3, this is the identity function; thus, is does not change a method into a function object.
The upcoming dm.plonepatches.reload will use an auxiliary function def func(f): return getattr(f, "__func__", f) to transform a function or method object into the associated function. This works reliably for Python 2.7 and Python 3.
The text was updated successfully, but these errors were encountered:
plone.reload.xreload._update_class
assumes that Python 3 does not use method objects on class access. However, this is wrong forclassmethod
s: accessing a@classmethod
on a class returns a method object (not a function).The
_update_method
function uses `six.get_unbound_function" in order to get a function. However, for Python 3, this is the identity function; thus, is does not change a method into a function object.The upcoming
dm.plonepatches.reload
will use an auxiliary functiondef func(f): return getattr(f, "__func__", f)
to transform a function or method object into the associated function. This works reliably for Python 2.7 and Python 3.The text was updated successfully, but these errors were encountered: