Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: fixes discrepancy btwn python-api-core & bigquery re object defa… #1541

Merged
merged 29 commits into from
Apr 18, 2023

Conversation

chalmerlowe
Copy link
Contributor

@chalmerlowe chalmerlowe commented Apr 3, 2023

This fix attempts to overcome a backwards incompatible fix related to how python-api-core handles default timeout values and how bigquery handles default timeout values.

Namely:

  • the default timeout value in python-api-core is a Python object()
  • python-bigquery expects a value of None or a numeric value

This fix checks to see if the value being passed in is an object(), and if so, converts it to a NoneType value of None.

Fixes #1459 🦕

@product-auto-label product-auto-label bot added size: xs Pull request size is extra small. api: bigquery Issues related to the googleapis/python-bigquery API. labels Apr 3, 2023
chalmerlowe and others added 24 commits April 13, 2023 15:52
* fix: updates ipywidget dependency

* fix: updates ipywidget version number
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
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>
…fig` (#1509)

* feat: added `connection_properties` and `create_session` in load job
* 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 <partheniou@google.com>
Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
… 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)
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
…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.
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>
…ibility 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
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Co-authored-by: Tim Swast <swast@google.com>
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
* chore: update tests to be compatible with pandas 2.0

* use StringDtype without storage argument

* avoid Float64Dtype on older pandas
* chore: updates minimum version of bqstorage

* removes unneeded test

* updates linting, removes unneeded comment
@product-auto-label product-auto-label bot added size: xl Pull request size is extra large. and removed size: xs Pull request size is extra small. labels Apr 13, 2023
@product-auto-label product-auto-label bot added size: s Pull request size is small. and removed size: xl Pull request size is extra large. labels Apr 13, 2023
@chalmerlowe chalmerlowe marked this pull request as ready for review April 18, 2023 14:24
@chalmerlowe chalmerlowe requested review from a team as code owners April 18, 2023 14:24
Copy link
Contributor

@tswast tswast left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

It seems like there might still be more we need to do to handle the changes in googleapis/python-api-core#479 but this looks good to me as a stopgap.

(P.S. My blood boils a bit reading that discussion again. I just wish they could admit they made some breaking changes.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: bigquery Issues related to the googleapis/python-bigquery API. size: s Pull request size is small.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PollingFuture default timeout value object() incompatible with QueryJob typeguard in _reload_query_results
7 participants