Bug 1559975 - Make directories python3 compatible r=catlee
authorMaliha Islam <mislam@mozilla.com>
Tue, 02 Jul 2019 15:47:34 +0000
changeset 540635 6b9d711108403a4f94701e3f2c5083915d6c9055
parent 540634 0f096bb21c6f22ad681cfcad7ed96cd6d6871f82
child 540636 9ab904b7a8a6afa8e19be2b8637f1b5fb70a8a70
push id11529
push userarchaeopteryx@coole-files.de
push dateThu, 04 Jul 2019 15:22:33 +0000
treeherdermozilla-beta@ebb510a784b8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerscatlee
bugs1559975
milestone69.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1559975 - Make directories python3 compatible r=catlee Differential Revision: https://phabricator.services.mozilla.com/D35257
accessible/xpcom/AccEventGen.py
browser/app/macversion.py
browser/components/migration/tests/marionette/test_refresh_firefox.py
browser/components/payments/server.py
browser/components/search/test/marionette/test_engines_on_restart.py
browser/locales/filter.py
devtools/shared/css/generated/mach_commands.py
tools/lint/py2.yml
tools/lint/py3.yml
tools/power/mach_commands.py
--- a/accessible/xpcom/AccEventGen.py
+++ b/accessible/xpcom/AccEventGen.py
@@ -1,14 +1,15 @@
 #!/usr/bin/env python
 #
 # 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 sys
 import os
 
 import buildconfig
 import mozpack.path as mozpath
 
 # The xpidl parser is not incorporated in the in-tree virtualenv.
 xpidl_dir = mozpath.join(buildconfig.topsrcdir, 'xpcom', 'idl-parser',
--- a/browser/app/macversion.py
+++ b/browser/app/macversion.py
@@ -1,14 +1,14 @@
 #!/usr/bin/python
 # 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
 from optparse import OptionParser
 import sys
 import re
 
 o = OptionParser()
 o.add_option("--buildid", dest="buildid")
 o.add_option("--version", dest="version")
 
--- a/browser/components/migration/tests/marionette/test_refresh_firefox.py
+++ b/browser/components/migration/tests/marionette/test_refresh_firefox.py
@@ -1,8 +1,9 @@
+from __future__ import absolute_import, print_function
 import os
 import shutil
 import time
 
 from marionette_harness import MarionetteTestCase
 from marionette_driver.errors import NoAlertPresentException
 
 
--- a/browser/components/payments/server.py
+++ b/browser/components/payments/server.py
@@ -1,8 +1,9 @@
+from __future__ import absolute_import
 import BaseHTTPServer
 from SimpleHTTPServer import SimpleHTTPRequestHandler
 
 
 class RequestHandler(SimpleHTTPRequestHandler, object):
     def translate_path(self, path):
         # Map autofill paths to their own directory
         autofillPath = "/formautofill"
--- a/browser/components/search/test/marionette/test_engines_on_restart.py
+++ b/browser/components/search/test/marionette/test_engines_on_restart.py
@@ -1,13 +1,14 @@
 # -*- coding: utf-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
 import textwrap
 
 from marionette_harness.marionette_test import MarionetteTestCase
 
 
 class TestEnginesOnRestart(MarionetteTestCase):
 
     def setUp(self):
--- a/browser/locales/filter.py
+++ b/browser/locales/filter.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
+
 
 def test(mod, path, entity=None):
     import re
     # ignore anything but Firefox
     if mod not in ("netwerk", "dom", "toolkit", "security/manager",
                    "devtools/client", "devtools/shared", "devtools/startup",
                    "browser",
                    "browser/extensions/formautofill",
--- a/devtools/shared/css/generated/mach_commands.py
+++ b/devtools/shared/css/generated/mach_commands.py
@@ -3,16 +3,17 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 """
 This script implements the `mach devtools-css-db` command. It runs an xpcshell
 script that uses InspectorUtils to query the CSS properties used by the browser.
 This information is used to generate the properties-db.js file.
 """
 
+from __future__ import absolute_import, print_function
 import json
 import os
 import runpy
 import sys
 import string
 import subprocess
 from mozbuild import shellutil
 from mozbuild.base import (
--- a/tools/lint/py2.yml
+++ b/tools/lint/py2.yml
@@ -1,20 +1,17 @@
 ---
 py2:
     description: Python 2 compatibility check
     include: ['.']
     exclude:
-        - accessible/xpcom/AccEventGen.py
-        - browser
         - build
         - client.py
         - config
         - configure.py
-        - devtools/shared/css/generated/mach_commands.py
         - dom
         - editor
         - gfx
         - intl
         - ipc
         - js/src
         - js/xpconnect
         - layout
@@ -42,17 +39,16 @@ py2:
         - testing/tools
         - testing/tps
         - testing/web-platform
         - toolkit
         - tools/docs
         - tools/jprof/split-profile.py
         - tools/lint
         - tools/mach_commands.py
-        - tools/power/mach_commands.py
         - tools/profiler
         - tools/rb
         - tools/update-packaging
         - xpcom
     extensions: ['py']
     support-files:
         - 'tools/lint/python/*compat*'
     type: external
--- a/tools/lint/py3.yml
+++ b/tools/lint/py3.yml
@@ -1,16 +1,14 @@
 ---
 py3:
     description: Python 3 compatibility check
     include: ['.']
     exclude:
         - browser/app
-        - browser/components
-        - browser/extensions
         - build
         - client.py
         - config
         - dom/bindings
         - dom/canvas/test
         - dom/media/test
         - gfx
         - ipc/ipdl
--- a/tools/power/mach_commands.py
+++ b/tools/power/mach_commands.py
@@ -1,13 +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 print_function
+from __future__ import print_function, absolute_import
 
 from distutils.version import StrictVersion
 
 from mach.decorators import (
     Command,
     CommandArgument,
     CommandProvider,
 )