-
Notifications
You must be signed in to change notification settings - Fork 90
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 compatible import of retry_async does not work in 2.16.0 #586
Labels
priority: p1
Important issue which blocks shipping the next release. Will be fixed prior to next release.
type: bug
Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Comments
parthea
added
type: bug
Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
priority: p1
Important issue which blocks shipping the next release. Will be fixed prior to next release.
labels
Jan 30, 2024
potiuk
added a commit
to potiuk/airflow
that referenced
this issue
Jan 30, 2024
There is a backwards-incompatible change in google.api_core.retry.AsyncRetry imports. In 2.16.0 version of google-api-core, AsyncRetry was moved to google.api_core.retry_unary_async and backwards compatibility impots were not haandling the case of: `from google.api_core.retry_async imprt AsyncRetry` The issue is tracked in googleapis/python-api-core#586 Until it is solved, we need to handle both cases, because one works before and one after 2.16.0. But there is no import that works for both.
potiuk
added a commit
to apache/airflow
that referenced
this issue
Jan 30, 2024
There is a backwards-incompatible change in google.api_core.retry.AsyncRetry imports. In 2.16.0 version of google-api-core, AsyncRetry was moved to google.api_core.retry_unary_async and backwards compatibility impots were not haandling the case of: `from google.api_core.retry_async imprt AsyncRetry` The issue is tracked in googleapis/python-api-core#586 Until it is solved, we need to handle both cases, because one works before and one after 2.16.0. But there is no import that works for both.
Hi @potiuk, Thanks for reporting this issue. We've released |
Works nicely. 🙇 |
kosteev
pushed a commit
to GoogleCloudPlatform/composer-airflow
that referenced
this issue
Jul 19, 2024
There is a backwards-incompatible change in google.api_core.retry.AsyncRetry imports. In 2.16.0 version of google-api-core, AsyncRetry was moved to google.api_core.retry_unary_async and backwards compatibility impots were not haandling the case of: `from google.api_core.retry_async imprt AsyncRetry` The issue is tracked in googleapis/python-api-core#586 Until it is solved, we need to handle both cases, because one works before and one after 2.16.0. But there is no import that works for both. GitOrigin-RevId: 762f5447418e34d3472d9f23124546c0b6d995ae
kosteev
pushed a commit
to GoogleCloudPlatform/composer-airflow
that referenced
this issue
Sep 20, 2024
There is a backwards-incompatible change in google.api_core.retry.AsyncRetry imports. In 2.16.0 version of google-api-core, AsyncRetry was moved to google.api_core.retry_unary_async and backwards compatibility impots were not haandling the case of: `from google.api_core.retry_async imprt AsyncRetry` The issue is tracked in googleapis/python-api-core#586 Until it is solved, we need to handle both cases, because one works before and one after 2.16.0. But there is no import that works for both. GitOrigin-RevId: 762f5447418e34d3472d9f23124546c0b6d995ae
kosteev
pushed a commit
to GoogleCloudPlatform/composer-airflow
that referenced
this issue
Nov 8, 2024
There is a backwards-incompatible change in google.api_core.retry.AsyncRetry imports. In 2.16.0 version of google-api-core, AsyncRetry was moved to google.api_core.retry_unary_async and backwards compatibility impots were not haandling the case of: `from google.api_core.retry_async imprt AsyncRetry` The issue is tracked in googleapis/python-api-core#586 Until it is solved, we need to handle both cases, because one works before and one after 2.16.0. But there is no import that works for both. GitOrigin-RevId: 762f5447418e34d3472d9f23124546c0b6d995ae
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
priority: p1
Important issue which blocks shipping the next release. Will be fixed prior to next release.
type: bug
Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
The code aimed to maintain backwards compatibity when importing
retry_async
did not work when the .Environment details
python --version
: 3.8.18pip --version
: 23.3.2google-api-core
version:pip show google-api-core
Steps to reproduce
pip insall google-api-core==2.15.0
python
from google.api_core.retry_async import AsyncRetry
-> this nicely worksfrom google.api_core.retry import AsyncRetry
-> this does not work (as expected)pip insall google-api-core==2.16.0
python
from google.api_core.retry_async import AsyncRetry
-> this does not work (but should)from google.api_core.retry import AsyncRetry
-> this works (as expected)There was an attempt in #495 to make it work:
In: google/api_core/init.py
This is aimed to make
from google.api_core.retry_async import AsyncRetry
works, but importing a module into another modules__init__
does not work the way it is supposed to work.While there was attempt to even test it in #577, it did not test the right imports:
The
from google.api_core import retry_async
works, fine, butfrom google.api_core.retry_async import AsyncRetry
still raises theNo module named 'google.api_core.retry_async
- bycause of the way how python resolvesfrom
.I guess good solution will be to add back the
retry_async
as a (mostly empty) submodule and import all the needed classess from theretry_unary_async
packageCode example
Stack trace
Making sure to follow these steps will guarantee the quickest resolution possible.
Thanks!
The text was updated successfully, but these errors were encountered: