comparison contrib/import-checker.py @ 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 57875cf423c9
children a8454e846736
comparison
equal deleted inserted replaced
43083:7054fd370430 43084:c2e284cee333
28 'mercurial.hgweb.common', 28 'mercurial.hgweb.common',
29 'mercurial.hgweb.request', 29 'mercurial.hgweb.request',
30 'mercurial.i18n', 30 'mercurial.i18n',
31 'mercurial.interfaces', 31 'mercurial.interfaces',
32 'mercurial.node', 32 'mercurial.node',
33 'mercurial.pycompat',
33 # for revlog to re-export constant to extensions 34 # for revlog to re-export constant to extensions
34 'mercurial.revlogutils.constants', 35 'mercurial.revlogutils.constants',
35 'mercurial.revlogutils.flagutil', 36 'mercurial.revlogutils.flagutil',
36 # for cffi modules to re-export pure functions 37 # for cffi modules to re-export pure functions
37 'mercurial.pure.base85', 38 'mercurial.pure.base85',