[issue39679] functools: singledispatchmethod doesn't work with classmethod

2021-06-16 Thread Dmitry Kulazhenko
Change by Dmitry Kulazhenko : -- nosy: +EugenePY, FFY00, Viktor Roytman, glyph, levkivskyi, lukasz.langa, markgrandi, mental, ncoghlan, xtreak ___ Python tracker <https://bugs.python.org/issue39

[issue39679] functools: singledispatchmethod doesn't work with classmethod

2021-06-16 Thread Dmitry Kulazhenko
Dmitry Kulazhenko added the comment: Based on what I've read, workaround: from functools import singledispatchmethod def _register(self, cls, method=None): if hasattr(cls, "__func__"): setattr(cls, "__annotations__", cls.__func__.__annot