-
Notifications
You must be signed in to change notification settings - Fork 88
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
Backward incompatible change: _DEFAULT_VALUE should be None and not object() in PollingFuture #479
Comments
The default value cannot be None and the previous behavior of api-core was a bug. The gist of it is the need to distinguish between infinite timeout (None) and not specified timeout ( The bigquery library (https://github.com/googleapis/python-bigquery/blob/b8502a6641b653610643aeb38992d330823feb94/google/cloud/bigquery/job/query.py#L1327) fails on the type of its own declared variable The #462 was written with backward compatibilty in mind, but it is done in Python (not strongly typed language) and it was fixing a completely broken logic in api-core on multiple levels. The code is still expected to work fine and backward-compatilbe in standard scenarios, but your case is special: it extend the polling future behavior and introduces and assumption that timeout value is always numeric. The fact that timeout was specified Making |
I'm not in the gapic team anymore, so I can't do edits anymore, but please strongly consider reassigning this issue to the python-bigquery repository and make sure that python-bigquery manual layer works on top of the recent api-core changes. |
Thanks @vam-google, I have created this issue in bigquery. |
Closing this down as the issue was reassigned to bigquery. |
A refactor last month introduced the global
_DEFAULT_VALUE
in the PollingFuture class ->here.
This change is backward incompatible as some libraries (ex: google-cloud-bigquery) are based on the fact that the default value is
None
and notobject()
.For example, the typeguard here becomes invalid and enters which results in a error on this line.
Stack trace
Thanks!
The text was updated successfully, but these errors were encountered: