Skip to content

Commit ccaeffd

Browse files
committed
fixup! fixup! [NFC] Remove Python 2 imports from __future__
1 parent 889bfde commit ccaeffd

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+1
-95
lines changed

stdlib/public/core/FloatingPointTypes.swift.gyb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
import SwiftShims
1414

1515
%{
16-
from __future__ import division
1716
from SwiftIntTypes import all_integer_types
1817
from SwiftFloatingPointTypes import all_floating_point_types
1918

stdlib/public/core/IntegerTypes.swift.gyb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
# Utility code for later in this template
1515
#
1616

17-
from __future__ import division
1817
from SwiftIntTypes import all_integer_types, int_max_bits, should_define_truncating_bit_pattern_init
1918
from SwiftFloatingPointTypes import getFtoIBounds
2019

stdlib/public/core/SIMDConcreteOperations.swift.gyb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
//===----------------------------------------------------------------------===//
1212

1313
%{
14-
from __future__ import division
1514
from SwiftIntTypes import all_integer_types
1615
word_bits = int(CMAKE_SIZEOF_VOID_P) * 8
1716
storagescalarCounts = [2,4,8,16,32,64]

stdlib/public/core/SIMDVectorTypes.swift.gyb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
//===----------------------------------------------------------------------===//
1212

1313
%{
14-
from __future__ import division
1514
from SwiftIntTypes import all_integer_types
1615
word_bits = int(CMAKE_SIZEOF_VOID_P) * 8
1716
storagescalarCounts = [2,4,8,16,32,64]

test/Driver/Inputs/filelists/check-filelist-abc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python
1+
#!/usr/bin/env python3
22
# check-filelist-abc.py - Fake build to test driver-produced -filelists.
33
#
44
# This source file is part of the Swift.org open source project

test/lit.cfg

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
#
1919
# -----------------------------------------------------------------------------
2020

21-
from __future__ import absolute_import
2221
import os
2322
import platform
2423
import re

test/stdlib/Integers.swift.gyb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
// REQUIRES: OS=macosx
2121

2222
%{
23-
from __future__ import division
2423
word_bits = int(WORD_BITS) // 2
2524
from SwiftIntTypes import all_integer_types
2625
}%

test/stdlib/NumericParsing.swift.gyb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
// RUN: %line-directive %t/NumericParsing.swift -- %target-run %t/a.out
1818
// REQUIRES: executable_test
1919
%{
20-
from __future__ import division
2120
from SwiftIntTypes import all_integer_types
2221

2322
word_bits = int(CMAKE_SIZEOF_VOID_P)

test/stdlib/SIMDConcreteIntegers.swift.gyb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
import StdlibUnittest
2121

2222
%{
23-
from __future__ import division
2423
from SwiftIntTypes import all_integer_types
2524
word_bits = int(CMAKE_SIZEOF_VOID_P) * 8
2625
storagescalarCounts = [2,4,8,16,32,64]

test/stdlib/SIMDConcreteMasks.swift.gyb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
import StdlibUnittest
2121

2222
%{
23-
from __future__ import division
2423
from SwiftIntTypes import all_integer_types
2524
word_bits = int(CMAKE_SIZEOF_VOID_P) * 8
2625
storagescalarCounts = [2,4,8,16,32,64]

utils/backtrace-check

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@ StaticString, StaticString, UInt, flags : UInt32) -> () + 444
2222
"""
2323

2424

25-
from __future__ import absolute_import, print_function, unicode_literals
26-
2725
import argparse
2826
import re
2927
import sys

utils/build-script

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ The ultimate tool for building Swift.
1414
"""
1515

1616

17-
from __future__ import absolute_import, print_function, unicode_literals
18-
1917
import json
2018
import os
2119
import platform

utils/build_swift/build_swift/argparse/__init__.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@
1414
super-set of the argparse API and is meant to be used as a drop-in replacement.
1515
"""
1616

17-
from __future__ import absolute_import, unicode_literals
18-
1917
from argparse import (ArgumentDefaultsHelpFormatter, ArgumentError,
2018
ArgumentTypeError, FileType, HelpFormatter,
2119
Namespace, RawDescriptionHelpFormatter,

utils/build_swift/build_swift/argparse/actions.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@
1313
"""
1414

1515

16-
from __future__ import absolute_import, unicode_literals
17-
1816
import argparse
1917
import copy
2018

utils/build_swift/build_swift/argparse/parser.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,6 @@
1313
constructing complex parsers.
1414
"""
1515

16-
17-
from __future__ import absolute_import, unicode_literals
18-
1916
import argparse
2017
from contextlib import contextmanager
2118

utils/build_swift/build_swift/argparse/types.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@
1313
"""
1414

1515

16-
from __future__ import absolute_import, unicode_literals
17-
1816
import os.path
1917
import re
2018
import shlex

utils/build_swift/build_swift/cache_utils.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,6 @@
1111
Cache related utitlity functions and decorators.
1212
"""
1313

14-
15-
from __future__ import absolute_import, unicode_literals
16-
1714
import functools
1815

1916

utils/build_swift/build_swift/class_utils.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,6 @@
1212
"""
1313

1414

15-
from __future__ import absolute_import, unicode_literals
16-
17-
1815
__all__ = [
1916
'generate_repr',
2017
]

utils/build_swift/build_swift/defaults.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,6 @@
1111
Default option value definitions.
1212
"""
1313

14-
15-
from __future__ import absolute_import, unicode_literals
16-
1714
import os
1815
import platform
1916

utils/build_swift/build_swift/driver_arguments.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@
66
# See https://swift.org/LICENSE.txt for license information
77
# See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
88

9-
10-
from __future__ import absolute_import, unicode_literals
11-
129
import multiprocessing
1310
import os
1411

utils/build_swift/build_swift/migration.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@
1212
"""
1313

1414

15-
from __future__ import absolute_import, unicode_literals
16-
1715
import itertools
1816
import subprocess
1917

utils/build_swift/build_swift/presets.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@
1212
"""
1313

1414

15-
from __future__ import absolute_import, unicode_literals
16-
1715
import configparser
1816
import functools
1917
import io

utils/build_swift/build_swift/shell.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@
1212
"""
1313

1414

15-
from __future__ import absolute_import, unicode_literals
16-
1715
import abc
1816
import collections
1917
import functools

utils/build_swift/build_swift/versions.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@
1212
"""
1313

1414

15-
from __future__ import absolute_import, unicode_literals
16-
1715
import functools
1816

1917

utils/build_swift/build_swift/wrappers/__init__.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@
66
# See https://swift.org/LICENSE.txt for license information
77
# See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
88

9-
10-
from __future__ import absolute_import, unicode_literals
11-
129
from . import xcrun as _xcrun
1310

1411

utils/build_swift/build_swift/wrappers/xcrun.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,6 @@
1111
Wrapper module around the 'xcrun' command-line utility.
1212
"""
1313

14-
15-
from __future__ import absolute_import, unicode_literals
16-
1714
import functools
1815
import re
1916
import shlex

utils/build_swift/run_tests.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@
1414
"""
1515

1616

17-
from __future__ import absolute_import, unicode_literals
18-
1917
import argparse
2018
import os
2119
import sys

utils/build_swift/tests/build_swift/argparse/test_actions.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
# See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
88

99

10-
from __future__ import absolute_import, unicode_literals
11-
1210
import unittest
1311

1412
from build_swift.argparse import (

utils/build_swift/tests/build_swift/argparse/test_parser.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
# See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
88

99

10-
from __future__ import absolute_import, unicode_literals
11-
1210
import unittest
1311
from argparse import _ArgumentGroup, _MutuallyExclusiveGroup
1412

utils/build_swift/tests/build_swift/argparse/test_types.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
# See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
88

99

10-
from __future__ import absolute_import, unicode_literals
11-
1210
import os.path
1311
import platform
1412
import unittest

utils/build_swift/tests/build_swift/test_cache_utils.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
# See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
88

99

10-
from __future__ import absolute_import, unicode_literals
11-
1210
import unittest
1311

1412
from build_swift import cache_utils

utils/build_swift/tests/build_swift/test_constants.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@
77
# See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
88

99

10-
from __future__ import absolute_import
11-
from __future__ import unicode_literals
12-
1310
import os.path
1411
import unittest
1512

utils/build_swift/tests/build_swift/test_defaults.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
# See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
88

99

10-
from __future__ import absolute_import, unicode_literals
11-
1210
import unittest
1311

1412
from build_swift import defaults

utils/build_swift/tests/build_swift/test_driver_arguments.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
# See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
88

99

10-
from __future__ import absolute_import, unicode_literals
11-
1210
import os
1311
import platform
1412
import sys

utils/build_swift/tests/build_swift/test_migration.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
# See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
88

99

10-
from __future__ import absolute_import, unicode_literals
11-
1210
import platform
1311
import unittest
1412

utils/build_swift/tests/build_swift/test_presets.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
# See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
88

99

10-
from __future__ import unicode_literals
11-
1210
import configparser
1311
import os
1412
import unittest

utils/build_swift/tests/build_swift/test_shell.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
# See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
88

99

10-
from __future__ import absolute_import, unicode_literals
11-
1210
import builtins
1311
import collections
1412
import sys

utils/build_swift/tests/build_swift/test_versions.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
# See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
88

99

10-
from __future__ import absolute_import, unicode_literals
11-
1210
import unittest
1311

1412
from build_swift.versions import Version

utils/build_swift/tests/build_swift/wrappers/test_xcrun.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
# See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
88

99

10-
from __future__ import absolute_import, unicode_literals
11-
1210
import os.path
1311
import unittest
1412

utils/build_swift/tests/expected_options.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
# See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
88

99

10-
from __future__ import absolute_import, unicode_literals
11-
1210
import multiprocessing
1311

1412
from build_swift import argparse

utils/build_swift/tests/utils.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
# See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
88

99

10-
from __future__ import absolute_import, unicode_literals
11-
1210
import functools
1311
import os
1412
import platform

utils/python_lint.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@
1616
"""
1717

1818

19-
from __future__ import absolute_import, print_function, unicode_literals
20-
2119
import os
2220
import subprocess
2321
import sys

utils/swift_build_support/run_tests.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@
1414
"""
1515

1616

17-
from __future__ import absolute_import, unicode_literals
18-
1917
import os
2018
import sys
2119
import unittest

utils/swift_build_support/swift_build_support/cmake.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@
1515
# ----------------------------------------------------------------------------
1616

1717

18-
from __future__ import absolute_import, unicode_literals
19-
2018
import os
2119
import platform
2220
import re

0 commit comments

Comments
 (0)