Skip to content

Commit 5a0a69d

Browse files
authored
Merge branch 'main' into jco-ga
2 parents 5cd1b07 + bfa95f1 commit 5a0a69d

File tree

15 files changed

+214
-28
lines changed

15 files changed

+214
-28
lines changed

.github/workflows/docs.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
on:
2+
pull_request:
3+
branches:
4+
- main
5+
name: docs
6+
jobs:
7+
docs:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Checkout
11+
uses: actions/checkout@v4
12+
- name: Setup Python
13+
uses: actions/setup-python@v5
14+
with:
15+
python-version: '3.10'
16+
- name: Install nox
17+
run: |
18+
python -m pip install --upgrade setuptools pip wheel
19+
python -m pip install nox
20+
- name: Run docs session
21+
run: |
22+
nox -s docs-3.10
23+
24+
docfx:
25+
runs-on: ubuntu-latest
26+
steps:
27+
- name: Checkout
28+
uses: actions/checkout@v4
29+
- name: Setup Python
30+
uses: actions/setup-python@v5
31+
with:
32+
python-version: '3.10'
33+
- name: Install nox
34+
run: |
35+
python -m pip install --upgrade setuptools pip wheel
36+
python -m pip install nox
37+
- name: Run docfx session
38+
run: |
39+
nox -s docfx-3.10

.github/workflows/unittest.yml

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
on:
2+
pull_request:
3+
branches:
4+
- main
5+
name: unittest
6+
jobs:
7+
unit:
8+
# Use `ubuntu-latest` runner.
9+
runs-on: ubuntu-latest
10+
strategy:
11+
matrix:
12+
python: ['3.9', '3.11', '3.12', '3.13']
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v4
16+
- name: Setup Python
17+
uses: actions/setup-python@v5
18+
with:
19+
python-version: ${{ matrix.python }}
20+
- name: Install nox
21+
run: |
22+
python -m pip install --upgrade setuptools pip wheel
23+
python -m pip install nox
24+
- name: Run unit tests
25+
env:
26+
COVERAGE_FILE: .coverage-${{ matrix.python }}
27+
run: |
28+
nox -s unit-${{ matrix.python }}
29+
- name: Upload coverage results
30+
uses: actions/upload-artifact@v4
31+
with:
32+
name: coverage-artifact-${{ matrix.python }}
33+
path: .coverage-${{ matrix.python }}
34+
include-hidden-files: true
35+
36+
unit_noextras:
37+
# Use `ubuntu-latest` runner.
38+
runs-on: ubuntu-latest
39+
strategy:
40+
matrix:
41+
python: ['3.9', '3.13']
42+
steps:
43+
- name: Checkout
44+
uses: actions/checkout@v4
45+
- name: Setup Python
46+
uses: actions/setup-python@v5
47+
with:
48+
python-version: ${{ matrix.python }}
49+
- name: Install nox
50+
run: |
51+
python -m pip install --upgrade setuptools pip wheel
52+
python -m pip install nox
53+
- name: Run unit_noextras tests
54+
env:
55+
COVERAGE_FILE: .coverage-unit-noextras-${{ matrix.python }}
56+
run: |
57+
nox -s unit_noextras-${{ matrix.python }}
58+
- name: Upload coverage results
59+
uses: actions/upload-artifact@v4
60+
with:
61+
name: coverage-artifact-unit-noextras-${{ matrix.python }}
62+
path: .coverage-unit-noextras-${{ matrix.python }}
63+
include-hidden-files: true
64+
65+
cover:
66+
runs-on: ubuntu-latest
67+
needs:
68+
- unit
69+
- unit_noextras
70+
steps:
71+
- name: Checkout
72+
uses: actions/checkout@v4
73+
- name: Setup Python
74+
uses: actions/setup-python@v5
75+
with:
76+
python-version: "3.9"
77+
- name: Install coverage
78+
run: |
79+
python -m pip install --upgrade setuptools pip wheel
80+
python -m pip install coverage
81+
- name: Download coverage results
82+
uses: actions/download-artifact@v4
83+
with:
84+
path: .coverage-results/
85+
- name: Report coverage results
86+
run: |
87+
find .coverage-results -type f -name '*.zip' -exec unzip {} \;
88+
coverage combine .coverage-results/**/.coverage*
89+
coverage report --show-missing --fail-under=100

CHANGELOG.md

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

77

