From patchwork Fri Jun 24 01:05:34 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: import-checker: ensure cffi is always a system module From: Augie Fackler X-Patchwork-Id: 15594 Message-Id: <45f17e51dba8b6de76c9.1466730334@imladris.local> To: mercurial-devel@mercurial-scm.org Date: Thu, 23 Jun 2016 21:05:34 -0400 # HG changeset patch # User Augie Fackler # Date 1466729137 14400 # Thu Jun 23 20:45:37 2016 -0400 # Node ID 45f17e51dba8b6de76c98ade585d8e31a7379d16 # Parent 6d96658a22b0fc1eb210c99c5629dd69fedf3006 import-checker: ensure cffi is always a system module I've had reports that this is not always happening, so whitelist it the way we whitelist other problem cases. diff --git a/contrib/import-checker.py b/contrib/import-checker.py --- a/contrib/import-checker.py +++ b/contrib/import-checker.py @@ -186,6 +186,9 @@ def list_stdlib_modules(): >>> 'cStringIO' in mods True + + >>> 'cffi' in mods + True """ for m in sys.builtin_module_names: yield m @@ -198,6 +201,8 @@ def list_stdlib_modules(): yield m for m in 'cPickle', 'datetime': # in Python (not C) on PyPy yield m + for m in ['cffi']: + yield m stdlib_prefixes = set([sys.prefix, sys.exec_prefix]) # We need to supplement the list of prefixes for the search to work # when run from within a virtualenv.