Skip to content

Commit 9d256d5

Browse files
authored
Merge pull request #1175 from googleapis/sync-v3
chore: sync v3 branch with main
2 parents 5f50242 + 35d2d70 commit 9d256d5

File tree

97 files changed

+1826
-671
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

97 files changed

+1826
-671
lines changed

.github/.OwlBot.lock.yaml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
# Copyright 2022 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
114
docker:
215
image: gcr.io/cloud-devrel-public-resources/owlbot-python:latest
3-
digest: sha256:f0e4b51deef56bed74d3e2359c583fc104a8d6367da3984fc5c66938db738828
16+
digest: sha256:7cffbc10910c3ab1b852c05114a08d374c195a81cdec1d4a67a1d129331d0bfe

.github/sync-repo-settings.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ branchProtectionRules:
1414
- 'Kokoro snippets-3.8'
1515
- 'cla/google'
1616
- 'Samples - Lint'
17-
- 'Samples - Python 3.6'
1817
- 'Samples - Python 3.7'
1918
- 'Samples - Python 3.8'
2019
- pattern: v3
@@ -26,6 +25,5 @@ branchProtectionRules:
2625
- 'Kokoro snippets-3.8'
2726
- 'cla/google'
2827
- 'Samples - Lint'
29-
- 'Samples - Python 3.6'
3028
- 'Samples - Python 3.7'
3129
- 'Samples - Python 3.8'
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Format: //devtools/kokoro/config/proto/build.proto
2+
3+
# Only run this nox session.
4+
env_vars: {
5+
key: "NOX_SESSION"
6+
value: "prerelease_deps-3.10"
7+
}

