Skip to content

Commit 9d8409b

Browse files
chalmerlowerelease-please[bot]jumbosushigcf-owl-bot[bot]shobsi
authored
bug: fixes discrepancy btwn python-api-core & bigquery re object defa… (#1541)
* bug: fixes discrepancy btwn python-api-core & bigquery re object default timeout * Fix: loosen ipywidget dependency (#1504) * fix: updates ipywidget dependency * fix: updates ipywidget version number * chore(main): release 3.6.0 (#1490) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> * docs: Remove < 3.11 reference from README (#1502) * chore(python): upgrade gcp-releasetool in .kokoro [autoapprove] (#1508) Source-Link: googleapis/synthtool@5f2a608 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:8555f0e37e6261408f792bfd6635102d2da5ad73f8f09bcb24f25e6afb5fac97 Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> * feat: add `connection_properties` and `create_session` to `LoadJobConfig` (#1509) * feat: added `connection_properties` and `create_session` in load job * chore(deps): update all dependencies (#1501) * chore(deps): update all dependencies * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Anthonios Partheniou <[email protected]> Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> * chore(deps): update all dependencies (#1513) * feat: add default_query_job_config property and property setter to BQ client (#1511) Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly: - [x] Make sure to open an issue as a [feature request](https://togithub.com/googleapis/python-bigquery/issues/1512) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea - [x] Ensure the tests and linter pass - [x] Code coverage does not decrease (if any source code was changed) - [x] Appropriate docs were updated (if necessary) Fixes - [feature request](https://togithub.com/googleapis/python-bigquery/issues/1512)🦕 - [internal bug](https://b.corp.google.com/issues/271044948) * chore(deps): update all dependencies (#1514) * chore(deps): update dependency charset-normalizer to v3.1.0 (#1518) * chore(main): release 3.7.0 (#1507) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> * feat: expose configuration property on CopyJob, ExtractJob, LoadJob, QueryJob (#1521) * feat: expose configuration property on CopyJob, ExtractJob, LoadJob, QueryJob Note for google-cloud-bigquery developers: This also refactors these classes so that `_set_properties` does not modify the `_properties` dictionary in-place. Doing so was also mutating the request object, making it difficult to debug what request was _actually_ sent. Before this change, many tests hallucinated that the request was always equal to the response. * E google.api_core.exceptions.BadRequest: 400 Clone operation with write disposition WRITE_TRUNCATE is not supported. Please try again with WRITE_EMPTY. * chore(deps): Update nox in .kokoro/requirements.in [autoapprove] (#1527) Source-Link: googleapis/synthtool@92006bb Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:2e247c7bf5154df7f98cce087a20ca7605e236340c7d6d1a14447e5c06791bd6 Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> * feat: add default LoadJobConfig to Client (#1526) * feat: add bool, int, float, string dtype to to_dataframe (#1529) * fix: loosen ipywidgets restrictions further to address ipython compatibility issues (#1531) * fix: loosen ipywidgets restrictions further to address ipython compatibility issues * include ipywidgets in prerelease deps * show all package versions * add ipykernel dependency * ipykernel in noxfile * oops * chore(main): release 3.8.0 (#1525) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> * fix: keyerror when the load_table_from_dataframe accesses a unmapped dtype dataframe index (#1535) * feat: expose query job on dbapi cursor (#1520) Co-authored-by: Tim Swast <[email protected]> * chore(main): release 3.9.0 (#1537) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> * chore: update tests to be compatible with pandas 2.0 (#1538) * chore: update tests to be compatible with pandas 2.0 * use StringDtype without storage argument * avoid Float64Dtype on older pandas * chore(deps): update all dependencies (#1522) * chore: updates minimum version of bqstorage (#1542) * chore: updates minimum version of bqstorage * removes unneeded test * updates linting, removes unneeded comment * updates conditional checks, comments, adds test * Removes test, adds pragma no cover * Removes test * fix linting error --------- Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Atsushi Yamamoto <[email protected]> Co-authored-by: gcf-owl-bot[bot] <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Shobhit Singh <[email protected]> Co-authored-by: Mend Renovate <[email protected]> Co-authored-by: Anthonios Partheniou <[email protected]> Co-authored-by: chelsea-lin <[email protected]> Co-authored-by: Tim Swast <[email protected]> Co-authored-by: r1b <[email protected]>
1 parent 5838fd3 commit 9d8409b

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

google/cloud/bigquery/job/query.py

+9-1
Original file line numberDiff line numberDiff line change
@@ -764,7 +764,6 @@ def __init__(self, job_id, query, client, job_config=None):
764764
_helpers._set_sub_prop(
765765
self._properties, ["configuration", "query", "query"], query
766766
)
767-
768767
self._query_results = None
769768
self._done_timeout = None
770769
self._transport_timeout = None
@@ -1332,6 +1331,15 @@ def _reload_query_results(
13321331
# the timeout from the futures API is respected. See:
13331332
# https://github.com/GoogleCloudPlatform/google-cloud-python/issues/4135
13341333
timeout_ms = None
1334+
1335+
# Python_API_core, as part of a major rewrite of the deadline, timeout,
1336+
# retry process sets the timeout value as a Python object().
1337+
# Our system does not natively handle that and instead expects
1338+
# either none or a numeric value. If passed a Python object, convert to
1339+
# None.
1340+
if type(self._done_timeout) == object: # pragma: NO COVER
1341+
self._done_timeout = None
1342+
13351343
if self._done_timeout is not None:
13361344
# Subtract a buffer for context switching, network latency, etc.
13371345
api_timeout = self._done_timeout - _TIMEOUT_BUFFER_SECS

0 commit comments

Comments
 (0)