diff --git a/.librarian/generator-input/client-post-processing/bigquery-storage-integration.yaml b/.librarian/generator-input/client-post-processing/bigquery-storage-integration.yaml index a782590c69e8..00b9e1682ab9 100644 --- a/.librarian/generator-input/client-post-processing/bigquery-storage-integration.yaml +++ b/.librarian/generator-input/client-post-processing/bigquery-storage-integration.yaml @@ -461,6 +461,8 @@ replacements: google-api-core==1.34.1 libcst==0.2.5 fastavro==0.21.2 + # pytz is required by pandas + pytz pandas==1.0.5 pyarrow==0.15.0 google-auth==2.14.1 diff --git a/.librarian/state.yaml b/.librarian/state.yaml index 32c3e92fbe2a..bc4ffe3bec5c 100644 --- a/.librarian/state.yaml +++ b/.librarian/state.yaml @@ -892,7 +892,7 @@ libraries: tag_format: '{id}-v{version}' - id: google-cloud-bigquery-storage version: 2.36.0 - last_generated_commit: bd94e0b8c4975af0a66dc1f846c63c77dbc0064e + last_generated_commit: 6b36371f6f3099624547e9ce4c1db304161e6afe apis: - path: google/cloud/bigquery/storage/v1beta2 service_config: bigquerystorage_v1beta2.yaml diff --git a/packages/google-cloud-bigquery-storage/noxfile.py b/packages/google-cloud-bigquery-storage/noxfile.py index ac96b51e7a7b..25e0b39cd444 100644 --- a/packages/google-cloud-bigquery-storage/noxfile.py +++ b/packages/google-cloud-bigquery-storage/noxfile.py @@ -55,7 +55,6 @@ PACKAGE_NAME = "google-cloud-bigquery-storage" UNIT_TEST_STANDARD_DEPENDENCIES = [ - "cachetools", "mock", "asyncmock", "pytest", @@ -85,7 +84,6 @@ SYSTEM_TEST_LOCAL_DEPENDENCIES: List[str] = [] SYSTEM_TEST_DEPENDENCIES: List[str] = [] SYSTEM_TEST_EXTRAS: List[str] = [ - "cryptography", "fastavro", "pandas", "pyarrow", diff --git a/packages/google-cloud-bigquery-storage/testing/constraints-3.7.txt b/packages/google-cloud-bigquery-storage/testing/constraints-3.7.txt index 9b7d8726b9e1..e80388df25cd 100644 --- a/packages/google-cloud-bigquery-storage/testing/constraints-3.7.txt +++ b/packages/google-cloud-bigquery-storage/testing/constraints-3.7.txt @@ -7,9 +7,13 @@ google-api-core==1.34.1 libcst==0.2.5 fastavro==0.21.2 +# pytz is required by pandas +pytz pandas==1.0.5 pyarrow==0.15.0 google-auth==2.14.1 +# cryptography is a direct dependency of google-auth +cryptography==38.0.3 # TODO(https://github.com/googleapis/gapic-generator-python/issues/2453) # Add the minimum supported version of grpcio to constraints files proto-plus==1.22.3 diff --git a/packages/google-cloud-bigquery-storage/tests/system/reader/test_reader.py b/packages/google-cloud-bigquery-storage/tests/system/reader/test_reader.py index e2b9c9de00b5..e9269bda9d96 100644 --- a/packages/google-cloud-bigquery-storage/tests/system/reader/test_reader.py +++ b/packages/google-cloud-bigquery-storage/tests/system/reader/test_reader.py @@ -22,7 +22,6 @@ import uuid import pytest -import pytz from google.cloud import bigquery @@ -451,7 +450,9 @@ def test_decoding_data_types( "bool_field": True, "geography_field": "POINT(-49.3028 69.0622)", "person_struct_field": {"name": "John", "age": 42}, - "timestamp_field": dt.datetime(2019, 8, 9, 13, 38, 22, 17896, tzinfo=pytz.UTC), + "timestamp_field": dt.datetime( + 2019, 8, 9, 13, 38, 22, 17896, tzinfo=dt.timezone.utc + ), "date_field": dt.date(1995, 3, 17), "time_field": dt.time(16, 24, 51), "string_array_field": ["foo", "bar", "baz"], diff --git a/packages/google-cloud-bigquery-storage/tests/unit/helpers.py b/packages/google-cloud-bigquery-storage/tests/unit/helpers.py index cd3870425856..b8949ee3df1f 100644 --- a/packages/google-cloud-bigquery-storage/tests/unit/helpers.py +++ b/packages/google-cloud-bigquery-storage/tests/unit/helpers.py @@ -17,8 +17,6 @@ import datetime import decimal -import pytz - SCALAR_COLUMNS = [ {"name": "int_col", "type": "int64"}, {"name": "float_col", "type": "float64"}, @@ -42,7 +40,7 @@ "bytes_col": b"ascii bytes", "date_col": datetime.date(1998, 9, 4), "time_col": datetime.time(12, 0), - "ts_col": datetime.datetime(2000, 1, 1, 5, 0, tzinfo=pytz.utc), + "ts_col": datetime.datetime(2000, 1, 1, 5, 0, tzinfo=datetime.timezone.utc), }, { "int_col": 456, @@ -53,7 +51,7 @@ "bytes_col": b"\xbb\xee\xff", "date_col": datetime.date(1995, 3, 2), "time_col": datetime.time(13, 37), - "ts_col": datetime.datetime(1965, 4, 3, 2, 1, tzinfo=pytz.utc), + "ts_col": datetime.datetime(1965, 4, 3, 2, 1, tzinfo=datetime.timezone.utc), }, ], [ @@ -66,7 +64,9 @@ "bytes_col": b"\x54\x69\x6d", "date_col": datetime.date(1970, 1, 1), "time_col": datetime.time(16, 20), - "ts_col": datetime.datetime(1991, 8, 25, 20, 57, 8, tzinfo=pytz.utc), + "ts_col": datetime.datetime( + 1991, 8, 25, 20, 57, 8, tzinfo=datetime.timezone.utc + ), } ], ]