Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

To ensure reproducible builds, it's a good practice to pin dependency versions. Please specify a version for pytz. For example, pytz==2023.3.

      pytz==2023.3

pandas==1.0.5
pyarrow==0.15.0
google-auth==2.14.1
Expand Down
2 changes: 1 addition & 1 deletion .librarian/state.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions packages/google-cloud-bigquery-storage/noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@
PACKAGE_NAME = "google-cloud-bigquery-storage"

UNIT_TEST_STANDARD_DEPENDENCIES = [
"cachetools",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

This dependency removal is out of scope for this PR, which focuses on pytz. To maintain a clean and atomic commit history, it's best to handle unrelated changes in separate pull requests.

"mock",
"asyncmock",
"pytest",
Expand Down Expand Up @@ -85,7 +84,6 @@
SYSTEM_TEST_LOCAL_DEPENDENCIES: List[str] = []
SYSTEM_TEST_DEPENDENCIES: List[str] = []
SYSTEM_TEST_EXTRAS: List[str] = [
"cryptography",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Similar to the cachetools removal, this change is out of scope for this PR. Please group related changes into a single PR and keep unrelated changes separate for better reviewability and a cleaner commit history.

"fastavro",
"pandas",
"pyarrow",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,13 @@
google-api-core==1.34.1
libcst==0.2.5
fastavro==0.21.2
# pytz is required by pandas
pytz
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

For reproducible test runs, it's a good practice to pin all dependencies in a constraints file. Please add a specific version for pytz. For example, pytz==2023.3.

pytz==2023.3

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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
import uuid

import pytest
import pytz

from google.cloud import bigquery

Expand Down Expand Up @@ -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"],
Expand Down
10 changes: 5 additions & 5 deletions packages/google-cloud-bigquery-storage/tests/unit/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
import datetime
import decimal

import pytz

SCALAR_COLUMNS = [
{"name": "int_col", "type": "int64"},
{"name": "float_col", "type": "float64"},
Expand All @@ -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,
Expand All @@ -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),
},
],
[
Expand All @@ -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
),
}
],
]
Loading