From 46ca0bc8957f2bce8951035049710c4701aba1d9 Mon Sep 17 00:00:00 2001 From: Dan Lee <71398022+dandhlee@users.noreply.github.com> Date: Wed, 28 Jun 2023 08:25:15 -0400 Subject: [PATCH 01/10] chore: update docs nox session (#1597) --- noxfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/noxfile.py b/noxfile.py index 57e534890..93616485f 100644 --- a/noxfile.py +++ b/noxfile.py @@ -402,7 +402,7 @@ def blacken(session): session.run("black", *BLACK_PATHS) -@nox.session(python=DEFAULT_PYTHON_VERSION) +@nox.session(python="3.9") def docs(session): """Build the docs.""" From 3fbe371746603863b0014b086d31f456de37b680 Mon Sep 17 00:00:00 2001 From: Chalmer Lowe Date: Thu, 29 Jun 2023 11:26:14 -0400 Subject: [PATCH 02/10] refactor: refactored _get_final_span_attributes() for clarity, simplicity (#1602) Refactors the _get_final_span_attributes() function for simplicity and clarity. * adds docstring * removes several lines of redundant/unnecessary code * renames temporary variable for clarity --- .../cloud/bigquery/opentelemetry_tracing.py | 39 +++++++++++++------ 1 file changed, 28 insertions(+), 11 deletions(-) diff --git a/google/cloud/bigquery/opentelemetry_tracing.py b/google/cloud/bigquery/opentelemetry_tracing.py index 0e1187c6b..be02c1686 100644 --- a/google/cloud/bigquery/opentelemetry_tracing.py +++ b/google/cloud/bigquery/opentelemetry_tracing.py @@ -87,21 +87,38 @@ def create_span(name, attributes=None, client=None, job_ref=None): def _get_final_span_attributes(attributes=None, client=None, job_ref=None): - final_attributes = {} - final_attributes.update(_default_attributes.copy()) + """Compiles attributes from: client, job_ref, user-provided attributes. + + Attributes from all of these sources are merged together. Note the + attributes are added sequentially based on perceived order of precendence: + i.e. attributes added last may overwrite attributes added earlier. + + Args: + attributes (Optional[dict]): + Additional attributes that pertain to + the specific API call (i.e. not a default attribute) + + client (Optional[google.cloud.bigquery.client.Client]): + Pass in a Client object to extract any attributes that may be + relevant to it and add them to the final_attributes + + job_ref (Optional[google.cloud.bigquery.job._AsyncJob]) + Pass in a _AsyncJob object to extract any attributes that may be + relevant to it and add them to the final_attributes. + + Returns: dict + """ + + collected_attributes = _default_attributes.copy() + if client: - client_attributes = _set_client_attributes(client) - final_attributes.update(client_attributes) + collected_attributes.update(_set_client_attributes(client)) if job_ref: - job_attributes = _set_job_attributes(job_ref) - final_attributes.update(job_attributes) + collected_attributes.update(_set_job_attributes(job_ref)) if attributes: - final_attributes.update(attributes) - - filtered = {k: v for k, v in final_attributes.items() if v is not None} - final_attributes.clear() - final_attributes.update(filtered) + collected_attributes.update(attributes) + final_attributes = {k: v for k, v in collected_attributes.items() if v is not None} return final_attributes From 130450a3a5d866d2d48ef0c396e9f37d22d0b1d5 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 29 Jun 2023 10:08:13 -0700 Subject: [PATCH 03/10] chore: store artifacts in placer (#1599) Source-Link: https://github.com/googleapis/synthtool/commit/cb960373d12d20f8dc38beee2bf884d49627165e Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:2d816f26f728ac8b24248741e7d4c461c09764ef9f7be3684d557c9632e46dbd Co-authored-by: Owl Bot --- .github/.OwlBot.lock.yaml | 4 ++-- .kokoro/release/common.cfg | 9 +++++++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index 02a4dedce..98994f474 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -13,5 +13,5 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-python:latest - digest: sha256:240b5bcc2bafd450912d2da2be15e62bc6de2cf839823ae4bf94d4f392b451dc -# created: 2023-06-03T21:25:37.968717478Z + digest: sha256:2d816f26f728ac8b24248741e7d4c461c09764ef9f7be3684d557c9632e46dbd +# created: 2023-06-28T17:03:33.371210701Z diff --git a/.kokoro/release/common.cfg b/.kokoro/release/common.cfg index 6ae81b743..cb8bbaa2e 100644 --- a/.kokoro/release/common.cfg +++ b/.kokoro/release/common.cfg @@ -38,3 +38,12 @@ env_vars: { key: "SECRET_MANAGER_KEYS" value: "releasetool-publish-reporter-app,releasetool-publish-reporter-googleapis-installation,releasetool-publish-reporter-pem" } + +# Store the packages we uploaded to PyPI. That way, we have a record of exactly +# what we published, which we can use to generate SBOMs and attestations. +action { + define_artifacts { + regex: "github/python-bigquery/**/*.tar.gz" + strip_prefix: "github/python-bigquery" + } +} From 668205599ab9f5bcf34266f4dd3cfc2966783fa7 Mon Sep 17 00:00:00 2001 From: Tim Swast Date: Thu, 6 Jul 2023 12:52:57 -0500 Subject: [PATCH 04/10] doc: in query retry design, note that location can be required (#1595) In response to internal issue 285136859. Co-authored-by: Anthonios Partheniou --- docs/design/query-retries.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/design/query-retries.md b/docs/design/query-retries.md index 1bac82f5c..08d75302b 100644 --- a/docs/design/query-retries.md +++ b/docs/design/query-retries.md @@ -73,7 +73,7 @@ value, the client library uses the jobs.insert REST API to start a query job. Before it issues this request, it sets a job ID. This job ID remains constant across API retries. -If the job ID was randomly generated, and the jobs.insert request and all retries fail, the client library sends a request to the jobs.get API. This covers the case when a query request succeeded, but there was a transient issue that prevented the client from receiving a successful response. +If the job ID was randomly generated, and the jobs.insert request and all retries fail, the client library sends a request to the jobs.get API. This covers the case when a query request succeeded, but there was a transient issue that prevented the client from receiving a successful response. Note: `jobs.get` requires the location of the query. It will fail with 404 if the location is not specified and the job is not in the US multi-region. #### Retrying the jobs.query API via the retry parameter From 2bbf990e9a46a11359f25ba0d99792a4590fd410 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Mon, 10 Jul 2023 17:31:55 +0200 Subject: [PATCH 05/10] chore(deps): update all dependencies (#1577) * chore(deps): update all dependencies * revert urllib3 --------- Co-authored-by: Anthonios Partheniou --- samples/geography/requirements.txt | 6 +++--- samples/magics/requirements.txt | 4 ++-- samples/snippets/requirements.txt | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/samples/geography/requirements.txt b/samples/geography/requirements.txt index 82a1daadc..c4bd8f2e2 100644 --- a/samples/geography/requirements.txt +++ b/samples/geography/requirements.txt @@ -12,8 +12,8 @@ geojson==3.0.1 geopandas===0.10.2; python_version == '3.7' geopandas==0.13.0; python_version >= '3.8' google-api-core==2.11.0 -google-auth==2.19.0 -google-cloud-bigquery==3.10.0 +google-auth==2.19.1 +google-cloud-bigquery==3.11.0 google-cloud-bigquery-storage==2.20.0 google-cloud-core==2.3.2 google-crc32c==1.5.0 @@ -40,6 +40,6 @@ requests==2.31.0 rsa==4.9 Shapely==2.0.1 six==1.16.0 -typing-extensions==4.6.2 +typing-extensions==4.6.3 typing-inspect==0.9.0 urllib3==1.26.15 diff --git a/samples/magics/requirements.txt b/samples/magics/requirements.txt index b545916c3..29d616021 100644 --- a/samples/magics/requirements.txt +++ b/samples/magics/requirements.txt @@ -5,11 +5,11 @@ grpcio==1.54.2 ipywidgets==8.0.6 ipython===7.31.1; python_version == '3.7' ipython===8.0.1; python_version == '3.8' -ipython==8.13.2; python_version >= '3.9' +ipython==8.14.0; python_version >= '3.9' matplotlib===3.5.3; python_version == '3.7' matplotlib==3.7.1; python_version >= '3.8' pandas===1.3.5; python_version == '3.7' pandas==2.0.2; python_version >= '3.8' pyarrow==12.0.0 pytz==2023.3 -typing-extensions==4.6.2 +typing-extensions==4.6.3 diff --git a/samples/snippets/requirements.txt b/samples/snippets/requirements.txt index d2878d202..8b9326101 100644 --- a/samples/snippets/requirements.txt +++ b/samples/snippets/requirements.txt @@ -1,16 +1,16 @@ db-dtypes==1.1.1 -google-cloud-bigquery==3.10.0 +google-cloud-bigquery==3.11.0 google-cloud-bigquery-storage==2.20.0 google-auth-oauthlib==1.0.0 grpcio==1.54.2 ipywidgets==8.0.6 ipython===7.31.1; python_version == '3.7' ipython===8.0.1; python_version == '3.8' -ipython==8.13.2; python_version >= '3.9' +ipython==8.14.0; python_version >= '3.9' matplotlib===3.5.3; python_version == '3.7' matplotlib==3.7.1; python_version >= '3.8' pandas===1.3.5; python_version == '3.7' pandas==2.0.2; python_version >= '3.8' pyarrow==12.0.0 pytz==2023.3 -typing-extensions==4.6.2 +typing-extensions==4.6.3 From 319f93872f6283dc1bc377f6d82cfda0f5d5d34f Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Mon, 10 Jul 2023 18:46:18 +0200 Subject: [PATCH 06/10] chore(deps): update all dependencies (#1606) * chore(deps): update all dependencies * revert urllib3 --------- Co-authored-by: Anthonios Partheniou --- samples/geography/requirements-test.txt | 2 +- samples/geography/requirements.txt | 34 ++++++++++++------------- samples/magics/requirements-test.txt | 2 +- samples/magics/requirements.txt | 14 +++++----- samples/snippets/requirements-test.txt | 2 +- samples/snippets/requirements.txt | 16 ++++++------ 6 files changed, 35 insertions(+), 35 deletions(-) diff --git a/samples/geography/requirements-test.txt b/samples/geography/requirements-test.txt index 3c3afdcb1..b3772a888 100644 --- a/samples/geography/requirements-test.txt +++ b/samples/geography/requirements-test.txt @@ -1,2 +1,2 @@ -pytest==7.3.1 +pytest==7.4.0 mock==5.0.2 diff --git a/samples/geography/requirements.txt b/samples/geography/requirements.txt index c4bd8f2e2..b05446e99 100644 --- a/samples/geography/requirements.txt +++ b/samples/geography/requirements.txt @@ -1,8 +1,8 @@ attrs==23.1.0 certifi==2023.5.7 cffi==1.15.1 -charset-normalizer==3.1.0 -click==8.1.3 +charset-normalizer==3.2.0 +click==8.1.4 click-plugins==1.1.1 cligj==0.7.2 dataclasses==0.8; python_version < '3.7' @@ -10,29 +10,29 @@ db-dtypes==1.1.1 Fiona==1.9.4.post1 geojson==3.0.1 geopandas===0.10.2; python_version == '3.7' -geopandas==0.13.0; python_version >= '3.8' -google-api-core==2.11.0 -google-auth==2.19.1 -google-cloud-bigquery==3.11.0 -google-cloud-bigquery-storage==2.20.0 -google-cloud-core==2.3.2 +geopandas==0.13.2; python_version >= '3.8' +google-api-core==2.11.1 +google-auth==2.21.0 +google-cloud-bigquery==3.11.3 +google-cloud-bigquery-storage==2.22.0 +google-cloud-core==2.3.3 google-crc32c==1.5.0 google-resumable-media==2.5.0 -googleapis-common-protos==1.59.0 -grpcio==1.54.2 +googleapis-common-protos==1.59.1 +grpcio==1.56.0 idna==3.4 -libcst==1.0.0 -munch==3.0.0 +libcst==1.0.1 +munch==4.0.0 mypy-extensions==1.0.0 packaging==23.1 pandas===1.3.5; python_version == '3.7' -pandas==2.0.2; python_version >= '3.8' -proto-plus==1.22.2 -pyarrow==12.0.0 +pandas==2.0.3; python_version >= '3.8' +proto-plus==1.22.3 +pyarrow==12.0.1 pyasn1==0.5.0 pyasn1-modules==0.3.0 pycparser==2.21 -pyparsing==3.0.9 +pyparsing==3.1.0 python-dateutil==2.8.2 pytz==2023.3 PyYAML==6.0 @@ -40,6 +40,6 @@ requests==2.31.0 rsa==4.9 Shapely==2.0.1 six==1.16.0 -typing-extensions==4.6.3 +typing-extensions==4.7.1 typing-inspect==0.9.0 urllib3==1.26.15 diff --git a/samples/magics/requirements-test.txt b/samples/magics/requirements-test.txt index 9fa68a930..4077bd8dc 100644 --- a/samples/magics/requirements-test.txt +++ b/samples/magics/requirements-test.txt @@ -1,3 +1,3 @@ google-cloud-testutils==1.3.3 -pytest==7.3.1 +pytest==7.4.0 mock==5.0.2 diff --git a/samples/magics/requirements.txt b/samples/magics/requirements.txt index 29d616021..edf3dc4b6 100644 --- a/samples/magics/requirements.txt +++ b/samples/magics/requirements.txt @@ -1,15 +1,15 @@ db-dtypes==1.1.1 -google-cloud-bigquery-storage==2.20.0 +google-cloud-bigquery-storage==2.22.0 google-auth-oauthlib==1.0.0 -grpcio==1.54.2 -ipywidgets==8.0.6 +grpcio==1.56.0 +ipywidgets==8.0.7 ipython===7.31.1; python_version == '3.7' ipython===8.0.1; python_version == '3.8' ipython==8.14.0; python_version >= '3.9' matplotlib===3.5.3; python_version == '3.7' -matplotlib==3.7.1; python_version >= '3.8' +matplotlib==3.7.2; python_version >= '3.8' pandas===1.3.5; python_version == '3.7' -pandas==2.0.2; python_version >= '3.8' -pyarrow==12.0.0 +pandas==2.0.3; python_version >= '3.8' +pyarrow==12.0.1 pytz==2023.3 -typing-extensions==4.6.3 +typing-extensions==4.7.1 diff --git a/samples/snippets/requirements-test.txt b/samples/snippets/requirements-test.txt index 9fa68a930..4077bd8dc 100644 --- a/samples/snippets/requirements-test.txt +++ b/samples/snippets/requirements-test.txt @@ -1,3 +1,3 @@ google-cloud-testutils==1.3.3 -pytest==7.3.1 +pytest==7.4.0 mock==5.0.2 diff --git a/samples/snippets/requirements.txt b/samples/snippets/requirements.txt index 8b9326101..c715a450f 100644 --- a/samples/snippets/requirements.txt +++ b/samples/snippets/requirements.txt @@ -1,16 +1,16 @@ db-dtypes==1.1.1 -google-cloud-bigquery==3.11.0 -google-cloud-bigquery-storage==2.20.0 +google-cloud-bigquery==3.11.3 +google-cloud-bigquery-storage==2.22.0 google-auth-oauthlib==1.0.0 -grpcio==1.54.2 -ipywidgets==8.0.6 +grpcio==1.56.0 +ipywidgets==8.0.7 ipython===7.31.1; python_version == '3.7' ipython===8.0.1; python_version == '3.8' ipython==8.14.0; python_version >= '3.9' matplotlib===3.5.3; python_version == '3.7' -matplotlib==3.7.1; python_version >= '3.8' +matplotlib==3.7.2; python_version >= '3.8' pandas===1.3.5; python_version == '3.7' -pandas==2.0.2; python_version >= '3.8' -pyarrow==12.0.0 +pandas==2.0.3; python_version >= '3.8' +pyarrow==12.0.1 pytz==2023.3 -typing-extensions==4.6.3 +typing-extensions==4.7.1 From 564c7de6a8d3ac3c27f7a481284c92d46d7b5ada Mon Sep 17 00:00:00 2001 From: Alvaro Viebrantz Date: Thu, 13 Jul 2023 16:46:49 -0400 Subject: [PATCH 07/10] test: enable copy table tests (#1609) --- samples/tests/test_copy_table.py | 2 -- samples/tests/test_copy_table_cmek.py | 2 -- tests/system/test_client.py | 2 -- 3 files changed, 6 deletions(-) diff --git a/samples/tests/test_copy_table.py b/samples/tests/test_copy_table.py index d5a6c121e..3953e3162 100644 --- a/samples/tests/test_copy_table.py +++ b/samples/tests/test_copy_table.py @@ -28,8 +28,6 @@ def test_copy_table( random_table_id: str, client: "bigquery.Client", ) -> None: - pytest.skip("b/210907595: copy fails for shakespeare table") - copy_table.copy_table(table_with_data_id, random_table_id) out, err = capsys.readouterr() assert "A copy of the table created." in out diff --git a/samples/tests/test_copy_table_cmek.py b/samples/tests/test_copy_table_cmek.py index 1bdec2f35..7cac15723 100644 --- a/samples/tests/test_copy_table_cmek.py +++ b/samples/tests/test_copy_table_cmek.py @@ -23,8 +23,6 @@ def test_copy_table_cmek( table_with_data_id: str, kms_key_name: str, ) -> None: - pytest.skip("b/210907595: copy fails for shakespeare table") - copy_table_cmek.copy_table_cmek(random_table_id, table_with_data_id, kms_key_name) out, err = capsys.readouterr() assert "A copy of the table created" in out diff --git a/tests/system/test_client.py b/tests/system/test_client.py index f4757e30f..8fd532f4c 100644 --- a/tests/system/test_client.py +++ b/tests/system/test_client.py @@ -1358,8 +1358,6 @@ def test_extract_table(self): self.assertIn("Bharney Rhubble", got) def test_copy_table(self): - pytest.skip("b/210907595: copy fails for shakespeare table") - # If we create a new table to copy from, the test won't work # because the new rows will be stored in the streaming buffer, # and copy jobs don't read the streaming buffer. From 344b7246931e76ea5f507533aa3b81f42ab8c28c Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 17 Jul 2023 13:04:14 -0400 Subject: [PATCH 08/10] build(deps): [autoapprove] bump cryptography from 41.0.0 to 41.0.2 (#1611) Source-Link: https://github.com/googleapis/synthtool/commit/d6103f4a3540ba60f633a9e25c37ec5fe7e6286d Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:39f0f3f2be02ef036e297e376fe3b6256775576da8a6ccb1d5eeb80f4c8bf8fb Co-authored-by: Owl Bot --- .flake8 | 2 +- .github/.OwlBot.lock.yaml | 4 +-- .github/auto-label.yaml | 2 +- .kokoro/build.sh | 2 +- .kokoro/docker/docs/Dockerfile | 2 +- .kokoro/populate-secrets.sh | 2 +- .kokoro/publish-docs.sh | 2 +- .kokoro/release.sh | 2 +- .kokoro/requirements.txt | 44 +++++++++++++++------------- .kokoro/test-samples-against-head.sh | 2 +- .kokoro/test-samples-impl.sh | 2 +- .kokoro/test-samples.sh | 2 +- .kokoro/trampoline.sh | 2 +- .kokoro/trampoline_v2.sh | 2 +- .pre-commit-config.yaml | 2 +- .trampolinerc | 4 +-- MANIFEST.in | 2 +- docs/conf.py | 2 +- scripts/decrypt-secrets.sh | 2 +- scripts/readme-gen/readme_gen.py | 18 ++++++------ setup.cfg | 2 +- 21 files changed, 53 insertions(+), 51 deletions(-) diff --git a/.flake8 b/.flake8 index 2e4387498..87f6e408c 100644 --- a/.flake8 +++ b/.flake8 @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # -# Copyright 2020 Google LLC +# Copyright 2023 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index 98994f474..ae4a522b9 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -13,5 +13,5 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-python:latest - digest: sha256:2d816f26f728ac8b24248741e7d4c461c09764ef9f7be3684d557c9632e46dbd -# created: 2023-06-28T17:03:33.371210701Z + digest: sha256:39f0f3f2be02ef036e297e376fe3b6256775576da8a6ccb1d5eeb80f4c8bf8fb +# created: 2023-07-17T15:20:13.819193964Z diff --git a/.github/auto-label.yaml b/.github/auto-label.yaml index 41bff0b53..b2016d119 100644 --- a/.github/auto-label.yaml +++ b/.github/auto-label.yaml @@ -1,4 +1,4 @@ -# Copyright 2022 Google LLC +# Copyright 2023 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/.kokoro/build.sh b/.kokoro/build.sh index 4d6a1d0f6..0cb0d0dd0 100755 --- a/.kokoro/build.sh +++ b/.kokoro/build.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2018 Google LLC +# Copyright 2023 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/.kokoro/docker/docs/Dockerfile b/.kokoro/docker/docs/Dockerfile index f8137d0ae..8e39a2cc4 100644 --- a/.kokoro/docker/docs/Dockerfile +++ b/.kokoro/docker/docs/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2020 Google LLC +# Copyright 2023 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/.kokoro/populate-secrets.sh b/.kokoro/populate-secrets.sh index f52514257..6f3972140 100755 --- a/.kokoro/populate-secrets.sh +++ b/.kokoro/populate-secrets.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2020 Google LLC. +# Copyright 2023 Google LLC. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/.kokoro/publish-docs.sh b/.kokoro/publish-docs.sh index 1c4d62370..9eafe0be3 100755 --- a/.kokoro/publish-docs.sh +++ b/.kokoro/publish-docs.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2020 Google LLC +# Copyright 2023 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/.kokoro/release.sh b/.kokoro/release.sh index c6a7c9460..078fc1c20 100755 --- a/.kokoro/release.sh +++ b/.kokoro/release.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2020 Google LLC +# Copyright 2023 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/.kokoro/requirements.txt b/.kokoro/requirements.txt index c7929db6d..67d70a110 100644 --- a/.kokoro/requirements.txt +++ b/.kokoro/requirements.txt @@ -113,26 +113,30 @@ commonmark==0.9.1 \ --hash=sha256:452f9dc859be7f06631ddcb328b6919c67984aca654e5fefb3914d54691aed60 \ --hash=sha256:da2f38c92590f83de410ba1a3cbceafbc74fee9def35f9251ba9a971d6d66fd9 # via rich -cryptography==41.0.0 \ - --hash=sha256:0ddaee209d1cf1f180f1efa338a68c4621154de0afaef92b89486f5f96047c55 \ - --hash=sha256:14754bcdae909d66ff24b7b5f166d69340ccc6cb15731670435efd5719294895 \ - --hash=sha256:344c6de9f8bda3c425b3a41b319522ba3208551b70c2ae00099c205f0d9fd3be \ - --hash=sha256:34d405ea69a8b34566ba3dfb0521379b210ea5d560fafedf9f800a9a94a41928 \ - --hash=sha256:3680248309d340fda9611498a5319b0193a8dbdb73586a1acf8109d06f25b92d \ - --hash=sha256:3c5ef25d060c80d6d9f7f9892e1d41bb1c79b78ce74805b8cb4aa373cb7d5ec8 \ - --hash=sha256:4ab14d567f7bbe7f1cdff1c53d5324ed4d3fc8bd17c481b395db224fb405c237 \ - --hash=sha256:5c1f7293c31ebc72163a9a0df246f890d65f66b4a40d9ec80081969ba8c78cc9 \ - --hash=sha256:6b71f64beeea341c9b4f963b48ee3b62d62d57ba93eb120e1196b31dc1025e78 \ - --hash=sha256:7d92f0248d38faa411d17f4107fc0bce0c42cae0b0ba5415505df72d751bf62d \ - --hash=sha256:8362565b3835ceacf4dc8f3b56471a2289cf51ac80946f9087e66dc283a810e0 \ - --hash=sha256:84a165379cb9d411d58ed739e4af3396e544eac190805a54ba2e0322feb55c46 \ - --hash=sha256:88ff107f211ea696455ea8d911389f6d2b276aabf3231bf72c8853d22db755c5 \ - --hash=sha256:9f65e842cb02550fac96536edb1d17f24c0a338fd84eaf582be25926e993dde4 \ - --hash=sha256:a4fc68d1c5b951cfb72dfd54702afdbbf0fb7acdc9b7dc4301bbf2225a27714d \ - --hash=sha256:b7f2f5c525a642cecad24ee8670443ba27ac1fab81bba4cc24c7b6b41f2d0c75 \ - --hash=sha256:b846d59a8d5a9ba87e2c3d757ca019fa576793e8758174d3868aecb88d6fc8eb \ - --hash=sha256:bf8fc66012ca857d62f6a347007e166ed59c0bc150cefa49f28376ebe7d992a2 \ - --hash=sha256:f5d0bf9b252f30a31664b6f64432b4730bb7038339bd18b1fafe129cfc2be9be +cryptography==41.0.2 \ + --hash=sha256:01f1d9e537f9a15b037d5d9ee442b8c22e3ae11ce65ea1f3316a41c78756b711 \ + --hash=sha256:079347de771f9282fbfe0e0236c716686950c19dee1b76240ab09ce1624d76d7 \ + --hash=sha256:182be4171f9332b6741ee818ec27daff9fb00349f706629f5cbf417bd50e66fd \ + --hash=sha256:192255f539d7a89f2102d07d7375b1e0a81f7478925b3bc2e0549ebf739dae0e \ + --hash=sha256:2a034bf7d9ca894720f2ec1d8b7b5832d7e363571828037f9e0c4f18c1b58a58 \ + --hash=sha256:342f3767e25876751e14f8459ad85e77e660537ca0a066e10e75df9c9e9099f0 \ + --hash=sha256:439c3cc4c0d42fa999b83ded80a9a1fb54d53c58d6e59234cfe97f241e6c781d \ + --hash=sha256:49c3222bb8f8e800aead2e376cbef687bc9e3cb9b58b29a261210456a7783d83 \ + --hash=sha256:674b669d5daa64206c38e507808aae49904c988fa0a71c935e7006a3e1e83831 \ + --hash=sha256:7a9a3bced53b7f09da251685224d6a260c3cb291768f54954e28f03ef14e3766 \ + --hash=sha256:7af244b012711a26196450d34f483357e42aeddb04128885d95a69bd8b14b69b \ + --hash=sha256:7d230bf856164de164ecb615ccc14c7fc6de6906ddd5b491f3af90d3514c925c \ + --hash=sha256:84609ade00a6ec59a89729e87a503c6e36af98ddcd566d5f3be52e29ba993182 \ + --hash=sha256:9a6673c1828db6270b76b22cc696f40cde9043eb90373da5c2f8f2158957f42f \ + --hash=sha256:9b6d717393dbae53d4e52684ef4f022444fc1cce3c48c38cb74fca29e1f08eaa \ + --hash=sha256:9c3fe6534d59d071ee82081ca3d71eed3210f76ebd0361798c74abc2bcf347d4 \ + --hash=sha256:a719399b99377b218dac6cf547b6ec54e6ef20207b6165126a280b0ce97e0d2a \ + --hash=sha256:b332cba64d99a70c1e0836902720887fb4529ea49ea7f5462cf6640e095e11d2 \ + --hash=sha256:d124682c7a23c9764e54ca9ab5b308b14b18eba02722b8659fb238546de83a76 \ + --hash=sha256:d73f419a56d74fef257955f51b18d046f3506270a5fd2ac5febbfa259d6c0fa5 \ + --hash=sha256:f0dc40e6f7aa37af01aba07277d3d64d5a03dc66d682097541ec4da03cc140ee \ + --hash=sha256:f14ad275364c8b4e525d018f6716537ae7b6d369c094805cae45300847e0894f \ + --hash=sha256:f772610fe364372de33d76edcd313636a25684edb94cee53fd790195f5989d14 # via # gcp-releasetool # secretstorage diff --git a/.kokoro/test-samples-against-head.sh b/.kokoro/test-samples-against-head.sh index ba3a707b0..63ac41dfa 100755 --- a/.kokoro/test-samples-against-head.sh +++ b/.kokoro/test-samples-against-head.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2020 Google LLC +# Copyright 2023 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/.kokoro/test-samples-impl.sh b/.kokoro/test-samples-impl.sh index 2c6500cae..5a0f5fab6 100755 --- a/.kokoro/test-samples-impl.sh +++ b/.kokoro/test-samples-impl.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2021 Google LLC +# Copyright 2023 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/.kokoro/test-samples.sh b/.kokoro/test-samples.sh index 11c042d34..50b35a48c 100755 --- a/.kokoro/test-samples.sh +++ b/.kokoro/test-samples.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2020 Google LLC +# Copyright 2023 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/.kokoro/trampoline.sh b/.kokoro/trampoline.sh index f39236e94..d85b1f267 100755 --- a/.kokoro/trampoline.sh +++ b/.kokoro/trampoline.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2017 Google Inc. +# Copyright 2023 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/.kokoro/trampoline_v2.sh b/.kokoro/trampoline_v2.sh index 4af6cdc26..59a7cf3a9 100755 --- a/.kokoro/trampoline_v2.sh +++ b/.kokoro/trampoline_v2.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -# Copyright 2020 Google LLC +# Copyright 2023 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 5405cc8ff..9e3898fd1 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,4 +1,4 @@ -# Copyright 2021 Google LLC +# Copyright 2023 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/.trampolinerc b/.trampolinerc index 0eee72ab6..a7dfeb42c 100644 --- a/.trampolinerc +++ b/.trampolinerc @@ -1,4 +1,4 @@ -# Copyright 2020 Google LLC +# Copyright 2023 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,8 +12,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -# Template for .trampolinerc - # Add required env vars here. required_envvars+=( ) diff --git a/MANIFEST.in b/MANIFEST.in index e783f4c62..e0a667053 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # -# Copyright 2020 Google LLC +# Copyright 2023 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/docs/conf.py b/docs/conf.py index 5c83fd79e..d0468e25a 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2021 Google LLC +# Copyright 2023 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/scripts/decrypt-secrets.sh b/scripts/decrypt-secrets.sh index 21f6d2a26..0018b421d 100755 --- a/scripts/decrypt-secrets.sh +++ b/scripts/decrypt-secrets.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 Google Inc. All rights reserved. +# Copyright 2023 Google LLC All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/scripts/readme-gen/readme_gen.py b/scripts/readme-gen/readme_gen.py index 91b59676b..1acc11983 100644 --- a/scripts/readme-gen/readme_gen.py +++ b/scripts/readme-gen/readme_gen.py @@ -1,6 +1,6 @@ #!/usr/bin/env python -# Copyright 2016 Google Inc +# Copyright 2023 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -33,17 +33,17 @@ autoescape=True, ) -README_TMPL = jinja_env.get_template('README.tmpl.rst') +README_TMPL = jinja_env.get_template("README.tmpl.rst") def get_help(file): - return subprocess.check_output(['python', file, '--help']).decode() + return subprocess.check_output(["python", file, "--help"]).decode() def main(): parser = argparse.ArgumentParser() - parser.add_argument('source') - parser.add_argument('--destination', default='README.rst') + parser.add_argument("source") + parser.add_argument("--destination", default="README.rst") args = parser.parse_args() @@ -51,9 +51,9 @@ def main(): root = os.path.dirname(source) destination = os.path.join(root, args.destination) - jinja_env.globals['get_help'] = get_help + jinja_env.globals["get_help"] = get_help - with io.open(source, 'r') as f: + with io.open(source, "r") as f: config = yaml.load(f) # This allows get_help to execute in the right directory. @@ -61,9 +61,9 @@ def main(): output = README_TMPL.render(config) - with io.open(destination, 'w') as f: + with io.open(destination, "w") as f: f.write(output) -if __name__ == '__main__': +if __name__ == "__main__": main() diff --git a/setup.cfg b/setup.cfg index 25892161f..37b63aa49 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # -# Copyright 2020 Google LLC +# Copyright 2023 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. From db755ce5d2ae21e458f33f02cf63d2e5fbc45cf5 Mon Sep 17 00:00:00 2001 From: Chalmer Lowe Date: Wed, 19 Jul 2023 12:03:06 -0400 Subject: [PATCH 09/10] fix: updates typing in function definitions (#1613) --- google/cloud/bigquery/client.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/google/cloud/bigquery/client.py b/google/cloud/bigquery/client.py index 5a929fea4..11cceea42 100644 --- a/google/cloud/bigquery/client.py +++ b/google/cloud/bigquery/client.py @@ -3070,7 +3070,7 @@ def copy_table( job_id_prefix: Optional[str] = None, location: Optional[str] = None, project: Optional[str] = None, - job_config: CopyJobConfig = None, + job_config: Optional[CopyJobConfig] = None, retry: retries.Retry = DEFAULT_RETRY, timeout: TimeoutType = DEFAULT_TIMEOUT, ) -> job.CopyJob: @@ -3176,7 +3176,7 @@ def extract_table( job_id_prefix: Optional[str] = None, location: Optional[str] = None, project: Optional[str] = None, - job_config: ExtractJobConfig = None, + job_config: Optional[ExtractJobConfig] = None, retry: retries.Retry = DEFAULT_RETRY, timeout: TimeoutType = DEFAULT_TIMEOUT, source_type: str = "Table", @@ -3271,7 +3271,7 @@ def extract_table( def query( self, query: str, - job_config: QueryJobConfig = None, + job_config: Optional[QueryJobConfig] = None, job_id: Optional[str] = None, job_id_prefix: Optional[str] = None, location: Optional[str] = None, From 3a47b9843cd15b9c58117c5010b05f4ba2588127 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 19 Jul 2023 19:04:49 -0400 Subject: [PATCH 10/10] chore(main): release 3.11.4 (#1615) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- CHANGELOG.md | 7 +++++++ google/cloud/bigquery/version.py | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a0af641cf..cf64e2222 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,13 @@ [1]: https://pypi.org/project/google-cloud-bigquery/#history +## [3.11.4](https://github.com/googleapis/python-bigquery/compare/v3.11.3...v3.11.4) (2023-07-19) + + +### Bug Fixes + +* Updates typing in function definitions ([#1613](https://github.com/googleapis/python-bigquery/issues/1613)) ([db755ce](https://github.com/googleapis/python-bigquery/commit/db755ce5d2ae21e458f33f02cf63d2e5fbc45cf5)) + ## [3.11.3](https://github.com/googleapis/python-bigquery/compare/v3.11.2...v3.11.3) (2023-06-27) diff --git a/google/cloud/bigquery/version.py b/google/cloud/bigquery/version.py index 9e1402d15..a97ccc0c8 100644 --- a/google/cloud/bigquery/version.py +++ b/google/cloud/bigquery/version.py @@ -12,4 +12,4 @@ # See the License for the specific language governing permissions and # limitations under the License. -__version__ = "3.11.3" +__version__ = "3.11.4"