Bug 1176620 - Use absolute_import in mach; r=ahal
authorGregory Szorc <gps@mozilla.com>
Sun, 21 Jun 2015 11:56:05 -0700
changeset 280845 c0ecb2f5c0b12c0880e576ceaf9ae40014d73180
parent 280844 4ab2192fc51349b572802cf1b6d36cf812e2250a
child 280846 210526b4016b22ed788060d8d7be63c2256ec4c7
push idunknown
push userunknown
push dateunknown
reviewersahal
bugs1176620
milestone41.0a1
Bug 1176620 - Use absolute_import in mach; r=ahal To help ensure Python 3 compatibility.
python/mach/mach/base.py
python/mach/mach/commands/commandinfo.py
python/mach/mach/commands/settings.py
python/mach/mach/config.py
python/mach/mach/decorators.py
python/mach/mach/dispatcher.py
python/mach/mach/registrar.py
--- a/python/mach/mach/base.py
+++ b/python/mach/mach/base.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 unicode_literals
+from __future__ import absolute_import, unicode_literals
 
 
 class CommandContext(object):
     """Holds run-time state so it can easily be passed to command providers."""
     def __init__(self, cwd=None, settings=None, log_manager=None,
         commands=None, **kwargs):
         self.cwd = cwd
         self.settings = settings
--- a/python/mach/mach/commands/commandinfo.py
+++ b/python/mach/mach/commands/commandinfo.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, unicode_literals
+from __future__ import absolute_import, print_function, unicode_literals
 
 from mach.decorators import (
     CommandProvider,
     Command,
     CommandArgument,
 )
 
 
--- a/python/mach/mach/commands/settings.py
+++ b/python/mach/mach/commands/settings.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, unicode_literals
+from __future__ import absolute_import, print_function, unicode_literals
 
 from textwrap import TextWrapper
 
 from mach.decorators import (
     CommandProvider,
     Command,
 )
 
--- a/python/mach/mach/config.py
+++ b/python/mach/mach/config.py
@@ -20,17 +20,17 @@ locale directory is the "locale" directo
 module that defines it.
 
 People implementing ConfigProvider instances are expected to define a complete
 gettext .po and .mo file for the en-US locale. You can use the gettext-provided
 msgfmt binary to perform this conversion. Generation of the original .po file
 can be done via the write_pot() of ConfigSettings.
 """
 
-from __future__ import unicode_literals
+from __future__ import absolute_import, unicode_literals
 
 import collections
 import gettext
 import os
 import sys
 
 if sys.version_info[0] == 3:
     from configparser import RawConfigParser
--- a/python/mach/mach/decorators.py
+++ b/python/mach/mach/decorators.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 unicode_literals
+from __future__ import absolute_import, unicode_literals
 
 import argparse
 import collections
 import inspect
 import types
 
 from .base import (
     MachError,
--- a/python/mach/mach/dispatcher.py
+++ b/python/mach/mach/dispatcher.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 unicode_literals
+from __future__ import absolute_import, unicode_literals
 
 import argparse
 import difflib
 import sys
 
 from operator import itemgetter
 
 from .base import (
--- a/python/mach/mach/registrar.py
+++ b/python/mach/mach/registrar.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 unicode_literals
+from __future__ import absolute_import, unicode_literals
 
 from .base import MachError
 
 INVALID_COMMAND_CONTEXT = r'''
 It looks like you tried to run a mach command from an invalid context. The %s
 command failed to meet the following conditions: %s
 
 Run |mach help| to show a list of all commands available to the current context.