[PATCH 1 of 2] import-checker: allow *.pyd based stdlib modules

Matt Harbison mharbison72 at gmail.com
Thu Apr 9 02:51:05 UTC 2015


# HG changeset patch
# User Matt Harbison <matt_harbison at yahoo.com>
# Date 1428546231 14400
#      Wed Apr 08 22:23:51 2015 -0400
# Node ID 81873bb2a01d0b746171a7e7c07667009f501d9e
# Parent  19c5b091396036e2ee63555b39a5852652b49d18
import-checker: allow *.pyd based stdlib modules

These are Windows dlls, and eliminate the following import check diffs that are
not on Unix:

  mercurial/changegroup.py mixed imports
     stdlib:    os, struct, tempfile, zlib
     relative:  bz2
  mercurial/encoding.py mixed imports
     stdlib:    locale, os
     relative:  unicodedata

diff --git a/contrib/import-checker.py b/contrib/import-checker.py
--- a/contrib/import-checker.py
+++ b/contrib/import-checker.py
@@ -90,7 +90,8 @@
             for name in files:
                 if name == '__init__.py':
                     continue
-                if not (name.endswith('.py') or name.endswith('.so')):
+                if not (name.endswith('.py') or name.endswith('.so')
+                        or name.endswith('.pyd')):
                     continue
                 full_path = os.path.join(top, name)
                 if 'site-packages' in full_path:


More information about the Mercurial-devel mailing list