diff options
author | Yilei Yang <yileiyang@google.com> | 2022-06-08 09:29:25 -0700 |
---|---|---|
committer | Copybara-Service <copybara-worker@google.com> | 2022-06-08 09:29:59 -0700 |
commit | 41a9caa830d4e55fc4a373ead8d6dac103be9615 (patch) | |
tree | 5e9d34862d00758685a14278607990dca5a7ac84 | |
parent | 6b3c1b8bdd9371d263793b0a4e5480802fd40f8c (diff) | |
download | absl-py-41a9caa830d4e55fc4a373ead8d6dac103be9615.tar.gz |
Remove the unnecessary Python 2 related future imports.
PiperOrigin-RevId: 453697925
Change-Id: I24a9fbbe2a690d7101b7190f4b4976d16bd0942f
38 files changed, 0 insertions, 153 deletions
diff --git a/absl/app.py b/absl/app.py index 037f75c..196a951 100644 --- a/absl/app.py +++ b/absl/app.py @@ -25,10 +25,6 @@ call app.run(main). For example: app.run(main) """ -from __future__ import absolute_import -from __future__ import division -from __future__ import print_function - import collections import errno import os diff --git a/absl/command_name.py b/absl/command_name.py index 3bf9fad..1996493 100644 --- a/absl/command_name.py +++ b/absl/command_name.py @@ -14,10 +14,6 @@ """A tiny stand alone library to change the kernel process name on Linux.""" -from __future__ import absolute_import -from __future__ import division -from __future__ import print_function - import os import sys diff --git a/absl/flags/_defines.py b/absl/flags/_defines.py index 4494c3b..a102652 100644 --- a/absl/flags/_defines.py +++ b/absl/flags/_defines.py @@ -17,10 +17,6 @@ Do NOT import this module directly. Import the flags package and use the aliases defined at the package level instead. """ -from __future__ import absolute_import -from __future__ import division -from __future__ import print_function - import sys import types diff --git a/absl/flags/_exceptions.py b/absl/flags/_exceptions.py index 254eb9b..0ca2777 100644 --- a/absl/flags/_exceptions.py +++ b/absl/flags/_exceptions.py @@ -18,10 +18,6 @@ Do NOT import this module directly. Import the flags package and use the aliases defined at the package level instead. """ -from __future__ import absolute_import -from __future__ import division -from __future__ import print_function - import sys from absl.flags import _helpers diff --git a/absl/flags/_helpers.py b/absl/flags/_helpers.py index 37ae360..96f0a85 100644 --- a/absl/flags/_helpers.py +++ b/absl/flags/_helpers.py @@ -14,10 +14,6 @@ """Internal helper functions for Abseil Python flags library.""" -from __future__ import absolute_import -from __future__ import division -from __future__ import print_function - import collections import os import re diff --git a/absl/flags/_validators.py b/absl/flags/_validators.py index af66050..26639c5 100644 --- a/absl/flags/_validators.py +++ b/absl/flags/_validators.py @@ -32,10 +32,6 @@ Do NOT import this module directly. Import the flags package and use the aliases defined at the package level instead. """ -from __future__ import absolute_import -from __future__ import division -from __future__ import print_function - import warnings from absl.flags import _exceptions diff --git a/absl/flags/_validators_classes.py b/absl/flags/_validators_classes.py index d8996e0..2881499 100644 --- a/absl/flags/_validators_classes.py +++ b/absl/flags/_validators_classes.py @@ -18,10 +18,6 @@ Do NOT import this module. DO NOT use anything from this module. They are private APIs. """ -from __future__ import absolute_import -from __future__ import division -from __future__ import print_function - from absl.flags import _exceptions diff --git a/absl/flags/argparse_flags.py b/absl/flags/argparse_flags.py index 4f78f50..69e4c8a 100644 --- a/absl/flags/argparse_flags.py +++ b/absl/flags/argparse_flags.py @@ -88,10 +88,6 @@ There are several differences between absl.flags and argparse_flags: 3) argparse_flags supports `-h`; absl.app does not. """ -from __future__ import absolute_import -from __future__ import division -from __future__ import print_function - import argparse import sys diff --git a/absl/flags/tests/_flag_test.py b/absl/flags/tests/_flag_test.py index 492f117..1625289 100644 --- a/absl/flags/tests/_flag_test.py +++ b/absl/flags/tests/_flag_test.py @@ -17,10 +17,6 @@ Most of the Flag classes are covered in the flags_test.py. """ -from __future__ import absolute_import -from __future__ import division -from __future__ import print_function - import copy import enum import pickle diff --git a/absl/flags/tests/_helpers_test.py b/absl/flags/tests/_helpers_test.py index 4746a79..2697d1c 100644 --- a/absl/flags/tests/_helpers_test.py +++ b/absl/flags/tests/_helpers_test.py @@ -14,10 +14,6 @@ """Unittests for helpers module.""" -from __future__ import absolute_import -from __future__ import division -from __future__ import print_function - import sys from absl.flags import _helpers diff --git a/absl/flags/tests/_validators_test.py b/absl/flags/tests/_validators_test.py index f724813..1cccf53 100644 --- a/absl/flags/tests/_validators_test.py +++ b/absl/flags/tests/_validators_test.py @@ -18,10 +18,6 @@ This file tests that each flag validator called when it should be, and that failed validator will throw an exception, etc. """ -from __future__ import absolute_import -from __future__ import division -from __future__ import print_function - import warnings diff --git a/absl/flags/tests/argparse_flags_test_helper.py b/absl/flags/tests/argparse_flags_test_helper.py index 8cf42e6..613c896 100644 --- a/absl/flags/tests/argparse_flags_test_helper.py +++ b/absl/flags/tests/argparse_flags_test_helper.py @@ -14,10 +14,6 @@ """Test helper for argparse_flags_test.""" -from __future__ import absolute_import -from __future__ import division -from __future__ import print_function - import os import random diff --git a/absl/flags/tests/flags_formatting_test.py b/absl/flags/tests/flags_formatting_test.py index bb547ce..ef55850 100644 --- a/absl/flags/tests/flags_formatting_test.py +++ b/absl/flags/tests/flags_formatting_test.py @@ -12,10 +12,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -from __future__ import absolute_import -from __future__ import division -from __future__ import print_function - from absl import flags from absl.flags import _helpers from absl.testing import absltest diff --git a/absl/flags/tests/flags_unicode_literals_test.py b/absl/flags/tests/flags_unicode_literals_test.py index e8ed5bf..1f72f23 100644 --- a/absl/flags/tests/flags_unicode_literals_test.py +++ b/absl/flags/tests/flags_unicode_literals_test.py @@ -14,11 +14,6 @@ """Test the use of flags when from __future__ import unicode_literals is on.""" -from __future__ import absolute_import -from __future__ import division -from __future__ import print_function -from __future__ import unicode_literals - from absl import flags from absl.testing import absltest diff --git a/absl/flags/tests/module_bar.py b/absl/flags/tests/module_bar.py index 8714d2e..51dffa3 100644 --- a/absl/flags/tests/module_bar.py +++ b/absl/flags/tests/module_bar.py @@ -18,10 +18,6 @@ The purpose of this module is to define a few flags. We want to make sure the unit tests for flags.py involve more than one module. """ -from __future__ import absolute_import -from __future__ import division -from __future__ import print_function - from absl import flags from absl.flags import _helpers diff --git a/absl/flags/tests/module_baz.py b/absl/flags/tests/module_baz.py index 7199516..9bf03fd 100644 --- a/absl/flags/tests/module_baz.py +++ b/absl/flags/tests/module_baz.py @@ -18,10 +18,6 @@ The purpose of this module is to test the behavior of flags that are defined before main() executes. """ -from __future__ import absolute_import -from __future__ import division -from __future__ import print_function - from absl import flags FLAGS = flags.FLAGS diff --git a/absl/flags/tests/module_foo.py b/absl/flags/tests/module_foo.py index a1a2573..649047c 100644 --- a/absl/flags/tests/module_foo.py +++ b/absl/flags/tests/module_foo.py @@ -19,10 +19,6 @@ other flags as being important. We want to make sure the unit tests for flags.py involve more than one module. """ -from __future__ import absolute_import -from __future__ import division -from __future__ import print_function - from absl import flags from absl.flags import _helpers from absl.flags.tests import module_bar diff --git a/absl/logging/tests/converter_test.py b/absl/logging/tests/converter_test.py index bdc893a..2c95c4f 100644 --- a/absl/logging/tests/converter_test.py +++ b/absl/logging/tests/converter_test.py @@ -14,10 +14,6 @@ """Tests for converter.py.""" -from __future__ import absolute_import -from __future__ import division -from __future__ import print_function - import logging from absl import logging as absl_logging diff --git a/absl/logging/tests/verbosity_flag_test.py b/absl/logging/tests/verbosity_flag_test.py index 4609e64..ea9944d 100644 --- a/absl/logging/tests/verbosity_flag_test.py +++ b/absl/logging/tests/verbosity_flag_test.py @@ -14,10 +14,6 @@ """Tests -v/--verbosity flag and logging.root level's sync behavior.""" -from __future__ import absolute_import -from __future__ import division -from __future__ import print_function - import logging assert logging.root.getEffectiveLevel() == logging.WARN, ( diff --git a/absl/testing/_bazelize_command.py b/absl/testing/_bazelize_command.py index fdf6eb6..9380d27 100644 --- a/absl/testing/_bazelize_command.py +++ b/absl/testing/_bazelize_command.py @@ -14,10 +14,6 @@ """Internal helper for running tests on Windows Bazel.""" -from __future__ import absolute_import -from __future__ import division -from __future__ import print_function - import os from absl import flags diff --git a/absl/testing/_pretty_print_reporter.py b/absl/testing/_pretty_print_reporter.py index ef03934..b0dde07 100644 --- a/absl/testing/_pretty_print_reporter.py +++ b/absl/testing/_pretty_print_reporter.py @@ -14,10 +14,6 @@ """TestResult implementing default output for test execution status.""" -from __future__ import absolute_import -from __future__ import division -from __future__ import print_function - import unittest diff --git a/absl/testing/flagsaver.py b/absl/testing/flagsaver.py index 7fe95fe..f87dbb1 100644 --- a/absl/testing/flagsaver.py +++ b/absl/testing/flagsaver.py @@ -59,10 +59,6 @@ exception will be raised. However if you *add* a flag after saving flag values, and then restore flag values, the added flag will be deleted with no errors. """ -from __future__ import absolute_import -from __future__ import division -from __future__ import print_function - import functools import inspect diff --git a/absl/testing/tests/absltest_fail_fast_test.py b/absl/testing/tests/absltest_fail_fast_test.py index dc967f9..efde8a0 100644 --- a/absl/testing/tests/absltest_fail_fast_test.py +++ b/absl/testing/tests/absltest_fail_fast_test.py @@ -14,10 +14,6 @@ """Tests for test fail fast protocol.""" -from __future__ import absolute_import -from __future__ import division -from __future__ import print_function - import subprocess from absl import logging diff --git a/absl/testing/tests/absltest_fail_fast_test_helper.py b/absl/testing/tests/absltest_fail_fast_test_helper.py index 339a569..a6ffb62 100644 --- a/absl/testing/tests/absltest_fail_fast_test_helper.py +++ b/absl/testing/tests/absltest_fail_fast_test_helper.py @@ -14,10 +14,6 @@ """A helper test program for absltest_fail_fast_test.""" -from __future__ import absolute_import -from __future__ import division -from __future__ import print_function - import os import sys diff --git a/absl/testing/tests/absltest_filtering_test.py b/absl/testing/tests/absltest_filtering_test.py index 30a81f6..3bbb219 100644 --- a/absl/testing/tests/absltest_filtering_test.py +++ b/absl/testing/tests/absltest_filtering_test.py @@ -13,10 +13,6 @@ # limitations under the License. """Tests for test filtering protocol.""" -from __future__ import absolute_import -from __future__ import division -from __future__ import print_function - import subprocess import sys diff --git a/absl/testing/tests/absltest_filtering_test_helper.py b/absl/testing/tests/absltest_filtering_test_helper.py index 2b741ed..b8bc55f 100644 --- a/absl/testing/tests/absltest_filtering_test_helper.py +++ b/absl/testing/tests/absltest_filtering_test_helper.py @@ -14,10 +14,6 @@ """A helper test program for absltest_filtering_test.""" -from __future__ import absolute_import -from __future__ import division -from __future__ import print_function - import os import sys diff --git a/absl/testing/tests/absltest_randomization_test.py b/absl/testing/tests/absltest_randomization_test.py index 75a3868..e73dfce 100644 --- a/absl/testing/tests/absltest_randomization_test.py +++ b/absl/testing/tests/absltest_randomization_test.py @@ -14,10 +14,6 @@ """Tests for test randomization.""" -from __future__ import absolute_import -from __future__ import division -from __future__ import print_function - import random import subprocess diff --git a/absl/testing/tests/absltest_randomization_testcase.py b/absl/testing/tests/absltest_randomization_testcase.py index 18b20ff..ac2cea0 100644 --- a/absl/testing/tests/absltest_randomization_testcase.py +++ b/absl/testing/tests/absltest_randomization_testcase.py @@ -14,10 +14,6 @@ """Stub tests, only for use in absltest_randomization_test.py.""" -from __future__ import absolute_import -from __future__ import division -from __future__ import print_function - import os import sys diff --git a/absl/testing/tests/absltest_sharding_test.py b/absl/testing/tests/absltest_sharding_test.py index 6411971..9bbb903 100644 --- a/absl/testing/tests/absltest_sharding_test.py +++ b/absl/testing/tests/absltest_sharding_test.py @@ -14,10 +14,6 @@ """Tests for test sharding protocol.""" -from __future__ import absolute_import -from __future__ import division -from __future__ import print_function - import os import subprocess diff --git a/absl/testing/tests/absltest_sharding_test_helper.py b/absl/testing/tests/absltest_sharding_test_helper.py index 7b2f20e..57a924c 100644 --- a/absl/testing/tests/absltest_sharding_test_helper.py +++ b/absl/testing/tests/absltest_sharding_test_helper.py @@ -14,10 +14,6 @@ """A helper test program for absltest_sharding_test.""" -from __future__ import absolute_import -from __future__ import division -from __future__ import print_function - import sys from absl.testing import absltest diff --git a/absl/testing/tests/absltest_test_helper.py b/absl/testing/tests/absltest_test_helper.py index c6b2465..3a72184 100644 --- a/absl/testing/tests/absltest_test_helper.py +++ b/absl/testing/tests/absltest_test_helper.py @@ -14,10 +14,6 @@ """Helper binary for absltest_test.py.""" -from __future__ import absolute_import -from __future__ import division -from __future__ import print_function - import os import tempfile import unittest diff --git a/absl/testing/tests/flagsaver_test.py b/absl/testing/tests/flagsaver_test.py index 3439a32..e98cd06 100644 --- a/absl/testing/tests/flagsaver_test.py +++ b/absl/testing/tests/flagsaver_test.py @@ -13,10 +13,6 @@ # limitations under the License. """Tests for flagsaver.""" -from __future__ import absolute_import -from __future__ import division -from __future__ import print_function - from absl import flags from absl.testing import absltest from absl.testing import flagsaver diff --git a/absl/testing/tests/xml_reporter_helper_test.py b/absl/testing/tests/xml_reporter_helper_test.py index 661bbdc..af3c63d 100644 --- a/absl/testing/tests/xml_reporter_helper_test.py +++ b/absl/testing/tests/xml_reporter_helper_test.py @@ -12,10 +12,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -from __future__ import absolute_import -from __future__ import division -from __future__ import print_function - import random from absl import flags diff --git a/absl/testing/xml_reporter.py b/absl/testing/xml_reporter.py index da56e39..5996ce2 100644 --- a/absl/testing/xml_reporter.py +++ b/absl/testing/xml_reporter.py @@ -14,10 +14,6 @@ """A Python test reporter that generates test reports in JUnit XML format.""" -from __future__ import absolute_import -from __future__ import division -from __future__ import print_function - import datetime import re import sys diff --git a/absl/tests/app_test_helper.py b/absl/tests/app_test_helper.py index 6bd1a89..f9fbdec 100644 --- a/absl/tests/app_test_helper.py +++ b/absl/tests/app_test_helper.py @@ -14,10 +14,6 @@ """Helper script used by app_test.py.""" -from __future__ import absolute_import -from __future__ import division -from __future__ import print_function - import os import sys @@ -14,10 +14,6 @@ """Abseil setup configuration.""" -from __future__ import absolute_import -from __future__ import division -from __future__ import print_function - import os import sys diff --git a/smoke_tests/sample_app.py b/smoke_tests/sample_app.py index 532a11e..d45be96 100644 --- a/smoke_tests/sample_app.py +++ b/smoke_tests/sample_app.py @@ -14,10 +14,6 @@ """Test helper for smoke_test.sh.""" -from __future__ import absolute_import -from __future__ import division -from __future__ import print_function - import sys from absl import app diff --git a/smoke_tests/sample_test.py b/smoke_tests/sample_test.py index 713677a..2d3f3e4 100644 --- a/smoke_tests/sample_test.py +++ b/smoke_tests/sample_test.py @@ -14,10 +14,6 @@ """Test helper for smoke_test.sh.""" -from __future__ import absolute_import -from __future__ import division -from __future__ import print_function - from absl.testing import absltest |