D632: wrapfunction: use functools.partial if possible

martinvonz (Martin von Zweigbergk) phabricator at mercurial-scm.org
Thu Sep 7 16:53:46 EDT 2017


martinvonz added inline comments.

INLINE COMMENTS

> extensions.py:464
>      assert callable(origfn)
> -    wrap = bind(wrapper, origfn)
> +    if util.safehasattr(origfn, 'im_self'):
> +        # traditional bind, work with bound and unbound instancemethod, but

This patch makes test-py3-commands.t fail. I suspect it's because py3 has no "im_self".

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D632

To: quark, #hg-reviewers, phillco
Cc: martinvonz, phillco, mercurial-devel


More information about the Mercurial-devel mailing list