diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -1852,6 +1852,7 @@ def debuginstall(ui): % os.path.dirname(__file__)) try: import bdiff, mpatch, base85, osutil + dir(bdiff), dir(mpatch), dir(base85), dir(osutil) # quiet pyflakes except Exception, inst: ui.write(" %s\n" % inst) ui.write(_(" One or more extensions could not be found")) diff --git a/mercurial/hgweb/server.py b/mercurial/hgweb/server.py --- a/mercurial/hgweb/server.py +++ b/mercurial/hgweb/server.py @@ -246,6 +246,7 @@ class _httprequesthandlerssl(_httpreques try: from threading import activeCount + activeCount() # silence pyflakes _mixin = SocketServer.ThreadingMixIn except ImportError: if util.safehasattr(os, "fork"): diff --git a/tests/test-check-pyflakes.t b/tests/test-check-pyflakes.t --- a/tests/test-check-pyflakes.t +++ b/tests/test-check-pyflakes.t @@ -1,11 +1,6 @@ $ "$TESTDIR/hghave" pyflakes || exit 80 $ cd $(dirname $TESTDIR) $ pyflakes mercurial hgext 2>&1 | $TESTDIR/filterpyflakes.py - mercurial/hgweb/server.py:*: 'activeCount' imported but unused (glob) - mercurial/commands.py:*: 'base85' imported but unused (glob) - mercurial/commands.py:*: 'bdiff' imported but unused (glob) - mercurial/commands.py:*: 'mpatch' imported but unused (glob) - mercurial/commands.py:*: 'osutil' imported but unused (glob) hgext/inotify/linux/__init__.py:*: 'from _inotify import *' used; unable to detect undefined names (glob)