Skip to content

Commit

Permalink
Merge branch 'main' into fix-bq-storage-client-deadlock
Browse files Browse the repository at this point in the history
  • Loading branch information
chalmerlowe authored Nov 18, 2024
2 parents 8eebb9d + fddf2c5 commit aaec3ce
Show file tree
Hide file tree
Showing 15 changed files with 193 additions and 204 deletions.
4 changes: 2 additions & 2 deletions .github/.OwlBot.lock.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@
# limitations under the License.
docker:
image: gcr.io/cloud-devrel-public-resources/owlbot-python:latest
digest: sha256:5cddfe2fb5019bbf78335bc55f15bc13e18354a56b3ff46e1834f8e540807f05
# created: 2024-10-31T01:41:07.349286254Z
digest: sha256:2ed982f884312e4883e01b5ab8af8b6935f0216a5a2d82928d273081fc3be562
# created: 2024-11-12T12:09:45.821174897Z
2 changes: 1 addition & 1 deletion .github/release-trigger.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
enabled: true
multiScmName:
multiScmName: python-bigquery
20 changes: 10 additions & 10 deletions .kokoro/docker/docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# This file is autogenerated by pip-compile with Python 3.9
# This file is autogenerated by pip-compile with Python 3.10
# by the following command:
#
# pip-compile --allow-unsafe --generate-hashes requirements.in
Expand All @@ -8,9 +8,9 @@ argcomplete==3.5.1 \
--hash=sha256:1a1d148bdaa3e3b93454900163403df41448a248af01b6e849edc5ac08e6c363 \
--hash=sha256:eb1ee355aa2557bd3d0145de7b06b2a45b0ce461e1e7813f5d066039ab4177b4
# via nox
colorlog==6.8.2 \
--hash=sha256:3e3e079a41feb5a1b64f978b5ea4f46040a94f11f0e8bbb8261e3dbbeca64d44 \
--hash=sha256:4dcbb62368e2800cb3c5abd348da7e53f6c362dda502ec27c560b2e58a66bd33
colorlog==6.9.0 \
--hash=sha256:5906e71acd67cb07a71e779c47c4bcb45fb8c2993eebe9e5adcd6a6f1b283eff \
--hash=sha256:bfba54a1b93b94f54e1f4fe48395725a3d92fd2a4af702f6bd70946bdc0c6ac2
# via nox
distlib==0.3.9 \
--hash=sha256:47f8c22fd27c27e25a65601af709b38e4f0a45ea4fc2e710f65755fa8caaaf87 \
Expand All @@ -24,9 +24,9 @@ nox==2024.10.9 \
--hash=sha256:1d36f309a0a2a853e9bccb76bbef6bb118ba92fa92674d15604ca99adeb29eab \
--hash=sha256:7aa9dc8d1c27e9f45ab046ffd1c3b2c4f7c91755304769df231308849ebded95
# via -r requirements.in
packaging==24.1 \
--hash=sha256:026ed72c8ed3fcce5bf8950572258698927fd1dbda10a5e981cdf0ac37f4f002 \
--hash=sha256:5b8f2217dbdbd2f7f384c41c628544e6d52f2d0f53c6d0c3ea61aa5d1d7ff124
packaging==24.2 \
--hash=sha256:09abb1bccd265c01f4a3aa3f7a7db064b36514d2cba19a2f694fe6150451a759 \
--hash=sha256:c228a6dc5e932d346bc5739379109d49e8853dd8223571c7c5b55260edc0b97f
# via nox
platformdirs==4.3.6 \
--hash=sha256:357fb2acbc885b0419afd3ce3ed34564c13c9b95c89360cd9563f73aa5e2b907 \
Expand All @@ -36,7 +36,7 @@ tomli==2.0.2 \
--hash=sha256:2ebe24485c53d303f690b0ec092806a085f07af5a5aa1464f3931eec36caaa38 \
--hash=sha256:d46d457a85337051c36524bc5349dd91b1877838e2979ac5ced3e710ed8a60ed
# via nox
virtualenv==20.26.6 \
--hash=sha256:280aede09a2a5c317e409a00102e7077c6432c5a38f0ef938e643805a7ad2c48 \
--hash=sha256:7345cc5b25405607a624d8418154577459c3e0277f5466dd79c49d5e492995f2
virtualenv==20.27.1 \
--hash=sha256:142c6be10212543b32c6c45d3d3893dff89112cc588b7d0879ae5a1ec03a47ba \
--hash=sha256:f11f1b8a29525562925f745563bfd48b189450f61fb34c4f9cc79dd5aa32a1f4
# via nox
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@
[1]: https://pypi.org/project/google-cloud-bigquery/#history


## [3.27.0](https://github.com/googleapis/python-bigquery/compare/v3.26.0...v3.27.0) (2024-11-01)


### Features

* Updates to allow users to set max_stream_count ([#2039](https://github.com/googleapis/python-bigquery/issues/2039)) ([7372ad6](https://github.com/googleapis/python-bigquery/commit/7372ad659fd3316a602e90f224e9a3304d4c1419))

## [3.26.0](https://github.com/googleapis/python-bigquery/compare/v3.25.0...v3.26.0) (2024-09-25)


Expand Down
82 changes: 41 additions & 41 deletions google/cloud/bigquery/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -1184,6 +1184,19 @@ def update_dataset(
must be provided. If a field is listed in ``fields`` and is ``None`` in
``dataset``, it will be deleted.
For example, to update the default expiration times, specify
both properties in the ``fields`` argument:
.. code-block:: python
bigquery_client.update_dataset(
dataset,
[
"default_partition_expiration_ms",
"default_table_expiration_ms",
]
)
If ``dataset.etag`` is not ``None``, the update will only
succeed if the dataset on the server has the same ETag. Thus
reading a dataset with ``get_dataset``, changing its fields,
Expand All @@ -1198,19 +1211,6 @@ def update_dataset(
The properties of ``dataset`` to change. These are strings
corresponding to the properties of
:class:`~google.cloud.bigquery.dataset.Dataset`.
For example, to update the default expiration times, specify
both properties in the ``fields`` argument:
.. code-block:: python
bigquery_client.update_dataset(
dataset,
[
"default_partition_expiration_ms",
"default_table_expiration_ms",
]
)
retry (Optional[google.api_core.retry.Retry]):
How to retry the RPC.
timeout (Optional[float]):
Expand Down Expand Up @@ -1254,6 +1254,15 @@ def update_model(
must be provided. If a field is listed in ``fields`` and is ``None``
in ``model``, the field value will be deleted.
For example, to update the descriptive properties of the model,
specify them in the ``fields`` argument:
.. code-block:: python
bigquery_client.update_model(
model, ["description", "friendly_name"]
)
If ``model.etag`` is not ``None``, the update will only succeed if
the model on the server has the same ETag. Thus reading a model with
``get_model``, changing its fields, and then passing it to
Expand All @@ -1266,15 +1275,6 @@ def update_model(
The properties of ``model`` to change. These are strings
corresponding to the properties of
:class:`~google.cloud.bigquery.model.Model`.
For example, to update the descriptive properties of the model,
specify them in the ``fields`` argument:
.. code-block:: python
bigquery_client.update_model(
model, ["description", "friendly_name"]
)
retry (Optional[google.api_core.retry.Retry]):
A description of how to retry the API call.
timeout (Optional[float]):
Expand Down Expand Up @@ -1318,6 +1318,15 @@ def update_routine(
must be provided. If a field is listed in ``fields`` and is ``None``
in ``routine``, the field value will be deleted.
For example, to update the description property of the routine,
specify it in the ``fields`` argument:
.. code-block:: python
bigquery_client.update_routine(
routine, ["description"]
)
.. warning::
During beta, partial updates are not supported. You must provide
all fields in the resource.
Expand All @@ -1336,15 +1345,6 @@ def update_routine(
fields (Sequence[str]):
The fields of ``routine`` to change, spelled as the
:class:`~google.cloud.bigquery.routine.Routine` properties.
For example, to update the description property of the routine,
specify it in the ``fields`` argument:
.. code-block:: python
bigquery_client.update_routine(
routine, ["description"]
)
retry (Optional[google.api_core.retry.Retry]):
A description of how to retry the API call.
timeout (Optional[float]):
Expand Down Expand Up @@ -1392,6 +1392,16 @@ def update_table(
must be provided. If a field is listed in ``fields`` and is ``None``
in ``table``, the field value will be deleted.
For example, to update the descriptive properties of the table,
specify them in the ``fields`` argument:
.. code-block:: python
bigquery_client.update_table(
table,
["description", "friendly_name"]
)
If ``table.etag`` is not ``None``, the update will only succeed if
the table on the server has the same ETag. Thus reading a table with
``get_table``, changing its fields, and then passing it to
Expand All @@ -1403,16 +1413,6 @@ def update_table(
fields (Sequence[str]):
The fields of ``table`` to change, spelled as the
:class:`~google.cloud.bigquery.table.Table` properties.
For example, to update the descriptive properties of the table,
specify them in the ``fields`` argument:
.. code-block:: python
bigquery_client.update_table(
table,
["description", "friendly_name"]
)
retry (Optional[google.api_core.retry.Retry]):
A description of how to retry the API call.
timeout (Optional[float]):
Expand Down
2 changes: 1 addition & 1 deletion google/cloud/bigquery/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.

__version__ = "3.26.0"
__version__ = "3.27.0"
2 changes: 1 addition & 1 deletion noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@ def blacken(session):
session.run("black", *BLACK_PATHS)


@nox.session(python="3.9")
@nox.session(python="3.10")
@_calculate_duration
def docs(session):
"""Build the docs."""
Expand Down
104 changes: 104 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
# Copyright 2024 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"

[project]
name = "google-cloud-bigquery"
authors = [{ name = "Google LLC", email = "googleapis-packages@google.com" }]
license = { text = "Apache 2.0" }
requires-python = ">=3.7"
description = "Google BigQuery API client library"
readme = "README.rst"
classifiers = [
# Should be one of:
# "Development Status :: 3 - Alpha"
# "Development Status :: 4 - Beta"
# "Development Status :: 5 - Production/Stable"
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Operating System :: OS Independent",
"Topic :: Internet",
]
dependencies = [
"google-api-core[grpc] >= 2.11.1, < 3.0.0dev",
"google-auth >= 2.14.1, < 3.0.0dev",
"google-cloud-core >= 2.4.1, < 3.0.0dev",
"google-resumable-media >= 2.0.0, < 3.0dev",
"packaging >= 20.0.0",
"python-dateutil >= 2.7.3, < 3.0dev",
"requests >= 2.21.0, < 3.0.0dev",
]
dynamic = ["version"]

[project.urls]
Repository = "https://github.com/googleapis/python-bigquery"

[project.optional-dependencies]
# bqstorage had a period where it was a required dependency, and has been
# moved back to optional due to bloat. See
# https://github.com/googleapis/python-bigquery/issues/1196 for more background.
bqstorage = [
"google-cloud-bigquery-storage >= 2.6.0, < 3.0.0dev",
# Due to an issue in pip's dependency resolver, the `grpc` extra is not
# installed, even though `google-cloud-bigquery-storage` specifies it
# as `google-api-core[grpc]`. We thus need to explicitly specify it here.
# See: https://github.com/googleapis/python-bigquery/issues/83 The
# grpc.Channel.close() method isn't added until 1.32.0.
# https://github.com/grpc/grpc/pull/15254
"grpcio >= 1.47.0, < 2.0dev",
"grpcio >= 1.49.1, < 2.0dev; python_version >= '3.11'",
"pyarrow >= 3.0.0",
]
pandas = [
"pandas >= 1.1.0",
"pyarrow >= 3.0.0",
"db-dtypes >= 0.3.0, < 2.0.0dev",
"importlib_metadata >= 1.0.0; python_version < '3.8'",
]
ipywidgets = ["ipywidgets >= 7.7.0", "ipykernel >= 6.0.0"]
geopandas = ["geopandas >= 0.9.0, < 2.0dev", "Shapely >= 1.8.4, < 3.0.0dev"]
ipython = ["bigquery-magics >= 0.1.0"]
tqdm = ["tqdm >= 4.7.4, < 5.0.0dev"]
opentelemetry = [
"opentelemetry-api >= 1.1.0",
"opentelemetry-sdk >= 1.1.0",
"opentelemetry-instrumentation >= 0.20b0",
]
bigquery_v2 = [
"proto-plus >= 1.22.3, < 2.0.0dev",
"protobuf >= 3.20.2, < 6.0.0dev, != 4.21.0, != 4.21.1, != 4.21.2, != 4.21.3, != 4.21.4, != 4.21.5", # For the legacy proto-based types.
]
all = [
"google-cloud-bigquery[bqstorage,pandas,ipywidgets,geopandas,ipython,tqdm,opentelemetry,bigquery_v2]",
]

[tool.setuptools.dynamic]
version = { attr = "google.cloud.bigquery.version.__version__" }

[tool.setuptools.packages.find]
# Only include packages under the 'google' namespace. Do not include tests,
# benchmarks, etc.
include = ["google*"]
2 changes: 1 addition & 1 deletion samples/desktopapp/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
google-cloud-bigquery==3.26.0
google-cloud-bigquery==3.27.0
google-auth-oauthlib==1.2.1
28 changes: 15 additions & 13 deletions samples/geography/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,47 +2,49 @@ attrs==24.2.0
certifi==2024.8.30
cffi===1.15.1; python_version == '3.7'
cffi==1.17.1; python_version >= '3.8'
charset-normalizer==3.3.2
charset-normalizer==3.4.0
click==8.1.7
click-plugins==1.1.1
cligj==0.7.2
dataclasses==0.8; python_version < '3.7'
db-dtypes==1.3.0
db-dtypes==1.3.1
Fiona===1.9.6; python_version == '3.7'
Fiona==1.10.1; python_version >= '3.8'
geojson==3.1.0
geopandas===0.10.2; python_version == '3.7'
geopandas===0.13.2; python_version == '3.8'
geopandas==1.0.1; python_version >= '3.9'
google-api-core==2.20.0
google-auth==2.35.0
google-cloud-bigquery==3.26.0
google-cloud-bigquery-storage==2.26.0
google-api-core==2.23.0
google-auth==2.36.0
google-cloud-bigquery==3.27.0
google-cloud-bigquery-storage==2.27.0
google-cloud-core==2.4.1
google-crc32c===1.5.0; python_version < '3.9'
google-crc32c==1.6.0; python_version >= '3.9'
google-resumable-media==2.7.2
googleapis-common-protos==1.65.0
googleapis-common-protos==1.66.0
grpcio===1.62.2; python_version == '3.7'
grpcio==1.66.1; python_version >= '3.8'
grpcio==1.67.1; python_version >= '3.8'
idna==3.10
munch==4.0.0
mypy-extensions==1.0.0
packaging===24.0; python_version == '3.7'
packaging==24.1; python_version >= '3.8'
packaging==24.2; python_version >= '3.8'
pandas===1.3.5; python_version == '3.7'
pandas===2.0.3; python_version == '3.8'
pandas==2.2.3; python_version >= '3.9'
proto-plus==1.24.0
pyarrow==12.0.1; python_version == '3.7'
pyarrow==17.0.0; python_version >= '3.8'
proto-plus==1.25.0
pyarrow===12.0.1; python_version == '3.7'
pyarrow===17.0.0; python_version == '3.8'
pyarrow==18.0.0; python_version >= '3.9'
pyasn1===0.5.1; python_version == '3.7'
pyasn1==0.6.1; python_version >= '3.8'
pyasn1-modules===0.3.0; python_version == '3.7'
pyasn1-modules==0.4.1; python_version >= '3.8'
pycparser===2.21; python_version == '3.7'
pycparser==2.22; python_version >= '3.8'
pyparsing==3.1.4
pyparsing===3.1.4; python_version < '3.9'
pyparsing==3.2.0; python_version >= '3.9'
python-dateutil==2.9.0.post0
pytz==2024.2
PyYAML===6.0.1; python_version == '3.7'
Expand Down
Loading

0 comments on commit aaec3ce

Please sign in to comment.