Skip to content

Commit 49a73d0

Browse files
committed
Add __future__ imports to increase compatibility with Python 3. Derive Option from object to make it a new-style class for Python 3 compatibility.
1 parent d7acd29 commit 49a73d0

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

src/bootstrap/bootstrap.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
# option. This file may not be copied, modified, or distributed
99
# except according to those terms.
1010

11-
from __future__ import print_function
11+
from __future__ import absolute_import, division, print_function
1212
import argparse
1313
import contextlib
1414
import datetime

src/bootstrap/bootstrap_test.py

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
"""Bootstrap tests"""
1212

13+
from __future__ import absolute_import, division, print_function
1314
import os
1415
import doctest
1516
import unittest

src/bootstrap/configure.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
# ignore-tidy-linelength
1313

14+
from __future__ import absolute_import, division, print_function
1415
import sys
1516
import os
1617
rust_dir = os.path.dirname(os.path.abspath(__file__))
@@ -19,7 +20,7 @@
1920
sys.path.append(os.path.join(rust_dir, "src", "bootstrap"))
2021
import bootstrap
2122

22-
class Option:
23+
class Option(object):
2324
def __init__(self, name, rustbuild, desc, value):
2425
self.name = name
2526
self.rustbuild = rustbuild

0 commit comments

Comments
 (0)