D472: extensions: make wrapfunction() return a context manager

martinvonz (Martin von Zweigbergk) phabricator at mercurial-scm.org
Sun Aug 27 12:41:12 EDT 2017


martinvonz added inline comments.

INLINE COMMENTS

> yuja wrote in extensions.py:424
> When will this `__get__()` be called?
> 
> `wrapfunction()` is generally used for wrapping a free function,
> not an unbound method.

See commit message. It's for compatibility with existing callers that bind the returned value.

REPOSITORY
  rHG Mercurial

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

To: martinvonz, #hg-reviewers, quark, mjpieters
Cc: yuja, lothiraldan, quark, mjpieters, mercurial-devel


More information about the Mercurial-devel mailing list