D6641: py3: source-transform only call-sites of iteritems(), not definitions

yuja (Yuya Nishihara) phabricator at mercurial-scm.org
Mon Jul 15 19:39:32 EDT 2019


yuja added a comment.


  > - a/mercurial/__init__.py
  >
  > +++ b/mercurial/__init__.py
  > @@ -225,7 +225,9 @@
  >
  >   1. It changes iteritems/values to items/values as they are not
  >   2. present in Python 3 world.
  > - elif fn in ('iteritems', 'itervalues'):
  >
  > +                elif (fn in ('iteritems', 'itervalues') and
  > +                      not (tokens[i - 1].type == token.NAME and
  > +                           tokens[i - 1].string == 'def')):
  
  Perhaps, we need to bump the BYTECODEHEADER version to recompile all
  py3 modules.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D6641/new/

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

To: martinvonz, #hg-reviewers, pulkit
Cc: yuja, mercurial-devel


More information about the Mercurial-devel mailing list