.kokoro/continuous/prerelease-deps-3.8.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
# Only run this nox session.
44
env_vars: {
55
key: "NOX_SESSION"
6-
value: "prerelease_deps"
6+
value: "prerelease_deps-3.8"
77
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Format: //devtools/kokoro/config/proto/build.proto
2+
3+
# Only run this nox session.
4+
env_vars: {
5+
key: "NOX_SESSION"
6+
value: "prerelease_deps-3.10"
7+
}

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ repos:
2222
- id: end-of-file-fixer
2323
- id: check-yaml
2424
- repo: https://github.com/psf/black
25-
rev: 19.10b0
25+
rev: 22.3.0
2626
hooks:
2727
- id: black
2828
- repo: https://gitlab.com/pycqa/flake8

CHANGELOG.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,54 @@
55
[1]: https://pypi.org/project/google-cloud-bigquery/#history
66

77

8+
### [2.34.3](https://github.com/googleapis/python-bigquery/compare/v2.34.2...v2.34.3) (2022-03-29)
9+
10+
11+
### Bug Fixes
12+
13+
* update content-type header ([#1171](https://github.com/googleapis/python-bigquery/issues/1171)) ([921b440](https://github.com/googleapis/python-bigquery/commit/921b440fdd151e88ee5b3e0d9fb90177877dc11a))
14+
15+
### [2.34.2](https://github.com/googleapis/python-bigquery/compare/v2.34.1...v2.34.2) (2022-03-05)
16+
17+
18+
### Bug Fixes
19+
20+
* **deps:** require google-api-core>=1.31.5, >=2.3.2 ([#1157](https://github.com/googleapis/python-bigquery/issues/1157)) ([0c15790](https://github.com/googleapis/python-bigquery/commit/0c15790720ff573a501cfe760dd74ee166e1a353))
21+
* **deps:** require proto-plus>=1.15.0 ([0c15790](https://github.com/googleapis/python-bigquery/commit/0c15790720ff573a501cfe760dd74ee166e1a353))
22+
23+
### [2.34.1](https://github.com/googleapis/python-bigquery/compare/v2.34.0...v2.34.1) (2022-03-02)
24+
25+
26+
### Dependencies
27+
28+
* add "extra" for IPython, exclude bad IPython release ([#1151](https://github.com/googleapis/python-bigquery/issues/1151)) ([0fbe12d](https://github.com/googleapis/python-bigquery/commit/0fbe12d1ababa45aa774b026a93c0af9e8f343d9))
29+
* allow pyarrow 7.0 ([#1112](https://github.com/googleapis/python-bigquery/issues/1112)) ([57f8ea9](https://github.com/googleapis/python-bigquery/commit/57f8ea95e152dc238e7a4941f96c54be53f7eaf3))
30+
31+
## [2.34.0](https://github.com/googleapis/python-bigquery/compare/v2.33.0...v2.34.0) (2022-02-18)
32+
33+
34+
### Features
35+
36+
* support BI Engine statistics in query job ([#1144](https://github.com/googleapis/python-bigquery/issues/1144)) ([7482549](https://github.com/googleapis/python-bigquery/commit/7482549cb42ed5302634ab4fb7b4efcd97b35c68))
37+
38+
## [2.33.0](https://github.com/googleapis/python-bigquery/compare/v2.32.0...v2.33.0) (2022-02-16)
39+
40+
41+
### Features
42+
43+
* add `--no_query_cache` option to `%%bigquery` magics to disable query cache ([#1141](https://github.com/googleapis/python-bigquery/issues/1141)) ([7dd30af](https://github.com/googleapis/python-bigquery/commit/7dd30af41b8a595b96176c964ba14aa41645ef0d))
44+
45+
46+
### Bug Fixes
47+
48+
* return 403 when VPC-SC violation happens ([#1131](https://github.com/googleapis/python-bigquery/issues/1131)) ([f5daa9b](https://github.com/googleapis/python-bigquery/commit/f5daa9b41377a58cb3220bb2ab7c72adc6462196))
49+
50+
51+
### Documentation
52+
53+
* reference BigQuery REST API defaults in `LoadJobConfig` descrip… ([#1132](https://github.com/googleapis/python-bigquery/issues/1132)) ([18d9580](https://github.com/googleapis/python-bigquery/commit/18d958062721d6be81e7bd7a5bd66f277344a864))
54+
* show common job properties in `get_job` and `cancel_job` samples ([#1137](https://github.com/googleapis/python-bigquery/issues/1137)) ([8edc10d](https://github.com/googleapis/python-bigquery/commit/8edc10d019bd96defebc4f92a47774901e9b956f))
55+
856
## [2.32.0](https://github.com/googleapis/python-bigquery/compare/v2.31.0...v2.32.0) (2022-01-12)
957

1058

docs/conf.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,10 @@
362362
intersphinx_mapping = {
363363
"python": ("https://python.readthedocs.org/en/latest/", None),
364364
"google-auth": ("https://googleapis.dev/python/google-auth/latest/", None),
365-
"google.api_core": ("https://googleapis.dev/python/google-api-core/latest/", None,),
365+
"google.api_core": (
366+
"https://googleapis.dev/python/google-api-core/latest/",
367+
None,
368+
),
366369
"grpc": ("https://grpc.github.io/grpc/python/", None),
367370
"proto-plus": ("https://proto-plus-python.readthedocs.io/en/latest/", None),
368371
"protobuf": ("https://googleapis.dev/python/protobuf/latest/", None),

docs/snippets.py

Lines changed: 0 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -752,45 +752,6 @@ def test_client_query_total_rows(client, capsys):
752752
assert "Got 100 rows." in out
753753

754754

755-
def test_manage_job(client):
756-
sql = """
757-
SELECT corpus
758-
FROM `bigquery-public-data.samples.shakespeare`
759-
GROUP BY corpus;
760-
"""
761-
location = "us"
762-
job = client.query(sql, location=location)
763-
job_id = job.job_id
764-
765-
# [START bigquery_cancel_job]
766-
# TODO(developer): Uncomment the lines below and replace with your values.
767-
# from google.cloud import bigquery
768-
# client = bigquery.Client()
769-
# job_id = 'bq-job-123x456-123y123z123c' # replace with your job ID
770-
# location = 'us' # replace with your location
771-
772-
job = client.cancel_job(job_id, location=location)
773-
# [END bigquery_cancel_job]
774-
775-
# [START bigquery_get_job]
776-
# TODO(developer): Uncomment the lines below and replace with your values.
777-
# from google.cloud import bigquery
778-
# client = bigquery.Client()
779-
# job_id = 'bq-job-123x456-123y123z123c' # replace with your job ID
780-
# location = 'us' # replace with your location
781-
782-
job = client.get_job(job_id, location=location) # API request
783-
784-
# Print selected job properties
785-
print("Details for job {} running in {}:".format(job_id, location))
786-
print(
787-
"\tType: {}\n\tState: {}\n\tCreated: {}".format(
788-
job.job_type, job.state, job.created
789-
)
790-
)
791-
# [END bigquery_get_job]
792-
793-
794755
def test_query_external_gcs_permanent_table(client, to_delete):
795756
dataset_id = "query_external_gcs_{}".format(_millis())
796757
project = client.project

google/cloud/bigquery/_pandas_helpers.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -659,7 +659,10 @@ def dataframe_to_parquet(
659659
bq_schema = schema._to_schema_fields(bq_schema)
660660
arrow_table = dataframe_to_arrow(dataframe, bq_schema)
661661
pyarrow.parquet.write_table(
662-
arrow_table, filepath, compression=parquet_compression, **kwargs,
662+
arrow_table,
663+
filepath,
664+
compression=parquet_compression,
665+
**kwargs,
663666
)
664667

665668

0 commit comments

Comments
 (0)