# HG changeset patch # User Matt Harbison # Date 1428546710 14400 # Node ID fbdbff1b486a5b9c12c0cebf4d172be90a2bb5f8 # Parent 81873bb2a01d0b746171a7e7c07667009f501d9e import-checker: force 'fcntl', 'grp', 'pwd', and 'termios' to stdlib modules These are Unix only, and caused these additional warnings on Windows if they aren't hardcoded as stdlib: mercurial/posix.py mixed imports stdlib: errno, getpass, os, socket, stat, sys, tempfile relative: grp, pwd, unicodedata mercurial/posix.py mixed imports stdlib: re relative: fcntl mercurial/posix.py mixed imports stdlib: array relative: termios Additionally, this was missing on Windows: mercurial/crecord.py mixed imports stdlib: fcntl, termios relative: curses https://docs.python.org/2/library/fcntl.html https://docs.python.org/2/library/grp.html https://docs.python.org/2/library/pwd.html https://docs.python.org/2/library/termios.html diff -r 81873bb2a01d -r fbdbff1b486a contrib/import-checker.py --- a/contrib/import-checker.py Wed Apr 08 22:23:51 2015 -0400 +++ b/contrib/import-checker.py Wed Apr 08 22:31:50 2015 -0400 @@ -61,6 +61,8 @@ for m in 'ctypes', 'email': yield m yield 'builtins' # python3 only + for m in 'fcntl', 'grp', 'pwd', 'termios': # Unix only + 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.