[issue36650] Cached method implementation no longer works on Python 3.7.3
Josh Rosenberg
report at bugs.python.org
Wed Apr 17 15:28:40 EDT 2019
Josh Rosenberg <shadowranger+python at gmail.com> added the comment:
It seems highly likely this is related to #26110 which optimizes method calls by avoiding the creation of bound methods in certain circumstances, and/or the follow-up #29263.
Side-note:
bound_method = functools.partial(method, self)
is not how you create real bound methods. The correct approach (that makes a bound method identical to what the interpreter makes when necessary) for your use case is:
bound_method = types.MethodType(method, self)
----------
nosy: +josh.r
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue36650>
_______________________________________
More information about the Python-bugs-list
mailing list