Patchwork [5,of,9] py3: alias next to __next__ in commandserver.py

login
register
mail settings
Submitter Yuya Nishihara
Date Oct. 18, 2018, 12:32 p.m.
Message ID <1bafbc9bc7b33101f19b.1539865976@mimosa>
Download mbox | patch
Permalink /patch/36137/
State Accepted
Headers show

Comments

Yuya Nishihara - Oct. 18, 2018, 12:32 p.m.
# HG changeset patch
# User Yuya Nishihara <yuya@tcha.org>
# Date 1539669460 -7200
#      Tue Oct 16 07:57:40 2018 +0200
# Node ID 1bafbc9bc7b33101f19bd69350a8530289958468
# Parent  752fb338abc2fbe12fd6fc6a3f09c2fdb34ac88f
py3: alias next to __next__ in commandserver.py

Patch

diff --git a/mercurial/commandserver.py b/mercurial/commandserver.py
--- a/mercurial/commandserver.py
+++ b/mercurial/commandserver.py
@@ -149,6 +149,8 @@  class channeledinput(object):
             raise StopIteration
         return l
 
+    __next__ = next
+
     def __getattr__(self, attr):
         if attr in (r'isatty', r'fileno', r'tell', r'seek'):
             raise AttributeError(attr)