diff options
| author | johnthagen <johnthagen@users.noreply.github.com> | 2017-10-09 08:16:18 -0700 |
|---|---|---|
| committer | johnthagen <johnthagen@users.noreply.github.com> | 2017-10-09 08:16:18 -0700 |
| commit | 49a73d0901a60b1b77452b92372fd8629f636c2a (patch) | |
| tree | c13b9441b6bb9d5110255d97a04968a81229bdc8 /src | |
| parent | d7acd29ad5a49f6123185502d8ca92822c477f55 (diff) | |
Add __future__ imports to increase compatibility with Python 3. Derive Option from object to make it a new-style class for Python 3 compatibility.
Diffstat (limited to 'src')
| -rw-r--r-- | src/bootstrap/bootstrap.py | 2 | ||||
| -rw-r--r-- | src/bootstrap/bootstrap_test.py | 1 | ||||
| -rwxr-xr-x | src/bootstrap/configure.py | 3 |
3 files changed, 4 insertions, 2 deletions
diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py index 4a8c3dcebcb..fecb8e6a05e 100644 --- a/src/bootstrap/bootstrap.py +++ b/src/bootstrap/bootstrap.py @@ -8,7 +8,7 @@ # option. This file may not be copied, modified, or distributed # except according to those terms. -from __future__ import print_function +from __future__ import absolute_import, division, print_function import argparse import contextlib import datetime diff --git a/src/bootstrap/bootstrap_test.py b/src/bootstrap/bootstrap_test.py index 32ea4b4abe6..4db7e2ec016 100644 --- a/src/bootstrap/bootstrap_test.py +++ b/src/bootstrap/bootstrap_test.py @@ -10,6 +10,7 @@ """Bootstrap tests""" +from __future__ import absolute_import, division, print_function import os import doctest import unittest diff --git a/src/bootstrap/configure.py b/src/bootstrap/configure.py index 67337bf4421..3c161b7bb14 100755 --- a/src/bootstrap/configure.py +++ b/src/bootstrap/configure.py @@ -11,6 +11,7 @@ # ignore-tidy-linelength +from __future__ import absolute_import, division, print_function import sys import os rust_dir = os.path.dirname(os.path.abspath(__file__)) @@ -19,7 +20,7 @@ rust_dir = os.path.dirname(rust_dir) sys.path.append(os.path.join(rust_dir, "src", "bootstrap")) import bootstrap -class Option: +class Option(object): def __init__(self, name, rustbuild, desc, value): self.name = name self.rustbuild = rustbuild |
