[PATCH 03 of 10] import-checker: allow importing symbols from pure modules

Yuya Nishihara yuya at tcha.org
Sun May 28 09:05:08 EDT 2017


# HG changeset patch
# User Yuya Nishihara <yuya at tcha.org>
# Date 1493731497 -32400
#      Tue May 02 22:24:57 2017 +0900
# Node ID 0b6c894cdedba02033c1238e7106d10244eaf881
# Parent  1402f57f72fef5df62d6d2200db567ea39f6eb04
import-checker: allow importing symbols from pure modules

This allows us to re-export pure functions from cffi modules:

  # mercurial/cffi/base85.py
  from ..pure.base85 import *

diff --git a/contrib/import-checker.py b/contrib/import-checker.py
--- a/contrib/import-checker.py
+++ b/contrib/import-checker.py
@@ -22,6 +22,13 @@ allowsymbolimports = (
     'mercurial.hgweb.request',
     'mercurial.i18n',
     'mercurial.node',
+    # for cffi modules to re-export pure functions
+    'mercurial.pure.base85',
+    'mercurial.pure.bdiff',
+    'mercurial.pure.diffhelpers',
+    'mercurial.pure.mpatch',
+    'mercurial.pure.osutil',
+    'mercurial.pure.parsers',
 )
 
 # Whitelist of symbols that can be directly imported.


More information about the Mercurial-devel mailing list