[Differential] D107: util: remove dead code which used to be for old python2 versions
alex_gaynor (Alex Gaynor)
phabricator at mercurial-scm.org
Mon Jul 17 16:39:00 UTC 2017
alex_gaynor created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.
REPOSITORY
rHG Mercurial
REVISION DETAIL
https://phab.mercurial-scm.org/D107
AFFECTED FILES
mercurial/util.py
CHANGE DETAILS
Index: mercurial/util.py
===================================================================
--- mercurial/util.py
+++ mercurial/util.py
@@ -295,16 +295,10 @@
try:
buffer = buffer
except NameError:
- if not pycompat.ispy3:
- def buffer(sliceable, offset=0, length=None):
- if length is not None:
- return sliceable[offset:offset + length]
- return sliceable[offset:]
- else:
- def buffer(sliceable, offset=0, length=None):
- if length is not None:
- return memoryview(sliceable)[offset:offset + length]
- return memoryview(sliceable)[offset:]
+ def buffer(sliceable, offset=0, length=None):
+ if length is not None:
+ return memoryview(sliceable)[offset:offset + length]
+ return memoryview(sliceable)[offset:]
closefds = pycompat.osname == 'posix'
EMAIL PREFERENCES
https://phab.mercurial-scm.org/settings/panel/emailpreferences/
To: alex_gaynor, #hg-reviewers
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list