Mercurial > public > mercurial-scm > hg-stable
diff tests/test-lock.py @ 34726:daf12f69699f
python3: replace im_{self,func} with __{self,func}__ globally
These new names are portable back to Python 2.6.
Differential Revision: https://phab.mercurial-scm.org/D1091
author | Augie Fackler <augie@google.com> |
---|---|
date | Sat, 14 Oct 2017 12:02:15 -0400 |
parents | 68c43a416585 |
children | 5ee3146c1b20 |
line wrap: on
line diff
--- a/tests/test-lock.py Sat Oct 14 12:00:35 2017 -0400 +++ b/tests/test-lock.py Sat Oct 14 12:02:15 2017 -0400 @@ -19,7 +19,7 @@ # work around http://bugs.python.org/issue1515 if types.MethodType not in copy._deepcopy_dispatch: def _deepcopy_method(x, memo): - return type(x)(x.im_func, copy.deepcopy(x.im_self, memo), x.im_class) + return type(x)(x.__func__, copy.deepcopy(x.__self__, memo), x.im_class) copy._deepcopy_dispatch[types.MethodType] = _deepcopy_method class lockwrapper(lock.lock):