Mercurial > hg
diff mercurial/util.py @ 43103:c95b2f40db7c
py3: stop normalizing 2nd argument of *attr() to unicode
Now that we don't byteify strings, we can stop normalizing the 2nd
string argument to getattr() and remove explicit overrides we were
using in the code base.
We no longer use some helper functions in the source transformer,
so we remove those as well.
Differential Revision: https://phab.mercurial-scm.org/D7012
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Sun, 06 Oct 2019 17:45:05 -0400 |
parents | 1f339b503a40 |
children | d783f945a701 |
line wrap: on
line diff
--- a/mercurial/util.py Sun Oct 06 14:58:41 2019 -0400 +++ b/mercurial/util.py Sun Oct 06 17:45:05 2019 -0400 @@ -623,7 +623,7 @@ def _fillbuffer(self): res = super(observedbufferedinputpipe, self)._fillbuffer() - fn = getattr(self._input._observer, r'osread', None) + fn = getattr(self._input._observer, 'osread', None) if fn: fn(res, _chunksize) @@ -634,7 +634,7 @@ def read(self, size): res = super(observedbufferedinputpipe, self).read(size) - fn = getattr(self._input._observer, r'bufferedread', None) + fn = getattr(self._input._observer, 'bufferedread', None) if fn: fn(res, size) @@ -643,7 +643,7 @@ def readline(self, *args, **kwargs): res = super(observedbufferedinputpipe, self).readline(*args, **kwargs) - fn = getattr(self._input._observer, r'bufferedreadline', None) + fn = getattr(self._input._observer, 'bufferedreadline', None) if fn: fn(res)