changeset 43084:c2e284cee333

import-checker: allow symbol imports from mercurial.pycompat Currently, the source transformer inserts `from mercurial.pycompat import delattr, getattr, hasattr, setattr, open, unicode` to the top of every file. As part of getting rid of the source transformer, we'll need to have source code call these wrappers directly. Rather than rewrite all call sites to call pycompat.*, I think it makes sense to import needed symbols via explicit imports. That requires loosening the import checker to allow this. Differential Revision: https://phab.mercurial-scm.org/D7004
author Gregory Szorc <gregory.szorc@gmail.com>
date Sun, 06 Oct 2019 13:17:19 -0400
parents 7054fd370430
children eef9a2d67051
files contrib/import-checker.py
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/contrib/import-checker.py	Sun Oct 06 14:13:03 2019 -0700
+++ b/contrib/import-checker.py	Sun Oct 06 13:17:19 2019 -0400
@@ -30,6 +30,7 @@
     'mercurial.i18n',
     'mercurial.interfaces',
     'mercurial.node',
+    'mercurial.pycompat',
     # for revlog to re-export constant to extensions
     'mercurial.revlogutils.constants',
     'mercurial.revlogutils.flagutil',