8+
## [3.33.0](https://github.com/googleapis/python-bigquery/compare/v3.32.0...v3.33.0) (2025-05-19)
9+
10+
11+
### Features
12+
13+
* Add ability to set autodetect_schema query param in update_table ([#2171](https://github.com/googleapis/python-bigquery/issues/2171)) ([57f940d](https://github.com/googleapis/python-bigquery/commit/57f940d957613b4d80fb81ea40a1177b73856189))
14+
* Add dtype parameters to to_geodataframe functions ([#2176](https://github.com/googleapis/python-bigquery/issues/2176)) ([ebfd0a8](https://github.com/googleapis/python-bigquery/commit/ebfd0a83d43bcb96f65f5669437220aa6138b766))
15+
* Support job reservation ([#2186](https://github.com/googleapis/python-bigquery/issues/2186)) ([cb646ce](https://github.com/googleapis/python-bigquery/commit/cb646ceea172bf199f366ae0592546dff2d3bcb2))
16+
17+
18+
### Bug Fixes
19+
20+
* Ensure AccessEntry equality and repr uses the correct `entity_type` ([#2182](https://github.com/googleapis/python-bigquery/issues/2182)) ([0217637](https://github.com/googleapis/python-bigquery/commit/02176377d5e2fc25b5cd4f46aa6ebfb1b6a960a6))
21+
* Ensure SchemaField.field_dtype returns a string ([#2188](https://github.com/googleapis/python-bigquery/issues/2188)) ([7ec2848](https://github.com/googleapis/python-bigquery/commit/7ec2848379d5743bbcb36700a1153540c451e0e0))
22+
823
## [3.32.0](https://github.com/googleapis/python-bigquery/compare/v3.31.0...v3.32.0) (2025-05-12)
924

1025

google/cloud/bigquery/job/query.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1529,7 +1529,7 @@ def result( # type: ignore # (incompatible with supertype)
15291529
a DDL query, an ``_EmptyRowIterator`` instance is returned.
15301530
15311531
Raises:
1532-
google.cloud.exceptions.GoogleAPICallError:
1532+
google.api_core.exceptions.GoogleAPICallError:
15331533
If the job failed and retries aren't successful.
15341534
concurrent.futures.TimeoutError:
15351535
If the job did not complete in the given timeout.

google/cloud/bigquery/table.py

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1897,11 +1897,6 @@ def total_bytes_processed(self) -> Optional[int]:
18971897
"""total bytes processed from job statistics, if present."""
18981898
return self._total_bytes_processed
18991899

1900-
@property
1901-
def page_size(self) -> Optional[int]:
1902-
"""The maximum number of rows in each page of results from this request, if present."""
1903-
return self._page_size
1904-
19051900
def _is_almost_completely_cached(self):
19061901
"""Check if all results are completely cached.
19071902
@@ -1953,7 +1948,7 @@ def _should_use_bqstorage(self, bqstorage_client, create_bqstorage_client):
19531948
if self._is_almost_completely_cached():
19541949
return False
19551950

1956-
if self.max_results is not None or self.page_size is not None:
1951+
if self.max_results is not None:
19571952
return False
19581953

19591954
try:
@@ -2023,9 +2018,7 @@ def _maybe_warn_max_results(
20232018
bqstorage_client:
20242019
The BigQuery Storage client intended to use for downloading result rows.
20252020
"""
2026-
if bqstorage_client is not None and (
2027-
self.max_results is not None or self.page_size is not None
2028-
):
2021+
if bqstorage_client is not None and self.max_results is not None:
20292022
warnings.warn(
20302023
"Cannot use bqstorage_client if max_results is set, "
20312024
"reverting to fetching data with the REST endpoint.",

google/cloud/bigquery/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
__version__ = "3.32.0"
15+
__version__ = "3.33.0"

noxfile.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ def default(session, install_extras=True):
128128
# Run py.test against the unit tests.
129129
session.run(
130130
"py.test",
131-
"-n=auto",
131+
"-n=8",
132132
"--quiet",
133133
"-W default::PendingDeprecationWarning",
134134
"--cov=google/cloud/bigquery",
@@ -163,8 +163,7 @@ def unit_noextras(session):
163163
# so that it continues to be an optional dependency.
164164
# https://github.com/googleapis/python-bigquery/issues/1877
165165
if session.python == UNIT_TEST_PYTHON_VERSIONS[0]:
166-
session.install("pyarrow==4.0.0")
167-
166+
session.install("pyarrow==4.0.0", "numpy==1.20.2")
168167
default(session, install_extras=False)
169168

170169

testing/constraints-3.9.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ ipykernel==6.2.0
2020
opentelemetry-api==1.1.0
2121
opentelemetry-instrumentation==0.20b0
2222
opentelemetry-sdk==1.1.0
23+
numpy==1.20.2
2324
packaging==24.2.0
2425
pandas==1.3.0
2526
pandas-gbq==0.26.1

tests/unit/test__pandas_helpers.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1856,6 +1856,7 @@ def test__download_table_bqstorage_shuts_down_workers(
18561856
Make sure that when the top-level iterator goes out of scope (is deleted),
18571857
the child threads are also stopped.
18581858
"""
1859+
pytest.importorskip("google.cloud.bigquery_storage_v1")
18591860
from google.cloud.bigquery import dataset
18601861
from google.cloud.bigquery import table
18611862
import google.cloud.bigquery_storage_v1.reader

tests/unit/test__pyarrow_helpers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
import pytest
1616

17-
17+
numpy = pytest.importorskip("numpy")
1818
pyarrow = pytest.importorskip("pyarrow", minversion="3.0.0")
1919

2020

0 commit comments

Comments
 (0)