# HG changeset patch # User Edwin Gao # Date 1563299345 0 # Node ID 6a5f9886c13f3fff929987fc091a3f890b01766a # Parent 7e3f87b701ca4bd2fc8ace38d988bf89a36eba03 Bug 1559975 - fix python2 linter errors for testing/tps r=ahal Differential Revision: https://phabricator.services.mozilla.com/D37779 diff --git a/testing/tps/create_venv.py b/testing/tps/create_venv.py --- a/testing/tps/create_venv.py +++ b/testing/tps/create_venv.py @@ -4,16 +4,18 @@ # file, You can obtain one at http://mozilla.org/MPL/2.0/. """ This scripts sets up a virtualenv and installs TPS into it. It's probably best to specify a path NOT inside the repo, otherwise all the virtualenv files will show up in e.g. hg status. """ +from __future__ import absolute_import, print_function + import optparse import os import shutil import subprocess import sys import urllib2 import zipfile diff --git a/testing/tps/setup.py b/testing/tps/setup.py --- a/testing/tps/setup.py +++ b/testing/tps/setup.py @@ -1,12 +1,13 @@ # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. +from __future__ import absolute_import from setuptools import setup, find_packages import sys version = '0.5' deps = ['httplib2 == 0.9.2', 'mozfile >= 1.2', diff --git a/testing/tps/tps/__init__.py b/testing/tps/tps/__init__.py --- a/testing/tps/tps/__init__.py +++ b/testing/tps/tps/__init__.py @@ -1,6 +1,8 @@ # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. +from __future__ import absolute_import + from . firefoxrunner import TPSFirefoxRunner from . testrunner import TPSTestRunner diff --git a/testing/tps/tps/cli.py b/testing/tps/tps/cli.py --- a/testing/tps/tps/cli.py +++ b/testing/tps/tps/cli.py @@ -1,12 +1,14 @@ # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. +from __future__ import absolute_import, print_function + import json import optparse import os import re import sys from threading import RLock from tps import TPSTestRunner diff --git a/testing/tps/tps/firefoxrunner.py b/testing/tps/tps/firefoxrunner.py --- a/testing/tps/tps/firefoxrunner.py +++ b/testing/tps/tps/firefoxrunner.py @@ -1,12 +1,13 @@ # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. +from __future__ import absolute_import, print_function import copy import httplib2 import os import mozfile import mozinstall from mozprofile import Profile diff --git a/testing/tps/tps/phase.py b/testing/tps/tps/phase.py --- a/testing/tps/tps/phase.py +++ b/testing/tps/tps/phase.py @@ -1,12 +1,14 @@ # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. +from __future__ import absolute_import + import re class TPSTestPhase(object): lineRe = re.compile( r'^(.*?)test phase (?P[^\s]+): (?P.*)$') def __init__(self, phase, profile, testname, testpath, logfile, env, diff --git a/testing/tps/tps/testrunner.py b/testing/tps/tps/testrunner.py --- a/testing/tps/tps/testrunner.py +++ b/testing/tps/tps/testrunner.py @@ -1,12 +1,14 @@ # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. +from __future__ import absolute_import, print_function + import json import os import platform import random import re import tempfile import time import traceback diff --git a/tools/lint/py2.yml b/tools/lint/py2.yml --- a/tools/lint/py2.yml +++ b/tools/lint/py2.yml @@ -24,17 +24,16 @@ py2: - nsprpub - other-licenses - security - servo - testing/gtest - testing/mochitest - testing/mozharness - testing/tools - - testing/tps - testing/web-platform - toolkit - tools/power/mach_commands.py - tools/profiler - tools/rb - tools/update-packaging - xpcom extensions: ['py']