Mercurial > public > mercurial-scm > hg
comparison mercurial/pycompat.py @ 43087:66f2cc210a29
py3: manually import pycompat.setattr where it is needed
Continuing to eliminate the implicit import of symbols in the
Python 3 source transformer so we can eliminate it.
Differential Revision: https://phab.mercurial-scm.org/D7007
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Sun, 06 Oct 2019 14:58:42 -0400 |
parents | eef9a2d67051 |
children | 0d612db7047c |
comparison
equal
deleted
inserted
replaced
43086:bbcbb82e3589 | 43087:66f2cc210a29 |
---|---|
353 sysbytes = identity | 353 sysbytes = identity |
354 sysstr = identity | 354 sysstr = identity |
355 strurl = identity | 355 strurl = identity |
356 bytesurl = identity | 356 bytesurl = identity |
357 open = open | 357 open = open |
358 setattr = setattr | |
358 | 359 |
359 # this can't be parsed on Python 3 | 360 # this can't be parsed on Python 3 |
360 exec(b'def raisewithtb(exc, tb):\n' b' raise exc, None, tb\n') | 361 exec(b'def raisewithtb(exc, tb):\n' b' raise exc, None, tb\n') |
361 | 362 |
362 def fsencode(filename): | 363 def fsencode(filename): |