Comments
Patch
@@ -52,6 +52,7 @@ import sys
# Enable tracing. Run 'python -m win32traceutil' to debug
if getattr(sys, 'isapidllhandle', None) is not None:
import win32traceutil
+ win32traceutil.SetupForPrint
# To serve pages in local charset instead of UTF-8, remove the two lines below
import os
@@ -90,6 +91,6 @@ def __ExtensionFactory__():
return isapi_wsgi.ISAPISimpleHandler(handler)
if __name__=='__main__':
- from isapi.install import *
+ from isapi.install import ISAPIParameters, HandleCommandLine
params = ISAPIParameters()
HandleCommandLine(params)
@@ -33,12 +33,14 @@ try:
except ImportError:
try:
import sha
+ sha.sha
except ImportError:
raise SystemExit(
"Couldn't import standard hashlib (incomplete Python install).")
try:
import zlib
+ zlib.compressobj
except ImportError:
raise SystemExit(
"Couldn't import standard zlib (incomplete Python install).")
@@ -56,6 +58,7 @@ if isironpython:
else:
try:
import bz2
+ bz2.BZ2Compressor
except ImportError:
raise SystemExit(
"Couldn't import standard bz2 (incomplete Python install).")
@@ -129,6 +132,7 @@ def hasfunction(cc, funcname):
# py2exe needs to be installed to work
try:
import py2exe
+ py2exe.Distribution
py2exeloaded = True
# import py2exe's patched Distribution class
from distutils.core import Distribution
@@ -148,6 +148,7 @@ def has_cacheable_fs():
def has_lsprof():
try:
import _lsprof
+ _lsprof.Profiler
return True
except ImportError:
return False
@@ -163,7 +164,8 @@ def has_git():
@check("docutils", "Docutils text processing library")
def has_docutils():
try:
- from docutils.core import publish_cmdline
+ import docutils.core
+ docutils.core.publish_cmdline
return True
except ImportError:
return False
@@ -270,6 +272,7 @@ def has_pyflakes():
def has_pygments():
try:
import pygments
+ pygments.highlight
return True
except ImportError:
return False
@@ -288,6 +291,7 @@ def has_outer_repo():
def has_ssl():
try:
import ssl
+ ssl.wrap_socket
import OpenSSL
OpenSSL.SSL.Context
return True
@@ -7,16 +7,6 @@ run pyflakes on all tracked files ending
$ hg locate 'set:**.py or grep("^!#.*python")' 2>/dev/null \
> | xargs pyflakes 2>/dev/null | "$TESTDIR/filterpyflakes.py"
- contrib/win32/hgwebdir_wsgi.py:*: 'win32traceutil' imported but unused (glob)
- setup.py:*: 'sha' imported but unused (glob)
- setup.py:*: 'zlib' imported but unused (glob)
- setup.py:*: 'bz2' imported but unused (glob)
- setup.py:*: 'py2exe' imported but unused (glob)
- tests/hghave.py:*: '_lsprof' imported but unused (glob)
- tests/hghave.py:*: 'publish_cmdline' imported but unused (glob)
- tests/hghave.py:*: 'pygments' imported but unused (glob)
- tests/hghave.py:*: 'ssl' imported but unused (glob)
- contrib/win32/hgwebdir_wsgi.py:93: 'from isapi.install import *' used; unable to detect undefined names (glob)
tests/filterpyflakes.py:58: undefined name 'undefinedname'