diff --git a/CHANGELOG.md b/CHANGELOG.md index 06aec678..2171f5e1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://pypi.org/project/google-cloud-bigquery-storage/#history +### [1.1.1](https://github.com/googleapis/python-bigquery-storage/compare/v1.1.0...v1.1.1) (2022-04-04) + + +### Bug Fixes + +* **v1:** require google-api-core >= 1.31.5, >= 2.3.2 on v1 release ([d4babe0](https://github.com/googleapis/python-bigquery-storage/commit/d4babe00d8bca473757a2da01d255246b9b1e1f1)) + ## 1.1.0 09-14-2020 08:51 PDT diff --git a/docs/conf.py b/docs/conf.py index 07f5ca07..23592d52 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -346,7 +346,10 @@ intersphinx_mapping = { "python": ("http://python.readthedocs.org/en/latest/", None), "google-auth": ("https://google-auth.readthedocs.io/en/stable", None), - "google.api_core": ("https://googleapis.dev/python/google-api-core/latest/", None,), + "google.api_core": ( + "https://googleapis.dev/python/google-api-core/latest/", + None, + ), "grpc": ("https://grpc.io/grpc/python/", None), } diff --git a/google/cloud/bigquery_storage_v1/gapic/big_query_read_client.py b/google/cloud/bigquery_storage_v1/gapic/big_query_read_client.py index 69335cb7..47932d94 100644 --- a/google/cloud/bigquery_storage_v1/gapic/big_query_read_client.py +++ b/google/cloud/bigquery_storage_v1/gapic/big_query_read_client.py @@ -83,7 +83,8 @@ def from_service_account_file(cls, filename, *args, **kwargs): def project_path(cls, project): """Return a fully-qualified project string.""" return google.api_core.path_template.expand( - "projects/{project}", project=project, + "projects/{project}", + project=project, ) @classmethod @@ -204,7 +205,9 @@ def __init__( self.transport = transport else: self.transport = big_query_read_grpc_transport.BigQueryReadGrpcTransport( - address=api_endpoint, channel=channel, credentials=credentials, + address=api_endpoint, + channel=channel, + credentials=credentials, ) if client_info is None: @@ -319,7 +322,9 @@ def create_read_session( ) request = storage_pb2.CreateReadSessionRequest( - parent=parent, read_session=read_session, max_stream_count=max_stream_count, + parent=parent, + read_session=read_session, + max_stream_count=max_stream_count, ) if metadata is None: metadata = [] @@ -401,7 +406,10 @@ def read_rows( client_info=self._client_info, ) - request = storage_pb2.ReadRowsRequest(read_stream=read_stream, offset=offset,) + request = storage_pb2.ReadRowsRequest( + read_stream=read_stream, + offset=offset, + ) if metadata is None: metadata = [] metadata = list(metadata) @@ -484,7 +492,10 @@ def split_read_stream( client_info=self._client_info, ) - request = storage_pb2.SplitReadStreamRequest(name=name, fraction=fraction,) + request = storage_pb2.SplitReadStreamRequest( + name=name, + fraction=fraction, + ) if metadata is None: metadata = [] metadata = list(metadata) diff --git a/google/cloud/bigquery_storage_v1/proto/storage_pb2.py b/google/cloud/bigquery_storage_v1/proto/storage_pb2.py index 40f852f8..45d4bb4c 100644 --- a/google/cloud/bigquery_storage_v1/proto/storage_pb2.py +++ b/google/cloud/bigquery_storage_v1/proto/storage_pb2.py @@ -314,7 +314,9 @@ ), ], extensions=[], - nested_types=[_STREAMSTATS_PROGRESS,], + nested_types=[ + _STREAMSTATS_PROGRESS, + ], enum_types=[], serialized_options=None, is_extendable=False, diff --git a/google/cloud/bigquery_storage_v1/proto/stream_pb2.py b/google/cloud/bigquery_storage_v1/proto/stream_pb2.py index ee00c7b7..129e21c2 100644 --- a/google/cloud/bigquery_storage_v1/proto/stream_pb2.py +++ b/google/cloud/bigquery_storage_v1/proto/stream_pb2.py @@ -365,7 +365,10 @@ ), ], extensions=[], - nested_types=[_READSESSION_TABLEMODIFIERS, _READSESSION_TABLEREADOPTIONS,], + nested_types=[ + _READSESSION_TABLEMODIFIERS, + _READSESSION_TABLEREADOPTIONS, + ], enum_types=[], serialized_options=b"\352Ah\n*bigquerystorage.googleapis.com/ReadSession\022:projects/{project}/locations/{location}/sessions/{session}", is_extendable=False, diff --git a/google/cloud/bigquery_storage_v1beta1/gapic/big_query_storage_client.py b/google/cloud/bigquery_storage_v1beta1/gapic/big_query_storage_client.py index f21a590d..8828b3d1 100644 --- a/google/cloud/bigquery_storage_v1beta1/gapic/big_query_storage_client.py +++ b/google/cloud/bigquery_storage_v1beta1/gapic/big_query_storage_client.py @@ -85,7 +85,8 @@ def from_service_account_file(cls, filename, *args, **kwargs): def project_path(cls, project): """Return a fully-qualified project string.""" return google.api_core.path_template.expand( - "projects/{project}", project=project, + "projects/{project}", + project=project, ) @classmethod @@ -194,8 +195,12 @@ def __init__( ) self.transport = transport else: - self.transport = big_query_storage_grpc_transport.BigQueryStorageGrpcTransport( - address=api_endpoint, channel=channel, credentials=credentials, + self.transport = ( + big_query_storage_grpc_transport.BigQueryStorageGrpcTransport( + address=api_endpoint, + channel=channel, + credentials=credentials, + ) ) if client_info is None: @@ -415,7 +420,9 @@ def read_rows( client_info=self._client_info, ) - request = storage_pb2.ReadRowsRequest(read_position=read_position,) + request = storage_pb2.ReadRowsRequest( + read_position=read_position, + ) if metadata is None: metadata = [] metadata = list(metadata) @@ -503,7 +510,8 @@ def batch_create_read_session_streams( ) request = storage_pb2.BatchCreateReadSessionStreamsRequest( - session=session, requested_streams=requested_streams, + session=session, + requested_streams=requested_streams, ) if metadata is None: metadata = [] @@ -587,7 +595,9 @@ def finalize_stream( client_info=self._client_info, ) - request = storage_pb2.FinalizeStreamRequest(stream=stream,) + request = storage_pb2.FinalizeStreamRequest( + stream=stream, + ) if metadata is None: metadata = [] metadata = list(metadata) @@ -670,7 +680,8 @@ def split_read_stream( ) request = storage_pb2.SplitReadStreamRequest( - original_stream=original_stream, fraction=fraction, + original_stream=original_stream, + fraction=fraction, ) if metadata is None: metadata = [] diff --git a/google/cloud/bigquery_storage_v1beta2/gapic/big_query_read_client.py b/google/cloud/bigquery_storage_v1beta2/gapic/big_query_read_client.py index e088719d..f4972387 100644 --- a/google/cloud/bigquery_storage_v1beta2/gapic/big_query_read_client.py +++ b/google/cloud/bigquery_storage_v1beta2/gapic/big_query_read_client.py @@ -83,7 +83,8 @@ def from_service_account_file(cls, filename, *args, **kwargs): def project_path(cls, project): """Return a fully-qualified project string.""" return google.api_core.path_template.expand( - "projects/{project}", project=project, + "projects/{project}", + project=project, ) @classmethod @@ -204,7 +205,9 @@ def __init__( self.transport = transport else: self.transport = big_query_read_grpc_transport.BigQueryReadGrpcTransport( - address=api_endpoint, channel=channel, credentials=credentials, + address=api_endpoint, + channel=channel, + credentials=credentials, ) if client_info is None: @@ -317,7 +320,9 @@ def create_read_session( ) request = storage_pb2.CreateReadSessionRequest( - parent=parent, read_session=read_session, max_stream_count=max_stream_count, + parent=parent, + read_session=read_session, + max_stream_count=max_stream_count, ) if metadata is None: metadata = [] @@ -399,7 +404,10 @@ def read_rows( client_info=self._client_info, ) - request = storage_pb2.ReadRowsRequest(read_stream=read_stream, offset=offset,) + request = storage_pb2.ReadRowsRequest( + read_stream=read_stream, + offset=offset, + ) if metadata is None: metadata = [] metadata = list(metadata) @@ -482,7 +490,10 @@ def split_read_stream( client_info=self._client_info, ) - request = storage_pb2.SplitReadStreamRequest(name=name, fraction=fraction,) + request = storage_pb2.SplitReadStreamRequest( + name=name, + fraction=fraction, + ) if metadata is None: metadata = [] metadata = list(metadata) diff --git a/google/cloud/bigquery_storage_v1beta2/proto/arrow_pb2.py b/google/cloud/bigquery_storage_v1beta2/proto/arrow_pb2.py index a9237ddf..8c3eb0da 100644 --- a/google/cloud/bigquery_storage_v1beta2/proto/arrow_pb2.py +++ b/google/cloud/bigquery_storage_v1beta2/proto/arrow_pb2.py @@ -174,7 +174,9 @@ ], extensions=[], nested_types=[], - enum_types=[_ARROWSERIALIZATIONOPTIONS_FORMAT,], + enum_types=[ + _ARROWSERIALIZATIONOPTIONS_FORMAT, + ], serialized_options=None, is_extendable=False, syntax="proto3", diff --git a/google/cloud/bigquery_storage_v1beta2/proto/storage_pb2.py b/google/cloud/bigquery_storage_v1beta2/proto/storage_pb2.py index 342a23d7..5403a663 100644 --- a/google/cloud/bigquery_storage_v1beta2/proto/storage_pb2.py +++ b/google/cloud/bigquery_storage_v1beta2/proto/storage_pb2.py @@ -314,7 +314,9 @@ ), ], extensions=[], - nested_types=[_STREAMSTATS_PROGRESS,], + nested_types=[ + _STREAMSTATS_PROGRESS, + ], enum_types=[], serialized_options=None, is_extendable=False, diff --git a/google/cloud/bigquery_storage_v1beta2/proto/stream_pb2.py b/google/cloud/bigquery_storage_v1beta2/proto/stream_pb2.py index 24651ee1..2b0a6315 100644 --- a/google/cloud/bigquery_storage_v1beta2/proto/stream_pb2.py +++ b/google/cloud/bigquery_storage_v1beta2/proto/stream_pb2.py @@ -384,7 +384,10 @@ ), ], extensions=[], - nested_types=[_READSESSION_TABLEMODIFIERS, _READSESSION_TABLEREADOPTIONS,], + nested_types=[ + _READSESSION_TABLEMODIFIERS, + _READSESSION_TABLEREADOPTIONS, + ], enum_types=[], serialized_options=b"\352Ah\n*bigquerystorage.googleapis.com/ReadSession\022:projects/{project}/locations/{location}/sessions/{session}", is_extendable=False, diff --git a/noxfile.py b/noxfile.py index 43aaeb69..045e09f4 100644 --- a/noxfile.py +++ b/noxfile.py @@ -23,7 +23,7 @@ import nox -BLACK_VERSION = "black==19.10b0" +BLACK_VERSION = "black==21.12b0" BLACK_PATHS = ["docs", "google", "tests", "noxfile.py", "setup.py"] DEFAULT_PYTHON_VERSION = "3.8" @@ -38,14 +38,16 @@ def lint(session): Returns a failure if the linters find linting errors or sufficiently serious code quality issues. """ - session.install("flake8", BLACK_VERSION) + session.install("flake8", BLACK_VERSION, "click<8.1") session.run( - "black", "--check", *BLACK_PATHS, + "black", + "--check", + *BLACK_PATHS, ) session.run("flake8", "google", "tests") -@nox.session(python="3.6") +@nox.session(python=DEFAULT_PYTHON_VERSION) def blacken(session): """Run black. @@ -55,9 +57,10 @@ def blacken(session): That run uses an image that doesn't have 3.6 installed. Before updating this check the state of the `gcp_ubuntu_config` we use for that Kokoro run. """ - session.install(BLACK_VERSION) + session.install(BLACK_VERSION, "click<8.1") session.run( - "black", *BLACK_PATHS, + "black", + *BLACK_PATHS, ) @@ -118,12 +121,14 @@ def system(session): # Use pre-release gRPC for system tests. session.install("--pre", "grpcio") - session.install("google-cloud-bigquery") + session.install("google-cloud-bigquery<3") # Install all test dependencies, then install this package into the # virtualenv's dist-packages. session.install( - "mock", "pytest", "google-cloud-testutils", + "mock", + "pytest", + "google-cloud-testutils", ) session.install("-e", ".[fastavro,pandas,pyarrow]") session.install("-e", ".") @@ -153,7 +158,7 @@ def docs(session): """Build the docs for this library.""" session.install("-e", ".") - session.install("sphinx<3.0.0", "alabaster", "recommonmark") + session.install("sphinx<3.0.0", "jinja2<3.1", "alabaster", "recommonmark") shutil.rmtree(os.path.join("docs", "_build"), ignore_errors=True) session.run( @@ -175,9 +180,9 @@ def docfx(session): """Build the docfx yaml files for this library.""" session.install("-e", ".") - # sphinx-docfx-yaml supports up to sphinx version 1.5.5. - # https://github.com/docascode/sphinx-docfx-yaml/issues/97 - session.install("sphinx==1.5.5", "alabaster", "recommonmark", "sphinx-docfx-yaml") + session.install( + "sphinx<3.0.0", "jinja2<3.1", "alabaster", "recommonmark", "sphinx-docfx-yaml" + ) shutil.rmtree(os.path.join("docs", "_build"), ignore_errors=True) session.run( diff --git a/samples/quickstart/noxfile.py b/samples/quickstart/noxfile.py index 5660f08b..079a45e2 100644 --- a/samples/quickstart/noxfile.py +++ b/samples/quickstart/noxfile.py @@ -191,7 +191,7 @@ def py(session): def _get_repo_root(): - """ Returns the root folder of the project. """ + """Returns the root folder of the project.""" # Get root of this repository. Assume we don't have directories nested deeper than 10 items. p = Path(os.getcwd()) for i in range(10): diff --git a/samples/to_dataframe/main_test.py b/samples/to_dataframe/main_test.py index 126333bf..33bc27de 100644 --- a/samples/to_dataframe/main_test.py +++ b/samples/to_dataframe/main_test.py @@ -31,7 +31,10 @@ def clients(): ) # Make clients. - bqclient = bigquery.Client(credentials=credentials, project=your_project_id,) + bqclient = bigquery.Client( + credentials=credentials, + project=your_project_id, + ) bqstorageclient = bigquery_storage_v1beta1.BigQueryStorageClient( credentials=credentials ) diff --git a/samples/to_dataframe/noxfile.py b/samples/to_dataframe/noxfile.py index 5660f08b..079a45e2 100644 --- a/samples/to_dataframe/noxfile.py +++ b/samples/to_dataframe/noxfile.py @@ -191,7 +191,7 @@ def py(session): def _get_repo_root(): - """ Returns the root folder of the project. """ + """Returns the root folder of the project.""" # Get root of this repository. Assume we don't have directories nested deeper than 10 items. p = Path(os.getcwd()) for i in range(10): diff --git a/setup.py b/setup.py index d3af694f..c64823a9 100644 --- a/setup.py +++ b/setup.py @@ -21,7 +21,7 @@ name = "google-cloud-bigquery-storage" description = "BigQuery Storage API API client library" -version = "1.0.0" +version = "1.1.1" release_status = "Development Status :: 5 - Production/Stable" dependencies = [ "google-api-core[grpc] >= 1.31.5, <3.0.0dev,!=2.0.*,!=2.1.*,!=2.2.*,!=2.3.0", diff --git a/tests/__init__.py b/tests/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/tests/system/__init__.py b/tests/system/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/tests/system/v1/__init__.py b/tests/system/v1/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/tests/system/v1beta1/__init__.py b/tests/system/v1beta1/__init__.py new file mode 100644 index 00000000..e69de29b