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

martinvonz (Martin von Zweigbergk) phabricator at mercurial-scm.org
Mon Jul 15 19:42:44 EDT 2019


martinvonz added a comment.


  In D6641#97205 <https://phab.mercurial-scm.org/D6641#97205>, @yuja wrote:
  
  >> - 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.
  
  Oops, I missed that despite the the big all-caps message. Thanks for pointing that out. I'll fix it in flight (changing `HG\x00\x0b` to `HG\x00\x0c`).

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