Mercurial > hg-stable
comparison contrib/import-checker.py @ 24669:fbdbff1b486a
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
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Wed, 08 Apr 2015 22:31:50 -0400 |
parents | 81873bb2a01d |
children | 723e364488f4 |
comparison
equal
deleted
inserted
replaced
24668:81873bb2a01d | 24669:fbdbff1b486a |
---|---|
59 yield m | 59 yield m |
60 # These get missed too | 60 # These get missed too |
61 for m in 'ctypes', 'email': | 61 for m in 'ctypes', 'email': |
62 yield m | 62 yield m |
63 yield 'builtins' # python3 only | 63 yield 'builtins' # python3 only |
64 for m in 'fcntl', 'grp', 'pwd', 'termios': # Unix only | |
65 yield m | |
64 stdlib_prefixes = set([sys.prefix, sys.exec_prefix]) | 66 stdlib_prefixes = set([sys.prefix, sys.exec_prefix]) |
65 # We need to supplement the list of prefixes for the search to work | 67 # We need to supplement the list of prefixes for the search to work |
66 # when run from within a virtualenv. | 68 # when run from within a virtualenv. |
67 for mod in (BaseHTTPServer, zlib): | 69 for mod in (BaseHTTPServer, zlib): |
68 try: | 70 try: |