jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/434268 )
Change subject: [cleanup] Python3 < 3.3.1 isn't supported by pwb ......................................................................
[cleanup] Python3 < 3.3.1 isn't supported by pwb
Change-Id: I59b3361e8defdc0482b39607f9fe49dc88d9bd1a --- M setup.py 1 file changed, 13 insertions(+), 11 deletions(-)
Approvals: Dalba: Looks good to me, approved jenkins-bot: Verified
diff --git a/setup.py b/setup.py index 4889c42..7025e49 100644 --- a/setup.py +++ b/setup.py @@ -13,16 +13,16 @@
from setuptools import find_packages, setup
-try: - # Work around a traceback on Python < 2.7.4 and < 3.3.1 - # http://bugs.python.org/issue15881#msg170215 - import multiprocessing -except ImportError: - pass +if sys.version_info[:3] < (2, 7, 4): + try: + # Work around a traceback on Python < 2.7.4 + # http://bugs.python.org/issue15881#msg170215 + import multiprocessing + except ImportError: + pass + else: + _unused = multiprocessing # pyflakes workaround
- -# pyflakes workaround -__unused__ = (multiprocessing, )
PYTHON_VERSION = sys.version_info[:3] PY2 = (PYTHON_VERSION[0] == 2) @@ -96,7 +96,7 @@ # work around distutils hardcoded unittest dependency # work around T106512 import unittest - __unused__ += (unittest, ) + _unused = unittest if 'test' in sys.argv: import unittest2 sys.modules['unittest'] = unittest2 @@ -128,10 +128,12 @@
try: import bz2 - __unused__ += (bz2, ) except ImportError: # Use bz2file if the python is not compiled with bz2 support. dependencies.append('bz2file') +else: + _unused = bz2 +
# Some of the ui_tests depend on accessing the console window's menu # to set the console font and copy and paste, achieved using pywinauto