diff --git a/datalab/bigquery/_api.py b/datalab/bigquery/_api.py index 2a046933b..b173a5a77 100644 --- a/datalab/bigquery/_api.py +++ b/datalab/bigquery/_api.py @@ -12,7 +12,6 @@ """Implements BigQuery HTTP API wrapper.""" from __future__ import absolute_import -from __future__ import unicode_literals from past.builtins import basestring from builtins import object diff --git a/datalab/bigquery/_csv_options.py b/datalab/bigquery/_csv_options.py index 30ea672b2..9f2d53cfa 100644 --- a/datalab/bigquery/_csv_options.py +++ b/datalab/bigquery/_csv_options.py @@ -12,7 +12,6 @@ """Implements CSV options for External Tables and Table loads from GCS.""" from __future__ import absolute_import -from __future__ import unicode_literals from builtins import object diff --git a/datalab/bigquery/_dataset.py b/datalab/bigquery/_dataset.py index b70aa1f43..3b83e7690 100644 --- a/datalab/bigquery/_dataset.py +++ b/datalab/bigquery/_dataset.py @@ -12,7 +12,6 @@ """Implements Dataset, and related Dataset BigQuery APIs.""" from __future__ import absolute_import -from __future__ import unicode_literals from builtins import object import datalab.context diff --git a/datalab/bigquery/_federated_table.py b/datalab/bigquery/_federated_table.py index 7e5a67c67..630ba9571 100644 --- a/datalab/bigquery/_federated_table.py +++ b/datalab/bigquery/_federated_table.py @@ -12,7 +12,6 @@ """Implements External Table functionality.""" from __future__ import absolute_import -from __future__ import unicode_literals from builtins import object from . import _csv_options diff --git a/datalab/bigquery/_job.py b/datalab/bigquery/_job.py index 92ca0b999..7ce75c5fc 100644 --- a/datalab/bigquery/_job.py +++ b/datalab/bigquery/_job.py @@ -12,7 +12,6 @@ """Implements BigQuery Job functionality.""" from __future__ import absolute_import -from __future__ import unicode_literals from __future__ import division import datetime diff --git a/datalab/bigquery/_parser.py b/datalab/bigquery/_parser.py index 804e5ed06..831771ccb 100644 --- a/datalab/bigquery/_parser.py +++ b/datalab/bigquery/_parser.py @@ -13,7 +13,6 @@ """Implements BigQuery related data parsing helpers.""" from __future__ import absolute_import from __future__ import division -from __future__ import unicode_literals from builtins import zip from builtins import str from builtins import object diff --git a/datalab/bigquery/_query.py b/datalab/bigquery/_query.py index bb59a3288..e966fcedf 100644 --- a/datalab/bigquery/_query.py +++ b/datalab/bigquery/_query.py @@ -12,7 +12,6 @@ """Implements Query BigQuery API.""" from __future__ import absolute_import -from __future__ import unicode_literals from builtins import object import datalab.context diff --git a/datalab/bigquery/_query_job.py b/datalab/bigquery/_query_job.py index b58e2c705..93c5451a6 100644 --- a/datalab/bigquery/_query_job.py +++ b/datalab/bigquery/_query_job.py @@ -12,7 +12,6 @@ """Implements BigQuery query job functionality.""" from __future__ import absolute_import -from __future__ import unicode_literals from builtins import str from . import _job diff --git a/datalab/bigquery/_query_results_table.py b/datalab/bigquery/_query_results_table.py index e107be364..1fa3cd22d 100644 --- a/datalab/bigquery/_query_results_table.py +++ b/datalab/bigquery/_query_results_table.py @@ -12,7 +12,6 @@ """Implements BigQuery query job results table functionality.""" from __future__ import absolute_import -from __future__ import unicode_literals from . import _table diff --git a/datalab/bigquery/_query_stats.py b/datalab/bigquery/_query_stats.py index 9e62d1eb1..9253222ec 100644 --- a/datalab/bigquery/_query_stats.py +++ b/datalab/bigquery/_query_stats.py @@ -13,7 +13,6 @@ """Implements representation of BigQuery query job dry run results.""" from __future__ import absolute_import -from __future__ import unicode_literals from builtins import object diff --git a/datalab/bigquery/_sampling.py b/datalab/bigquery/_sampling.py index 707f7ba3b..d89d70d7f 100644 --- a/datalab/bigquery/_sampling.py +++ b/datalab/bigquery/_sampling.py @@ -13,7 +13,6 @@ """Sampling for BigQuery.""" from __future__ import absolute_import from __future__ import division -from __future__ import unicode_literals from builtins import object diff --git a/datalab/bigquery/_schema.py b/datalab/bigquery/_schema.py index 1fe05b45f..950d17def 100644 --- a/datalab/bigquery/_schema.py +++ b/datalab/bigquery/_schema.py @@ -12,7 +12,6 @@ """Implements Table and View Schema APIs.""" from __future__ import absolute_import -from __future__ import unicode_literals from builtins import str from builtins import range from past.builtins import basestring diff --git a/datalab/bigquery/_table.py b/datalab/bigquery/_table.py index 6467eb305..de332fc1a 100644 --- a/datalab/bigquery/_table.py +++ b/datalab/bigquery/_table.py @@ -13,7 +13,6 @@ """Implements Table, and related Table BigQuery APIs.""" from __future__ import absolute_import from __future__ import division -from __future__ import unicode_literals from builtins import str from past.utils import old_div from builtins import object diff --git a/datalab/bigquery/_udf.py b/datalab/bigquery/_udf.py index 5c3733859..538cb0ac3 100644 --- a/datalab/bigquery/_udf.py +++ b/datalab/bigquery/_udf.py @@ -12,7 +12,6 @@ """Google Cloud Platform library - BigQuery UDF Functionality.""" from __future__ import absolute_import -from __future__ import unicode_literals from builtins import str from builtins import object diff --git a/datalab/bigquery/_utils.py b/datalab/bigquery/_utils.py index edefab9b5..96b466e19 100644 --- a/datalab/bigquery/_utils.py +++ b/datalab/bigquery/_utils.py @@ -12,7 +12,6 @@ """Useful common utility functions.""" from __future__ import absolute_import -from __future__ import unicode_literals from builtins import str from past.builtins import basestring diff --git a/datalab/bigquery/_view.py b/datalab/bigquery/_view.py index c0df7b726..552135a9b 100644 --- a/datalab/bigquery/_view.py +++ b/datalab/bigquery/_view.py @@ -12,7 +12,6 @@ """Implements BigQuery Views.""" from __future__ import absolute_import -from __future__ import unicode_literals from builtins import str from builtins import object diff --git a/datalab/bigquery/commands/_bigquery.py b/datalab/bigquery/commands/_bigquery.py index 032f1e56c..fe7816c33 100644 --- a/datalab/bigquery/commands/_bigquery.py +++ b/datalab/bigquery/commands/_bigquery.py @@ -13,7 +13,6 @@ """Google Cloud Platform library - BigQuery IPython Functionality.""" from __future__ import absolute_import from __future__ import print_function -from __future__ import unicode_literals from builtins import zip from builtins import str from past.builtins import basestring diff --git a/datalab/context/_api.py b/datalab/context/_api.py index 0b811eb5b..d2a68d83f 100644 --- a/datalab/context/_api.py +++ b/datalab/context/_api.py @@ -12,7 +12,6 @@ """Implements HTTP API wrapper.""" from __future__ import absolute_import -from __future__ import unicode_literals from builtins import object import datalab.utils diff --git a/datalab/context/_context.py b/datalab/context/_context.py index 687fa733f..419cc1c6e 100644 --- a/datalab/context/_context.py +++ b/datalab/context/_context.py @@ -14,7 +14,6 @@ """Implements Context functionality.""" from __future__ import absolute_import -from __future__ import unicode_literals from builtins import object from . import _project diff --git a/datalab/context/_project.py b/datalab/context/_project.py index 498b5ab0e..3eb21e4ab 100644 --- a/datalab/context/_project.py +++ b/datalab/context/_project.py @@ -12,7 +12,6 @@ """Implements Projects functionality.""" from __future__ import absolute_import -from __future__ import unicode_literals from builtins import object import datalab.utils diff --git a/datalab/context/_utils.py b/datalab/context/_utils.py index 01d958ee3..0e21bd9bd 100644 --- a/datalab/context/_utils.py +++ b/datalab/context/_utils.py @@ -15,7 +15,6 @@ """ Support for getting gcloud credentials. """ from __future__ import absolute_import -from __future__ import unicode_literals import oauth2client.client import json import os diff --git a/datalab/context/commands/_projects.py b/datalab/context/commands/_projects.py index 807e59fa2..ee7f59a8a 100644 --- a/datalab/context/commands/_projects.py +++ b/datalab/context/commands/_projects.py @@ -13,7 +13,6 @@ """Implements listing projects and setting default project.""" from __future__ import absolute_import -from __future__ import unicode_literals try: import IPython import IPython.core.magic diff --git a/datalab/data/__init__.py b/datalab/data/__init__.py index 83a27bede..a09acce3d 100644 --- a/datalab/data/__init__.py +++ b/datalab/data/__init__.py @@ -12,7 +12,6 @@ """Google Cloud Platform library - Generic SQL Helpers.""" from __future__ import absolute_import -from __future__ import unicode_literals from ._csv import Csv from ._sql_module import SqlModule diff --git a/datalab/data/_csv.py b/datalab/data/_csv.py index 5a60be19d..0a526da5c 100644 --- a/datalab/data/_csv.py +++ b/datalab/data/_csv.py @@ -12,7 +12,6 @@ """Implements usefule CSV utilities.""" from __future__ import absolute_import -from __future__ import unicode_literals from builtins import next from builtins import str as newstr from builtins import range diff --git a/datalab/data/_sql_module.py b/datalab/data/_sql_module.py index 926cec3da..9ff988b86 100644 --- a/datalab/data/_sql_module.py +++ b/datalab/data/_sql_module.py @@ -12,7 +12,6 @@ """Helper functions for %%sql modules.""" from __future__ import absolute_import -from __future__ import unicode_literals from builtins import str from past.builtins import basestring from builtins import object diff --git a/datalab/data/_sql_statement.py b/datalab/data/_sql_statement.py index 9a2eb29d6..32954282c 100644 --- a/datalab/data/_sql_statement.py +++ b/datalab/data/_sql_statement.py @@ -12,7 +12,6 @@ """Implements SQL statement helper functionality.""" from __future__ import absolute_import -from __future__ import unicode_literals from builtins import str from builtins import object from past.builtins import basestring diff --git a/datalab/data/_utils.py b/datalab/data/_utils.py index b77208bf1..6c7f87775 100644 --- a/datalab/data/_utils.py +++ b/datalab/data/_utils.py @@ -12,7 +12,6 @@ """Google Cloud Platform library - Generic SQL Helpers.""" from __future__ import absolute_import -from __future__ import unicode_literals import types diff --git a/datalab/data/commands/_sql.py b/datalab/data/commands/_sql.py index 71828695d..d8d20172d 100644 --- a/datalab/data/commands/_sql.py +++ b/datalab/data/commands/_sql.py @@ -13,7 +13,6 @@ """Google Cloud Platform library - %%arguments IPython Cell Magic Functionality.""" from __future__ import absolute_import from __future__ import print_function -from __future__ import unicode_literals from builtins import str from past.builtins import basestring diff --git a/datalab/stackdriver/monitoring/_group.py b/datalab/stackdriver/monitoring/_group.py index 2ce4d9a1f..1dd41a935 100644 --- a/datalab/stackdriver/monitoring/_group.py +++ b/datalab/stackdriver/monitoring/_group.py @@ -13,7 +13,6 @@ """Groups for the Google Monitoring API.""" from __future__ import absolute_import -from __future__ import unicode_literals from builtins import object import collections diff --git a/datalab/stackdriver/monitoring/_query_metadata.py b/datalab/stackdriver/monitoring/_query_metadata.py index b78be767b..e9f17ce5b 100644 --- a/datalab/stackdriver/monitoring/_query_metadata.py +++ b/datalab/stackdriver/monitoring/_query_metadata.py @@ -14,7 +14,6 @@ from __future__ import absolute_import -from __future__ import unicode_literals from builtins import object import google.cloud.monitoring diff --git a/datalab/storage/_api.py b/datalab/storage/_api.py index d1712ceba..d63e8a163 100644 --- a/datalab/storage/_api.py +++ b/datalab/storage/_api.py @@ -12,7 +12,6 @@ """Implements Storage HTTP API wrapper.""" from __future__ import absolute_import -from __future__ import unicode_literals from future import standard_library standard_library.install_aliases() from builtins import object diff --git a/datalab/storage/_bucket.py b/datalab/storage/_bucket.py index c4d291607..1f1517d8b 100644 --- a/datalab/storage/_bucket.py +++ b/datalab/storage/_bucket.py @@ -12,7 +12,6 @@ """Implements Bucket-related Cloud Storage APIs.""" from __future__ import absolute_import -from __future__ import unicode_literals from builtins import object import dateutil.parser diff --git a/datalab/storage/_item.py b/datalab/storage/_item.py index dba54b619..2104edbf8 100644 --- a/datalab/storage/_item.py +++ b/datalab/storage/_item.py @@ -12,7 +12,6 @@ """Implements Object-related Cloud Storage APIs.""" from __future__ import absolute_import -from __future__ import unicode_literals from builtins import object import dateutil.parser diff --git a/datalab/storage/commands/_storage.py b/datalab/storage/commands/_storage.py index 22033fe01..5bac90029 100644 --- a/datalab/storage/commands/_storage.py +++ b/datalab/storage/commands/_storage.py @@ -12,7 +12,6 @@ """Google Cloud Platform library - BigQuery IPython Functionality.""" from __future__ import absolute_import -from __future__ import unicode_literals from builtins import str from past.builtins import basestring diff --git a/datalab/utils/_async.py b/datalab/utils/_async.py index 510b68f93..b580aed87 100644 --- a/datalab/utils/_async.py +++ b/datalab/utils/_async.py @@ -12,7 +12,6 @@ """Decorators for async methods and functions to dispatch on threads and support chained calls.""" from __future__ import absolute_import -from __future__ import unicode_literals from builtins import object import abc diff --git a/datalab/utils/_gcp_job.py b/datalab/utils/_gcp_job.py index 3bffd61c4..4480bf373 100644 --- a/datalab/utils/_gcp_job.py +++ b/datalab/utils/_gcp_job.py @@ -12,7 +12,6 @@ """Implements GCP Job functionality.""" from __future__ import absolute_import -from __future__ import unicode_literals import datalab.context from . import _job diff --git a/datalab/utils/_http.py b/datalab/utils/_http.py index a161da14c..451b8ca49 100644 --- a/datalab/utils/_http.py +++ b/datalab/utils/_http.py @@ -12,7 +12,6 @@ """Implements HTTP client helper functionality.""" from __future__ import absolute_import -from __future__ import unicode_literals from future import standard_library standard_library.install_aliases() from builtins import str diff --git a/datalab/utils/_iterator.py b/datalab/utils/_iterator.py index 0db29485c..193854263 100644 --- a/datalab/utils/_iterator.py +++ b/datalab/utils/_iterator.py @@ -12,7 +12,6 @@ """Iterator class for iterable cloud lists.""" from __future__ import absolute_import -from __future__ import unicode_literals from builtins import object diff --git a/datalab/utils/_job.py b/datalab/utils/_job.py index 3c50ab6d0..1b06c39f8 100644 --- a/datalab/utils/_job.py +++ b/datalab/utils/_job.py @@ -12,7 +12,6 @@ """Implements Job functionality for async tasks.""" from __future__ import absolute_import -from __future__ import unicode_literals from builtins import str from builtins import object diff --git a/datalab/utils/_json_encoder.py b/datalab/utils/_json_encoder.py index ec10fbc35..07ee203e4 100644 --- a/datalab/utils/_json_encoder.py +++ b/datalab/utils/_json_encoder.py @@ -13,7 +13,6 @@ """ JSON encoder that can handle Python datetime objects. """ from __future__ import absolute_import -from __future__ import unicode_literals import datetime import json diff --git a/datalab/utils/_lambda_job.py b/datalab/utils/_lambda_job.py index 6adba9156..cdc81d328 100644 --- a/datalab/utils/_lambda_job.py +++ b/datalab/utils/_lambda_job.py @@ -12,7 +12,6 @@ """Implements OS shell Job functionality.""" from __future__ import absolute_import -from __future__ import unicode_literals from . import _async from . import _job diff --git a/datalab/utils/_lru_cache.py b/datalab/utils/_lru_cache.py index 6279f7ae7..9ff768332 100644 --- a/datalab/utils/_lru_cache.py +++ b/datalab/utils/_lru_cache.py @@ -12,7 +12,6 @@ """A simple LRU cache.""" from __future__ import absolute_import -from __future__ import unicode_literals from builtins import str from past.builtins import basestring from builtins import object diff --git a/datalab/utils/_utils.py b/datalab/utils/_utils.py index 53ba94409..55a52873e 100644 --- a/datalab/utils/_utils.py +++ b/datalab/utils/_utils.py @@ -13,7 +13,6 @@ """Miscellaneous simple utility functions.""" from __future__ import absolute_import from __future__ import print_function -from __future__ import unicode_literals from builtins import str try: diff --git a/datalab/utils/commands/__init__.py b/datalab/utils/commands/__init__.py index 432536dbb..220ebcd0e 100644 --- a/datalab/utils/commands/__init__.py +++ b/datalab/utils/commands/__init__.py @@ -11,7 +11,6 @@ # the License. from __future__ import absolute_import -from __future__ import unicode_literals # Support functions for magics and display help. from ._commands import CommandParser diff --git a/datalab/utils/commands/_chart.py b/datalab/utils/commands/_chart.py index 914ed74a0..895e427f1 100644 --- a/datalab/utils/commands/_chart.py +++ b/datalab/utils/commands/_chart.py @@ -12,7 +12,6 @@ """Google Cloud Platform library - Chart cell magic.""" from __future__ import absolute_import -from __future__ import unicode_literals try: import IPython diff --git a/datalab/utils/commands/_chart_data.py b/datalab/utils/commands/_chart_data.py index f9601f392..18c3eb845 100644 --- a/datalab/utils/commands/_chart_data.py +++ b/datalab/utils/commands/_chart_data.py @@ -13,7 +13,6 @@ """Google Cloud Platform library - chart_data cell magic.""" from __future__ import absolute_import from __future__ import print_function -from __future__ import unicode_literals try: import IPython diff --git a/datalab/utils/commands/_commands.py b/datalab/utils/commands/_commands.py index 5eac09ae0..c33ec29c3 100644 --- a/datalab/utils/commands/_commands.py +++ b/datalab/utils/commands/_commands.py @@ -13,7 +13,6 @@ """Implementation of command parsing and handling within magics.""" from __future__ import absolute_import from __future__ import print_function -from __future__ import unicode_literals try: import IPython diff --git a/datalab/utils/commands/_csv.py b/datalab/utils/commands/_csv.py index 1721491be..cdf4901ec 100644 --- a/datalab/utils/commands/_csv.py +++ b/datalab/utils/commands/_csv.py @@ -12,7 +12,6 @@ """Implements CSV file exploration""" from __future__ import absolute_import -from __future__ import unicode_literals try: diff --git a/datalab/utils/commands/_extension.py b/datalab/utils/commands/_extension.py index 362af48d7..7654f3e3c 100644 --- a/datalab/utils/commands/_extension.py +++ b/datalab/utils/commands/_extension.py @@ -12,7 +12,6 @@ """Google Cloud Platform library - Extension cell magic.""" from __future__ import absolute_import -from __future__ import unicode_literals try: import IPython diff --git a/datalab/utils/commands/_html.py b/datalab/utils/commands/_html.py index a5fb08d94..cbeed0519 100644 --- a/datalab/utils/commands/_html.py +++ b/datalab/utils/commands/_html.py @@ -12,7 +12,6 @@ """Google Cloud Platform library - IPython HTML display Functionality.""" from __future__ import absolute_import -from __future__ import unicode_literals from builtins import str from builtins import range from past.builtins import basestring diff --git a/datalab/utils/commands/_job.py b/datalab/utils/commands/_job.py index 4d90a06cd..8074caa5b 100644 --- a/datalab/utils/commands/_job.py +++ b/datalab/utils/commands/_job.py @@ -12,7 +12,6 @@ """Implements job view""" from __future__ import absolute_import -from __future__ import unicode_literals from builtins import str diff --git a/datalab/utils/commands/_modules.py b/datalab/utils/commands/_modules.py index c3b067eac..4df1965e9 100644 --- a/datalab/utils/commands/_modules.py +++ b/datalab/utils/commands/_modules.py @@ -12,7 +12,6 @@ """Implementation of various module magics""" from __future__ import absolute_import -from __future__ import unicode_literals try: import IPython diff --git a/datalab/utils/commands/_utils.py b/datalab/utils/commands/_utils.py index 95b11f26f..f582c7350 100644 --- a/datalab/utils/commands/_utils.py +++ b/datalab/utils/commands/_utils.py @@ -13,7 +13,6 @@ """Utility functions.""" from __future__ import absolute_import from __future__ import division -from __future__ import unicode_literals from builtins import str from past.builtins import basestring diff --git a/tests/_util/http_tests.py b/tests/_util/http_tests.py index 371a1e8a4..2df422094 100644 --- a/tests/_util/http_tests.py +++ b/tests/_util/http_tests.py @@ -11,7 +11,6 @@ # the License. from __future__ import absolute_import -from __future__ import unicode_literals import mock import unittest diff --git a/tests/_util/lru_cache_tests.py b/tests/_util/lru_cache_tests.py index aa5fb393c..5fc8f0a95 100644 --- a/tests/_util/lru_cache_tests.py +++ b/tests/_util/lru_cache_tests.py @@ -11,7 +11,6 @@ # the License. from __future__ import absolute_import -from __future__ import unicode_literals import unittest from datalab.utils._lru_cache import LRUCache diff --git a/tests/_util/util_tests.py b/tests/_util/util_tests.py index ef1c8162d..bc441e059 100644 --- a/tests/_util/util_tests.py +++ b/tests/_util/util_tests.py @@ -11,7 +11,6 @@ # the License. from __future__ import absolute_import -from __future__ import unicode_literals import imp import unittest diff --git a/tests/bigquery/api_tests.py b/tests/bigquery/api_tests.py index be3fb35f8..81f97b7d6 100644 --- a/tests/bigquery/api_tests.py +++ b/tests/bigquery/api_tests.py @@ -11,7 +11,6 @@ # the License. from __future__ import absolute_import -from __future__ import unicode_literals import unittest import mock from oauth2client.client import AccessTokenCredentials diff --git a/tests/bigquery/dataset_tests.py b/tests/bigquery/dataset_tests.py index 83bb0b6b4..365a0215d 100644 --- a/tests/bigquery/dataset_tests.py +++ b/tests/bigquery/dataset_tests.py @@ -11,7 +11,6 @@ # the License. from __future__ import absolute_import -from __future__ import unicode_literals from builtins import str import mock from oauth2client.client import AccessTokenCredentials diff --git a/tests/bigquery/federated_table_tests.py b/tests/bigquery/federated_table_tests.py index bd0f943cc..077195bfe 100644 --- a/tests/bigquery/federated_table_tests.py +++ b/tests/bigquery/federated_table_tests.py @@ -11,7 +11,6 @@ # the License. from __future__ import absolute_import -from __future__ import unicode_literals import collections import mock from oauth2client.client import AccessTokenCredentials diff --git a/tests/bigquery/jobs_tests.py b/tests/bigquery/jobs_tests.py index b58d08b8d..99741da36 100644 --- a/tests/bigquery/jobs_tests.py +++ b/tests/bigquery/jobs_tests.py @@ -11,7 +11,6 @@ # the License. from __future__ import absolute_import -from __future__ import unicode_literals import mock from oauth2client.client import AccessTokenCredentials import unittest diff --git a/tests/bigquery/parser_tests.py b/tests/bigquery/parser_tests.py index 19b4c79ab..ea1603f6e 100644 --- a/tests/bigquery/parser_tests.py +++ b/tests/bigquery/parser_tests.py @@ -11,7 +11,6 @@ # the License. from __future__ import absolute_import -from __future__ import unicode_literals import unittest import datalab.bigquery as bq diff --git a/tests/bigquery/query_tests.py b/tests/bigquery/query_tests.py index ddb0355fd..a12937b59 100644 --- a/tests/bigquery/query_tests.py +++ b/tests/bigquery/query_tests.py @@ -11,7 +11,6 @@ # the License. from __future__ import absolute_import -from __future__ import unicode_literals from builtins import str import mock from oauth2client.client import AccessTokenCredentials diff --git a/tests/bigquery/sampling_tests.py b/tests/bigquery/sampling_tests.py index 65844b987..e5ff6775a 100644 --- a/tests/bigquery/sampling_tests.py +++ b/tests/bigquery/sampling_tests.py @@ -11,7 +11,6 @@ # the License. from __future__ import absolute_import -from __future__ import unicode_literals import unittest from datalab.bigquery import Sampling diff --git a/tests/bigquery/schema_tests.py b/tests/bigquery/schema_tests.py index 164cc234a..4d749381c 100644 --- a/tests/bigquery/schema_tests.py +++ b/tests/bigquery/schema_tests.py @@ -11,7 +11,6 @@ # the License. from __future__ import absolute_import -from __future__ import unicode_literals import collections import pandas import sys @@ -64,30 +63,17 @@ def test_schema_from_data(self): with self.assertRaises(Exception) as error1: _ = datalab.bigquery.Schema.from_data(variant1) - if sys.version_info[0] == 3: - self.assertEquals('Cannot create a schema from heterogeneous list [3, 2.0, True, ' + - '[\'cow\', \'horse\', [0, []]]]; perhaps you meant to use ' + - 'Schema.from_record?', str(error1.exception)) - else: - self.assertEquals('Cannot create a schema from heterogeneous list [3, 2.0, True, ' + - '[u\'cow\', u\'horse\', [0, []]]]; perhaps you meant to use ' + - 'Schema.from_record?', str(error1.exception)) + self.assertEquals('Cannot create a schema from heterogeneous list [3, 2.0, True, ' + + '[\'cow\', \'horse\', [0, []]]]; perhaps you meant to use ' + + 'Schema.from_record?', str(error1.exception)) with self.assertRaises(Exception) as error2: _ = datalab.bigquery.Schema.from_data(variant2) - if sys.version_info[0] == 3: - self.assertEquals('Cannot create a schema from dict OrderedDict([(\'Column1\', 3), ' + - '(\'Column2\', 2.0), (\'Column3\', True), (\'Column4\', ' + - 'OrderedDict([(\'Column1\', \'cow\'), (\'Column2\', \'horse\'), ' + - '(\'Column3\', OrderedDict([(\'Column1\', 0), (\'Column2\', ' + - 'OrderedDict())]))]))]); perhaps you meant to use Schema.from_record?', - str(error2.exception)) - else: - self.assertEquals('Cannot create a schema from dict OrderedDict([(u\'Column1\', 3), ' + - '(u\'Column2\', 2.0), (u\'Column3\', True), (u\'Column4\', ' + - 'OrderedDict([(u\'Column1\', u\'cow\'), (u\'Column2\', u\'horse\'), ' + - '(u\'Column3\', OrderedDict([(u\'Column1\', 0), (u\'Column2\', ' + - 'OrderedDict())]))]))]); perhaps you meant to use Schema.from_record?', - str(error2.exception)) + self.assertEquals('Cannot create a schema from dict OrderedDict([(\'Column1\', 3), ' + + '(\'Column2\', 2.0), (\'Column3\', True), (\'Column4\', ' + + 'OrderedDict([(\'Column1\', \'cow\'), (\'Column2\', \'horse\'), ' + + '(\'Column3\', OrderedDict([(\'Column1\', 0), (\'Column2\', ' + + 'OrderedDict())]))]))]); perhaps you meant to use Schema.from_record?', + str(error2.exception)) schema3 = datalab.bigquery.Schema.from_data([variant1]) schema4 = datalab.bigquery.Schema.from_data([variant2]) schema5 = datalab.bigquery.Schema.from_data(master) diff --git a/tests/bigquery/table_tests.py b/tests/bigquery/table_tests.py index 332918e3a..23c9c2845 100644 --- a/tests/bigquery/table_tests.py +++ b/tests/bigquery/table_tests.py @@ -11,7 +11,6 @@ # the License. from __future__ import absolute_import -from __future__ import unicode_literals from builtins import str from builtins import object import calendar diff --git a/tests/bigquery/udf_tests.py b/tests/bigquery/udf_tests.py index 394d0a95c..7b836b374 100644 --- a/tests/bigquery/udf_tests.py +++ b/tests/bigquery/udf_tests.py @@ -11,7 +11,6 @@ # the License. from __future__ import absolute_import -from __future__ import unicode_literals from oauth2client.client import AccessTokenCredentials import unittest diff --git a/tests/bigquery/view_tests.py b/tests/bigquery/view_tests.py index 6e7d86557..3bb92c6fb 100644 --- a/tests/bigquery/view_tests.py +++ b/tests/bigquery/view_tests.py @@ -11,7 +11,6 @@ # the License. from __future__ import absolute_import -from __future__ import unicode_literals from builtins import str import mock from oauth2client.client import AccessTokenCredentials diff --git a/tests/data/sql_tests.py b/tests/data/sql_tests.py index 0a319a534..aba568bd4 100644 --- a/tests/data/sql_tests.py +++ b/tests/data/sql_tests.py @@ -11,7 +11,6 @@ # the License. from __future__ import absolute_import -from __future__ import unicode_literals import imp import unittest diff --git a/tests/kernel/bigquery_tests.py b/tests/kernel/bigquery_tests.py index d43415cdf..c6e7ae245 100644 --- a/tests/kernel/bigquery_tests.py +++ b/tests/kernel/bigquery_tests.py @@ -11,7 +11,6 @@ # the License. from __future__ import absolute_import -from __future__ import unicode_literals import mock from oauth2client.client import AccessTokenCredentials import unittest diff --git a/tests/kernel/chart_data_tests.py b/tests/kernel/chart_data_tests.py index 52f34562d..4144a3e92 100644 --- a/tests/kernel/chart_data_tests.py +++ b/tests/kernel/chart_data_tests.py @@ -11,7 +11,6 @@ # the License. from __future__ import absolute_import -from __future__ import unicode_literals import json import mock import unittest diff --git a/tests/kernel/chart_tests.py b/tests/kernel/chart_tests.py index 0f6a16dc3..80bb2ec7a 100644 --- a/tests/kernel/chart_tests.py +++ b/tests/kernel/chart_tests.py @@ -11,7 +11,6 @@ # the License. from __future__ import absolute_import -from __future__ import unicode_literals import unittest # import Python so we can mock the parts we need to here. diff --git a/tests/kernel/commands_tests.py b/tests/kernel/commands_tests.py index b6087b4d2..3883bed94 100644 --- a/tests/kernel/commands_tests.py +++ b/tests/kernel/commands_tests.py @@ -11,7 +11,6 @@ # the License. from __future__ import absolute_import -from __future__ import unicode_literals import mock import unittest diff --git a/tests/kernel/html_tests.py b/tests/kernel/html_tests.py index a290bcfd5..9d25a0d4c 100644 --- a/tests/kernel/html_tests.py +++ b/tests/kernel/html_tests.py @@ -11,7 +11,6 @@ # the License. from __future__ import absolute_import -from __future__ import unicode_literals import mock import unittest diff --git a/tests/kernel/module_tests.py b/tests/kernel/module_tests.py index 499e1b907..a4c316831 100644 --- a/tests/kernel/module_tests.py +++ b/tests/kernel/module_tests.py @@ -11,7 +11,6 @@ # the License. from __future__ import absolute_import -from __future__ import unicode_literals import mock import sys import unittest diff --git a/tests/kernel/sql_tests.py b/tests/kernel/sql_tests.py index d9fcc5e0f..51459ff55 100644 --- a/tests/kernel/sql_tests.py +++ b/tests/kernel/sql_tests.py @@ -11,7 +11,6 @@ # the License. from __future__ import absolute_import -from __future__ import unicode_literals import imp import mock from oauth2client.client import AccessTokenCredentials diff --git a/tests/kernel/storage_tests.py b/tests/kernel/storage_tests.py index 6f66a0e7f..761e6675a 100644 --- a/tests/kernel/storage_tests.py +++ b/tests/kernel/storage_tests.py @@ -11,7 +11,6 @@ # the License. from __future__ import absolute_import -from __future__ import unicode_literals import mock from oauth2client.client import AccessTokenCredentials import unittest diff --git a/tests/kernel/utils_tests.py b/tests/kernel/utils_tests.py index 3ab622ae5..b7c2b69ed 100644 --- a/tests/kernel/utils_tests.py +++ b/tests/kernel/utils_tests.py @@ -11,7 +11,6 @@ # the License. from __future__ import absolute_import -from __future__ import unicode_literals from builtins import range import datetime as dt import collections diff --git a/tests/main.py b/tests/main.py index 6905481c2..77f6244d2 100644 --- a/tests/main.py +++ b/tests/main.py @@ -11,7 +11,6 @@ # the License. from __future__ import absolute_import -from __future__ import unicode_literals import os import sys import unittest diff --git a/tests/storage/api_tests.py b/tests/storage/api_tests.py index fe523de6c..97b91f818 100644 --- a/tests/storage/api_tests.py +++ b/tests/storage/api_tests.py @@ -11,7 +11,6 @@ # the License. from __future__ import absolute_import -from __future__ import unicode_literals import unittest import mock from oauth2client.client import AccessTokenCredentials diff --git a/tests/storage/bucket_tests.py b/tests/storage/bucket_tests.py index a98c1dcf3..1200c9865 100644 --- a/tests/storage/bucket_tests.py +++ b/tests/storage/bucket_tests.py @@ -11,7 +11,6 @@ # the License. from __future__ import absolute_import -from __future__ import unicode_literals import mock from oauth2client.client import AccessTokenCredentials import unittest diff --git a/tests/storage/item_tests.py b/tests/storage/item_tests.py index bccfcef27..282a82e20 100644 --- a/tests/storage/item_tests.py +++ b/tests/storage/item_tests.py @@ -11,7 +11,6 @@ # the License. from __future__ import absolute_import -from __future__ import unicode_literals import mock from oauth2client.client import AccessTokenCredentials import unittest