Title: Raise a warning in google.api_core.retry.retry_target if the return value is awaitable · Issue #542 · googleapis/python-api-core · GitHub
Open Graph Title: Raise a warning in google.api_core.retry.retry_target if the return value is awaitable · Issue #542 · googleapis/python-api-core
X Title: Raise a warning in google.api_core.retry.retry_target if the return value is awaitable · Issue #542 · googleapis/python-api-core
Description: A warning can be raised within google.api_core.retry.retry_target depending on whether the return value of target() is awaitable in the following way: if inspect.isawaitable(target()): raise ValueError("Incorrect use of Retry in async co...
Open Graph Description: A warning can be raised within google.api_core.retry.retry_target depending on whether the return value of target() is awaitable in the following way: if inspect.isawaitable(target()): raise ValueE...
X Description: A warning can be raised within google.api_core.retry.retry_target depending on whether the return value of target() is awaitable in the following way: if inspect.isawaitable(target()): raise ValueE...
Opengraph URL: https://github.com/googleapis/python-api-core/issues/542
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Raise a warning in google.api_core.retry.retry_target if the return value is awaitable","articleBody":"A warning can be raised within `google.api_core.retry.retry_target` depending on whether the return value of `target()` is awaitable in the following way:\r\n\r\n```python3\r\nif inspect.isawaitable(target()):\r\n raise ValueError(\"Incorrect use of Retry in async code. Use AsyncRetry instead\")\r\n```\r\n\r\nThis will ensure that `google.api_core.retry.Retry` is not incorrectly used in async clients/code and will suggest users to use `google.api_core.retry_async.AsyncRetry` instead\r\n\r\nrelated issue: [fix retries in async client](https://github.com/googleapis/google-cloud-python/issues/11405)","author":{"url":"https://github.com/ohmayr","@type":"Person","name":"ohmayr"},"datePublished":"2023-10-25T17:12:58.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/542/python-api-core/issues/542"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:6ae9b58f-7792-ded1-061e-e079a6861492 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9FEC:E21C4:2C54F92:3DCF70E:6A4F6AD3 |
| html-safe-nonce | a8faae1ba1244a2279a16027b393e9934aa7ef3630641d53652591e2d9c8d5e9 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5RkVDOkUyMUM0OjJDNTRGOTI6M0RDRjcwRTo2QTRGNkFEMyIsInZpc2l0b3JfaWQiOiIzMTM1NDAyNDM2NTQ3NTM3NjE5IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | b7922d2b4fe3f2efc48d59b109a05e6610c3446fb5021ae1c223cd024c2839c6 |
| hovercard-subject-tag | issue:1961876698 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/googleapis/python-api-core/542/issue_layout |
| twitter:image | https://opengraph.githubassets.com/24cffa39ed648077920a335810b556c782d31f8d2f1f15252358922d7c4b6000/googleapis/python-api-core/issues/542 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/24cffa39ed648077920a335810b556c782d31f8d2f1f15252358922d7c4b6000/googleapis/python-api-core/issues/542 |
| og:image:alt | A warning can be raised within google.api_core.retry.retry_target depending on whether the return value of target() is awaitable in the following way: if inspect.isawaitable(target()): raise ValueE... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | ohmayr |
| hostname | github.com |
| expected-hostname | github.com |
| None | b92d11c0aa4a77d54ef4af1078b6a15fb5a70a215b30c4ecf28889d5a8e656d9 |
| turbo-cache-control | no-preview |
| go-import | github.com/googleapis/python-api-core git https://github.com/googleapis/python-api-core.git |
| octolytics-dimension-user_id | 16785467 |
| octolytics-dimension-user_login | googleapis |
| octolytics-dimension-repository_id | 226992456 |
| octolytics-dimension-repository_nwo | googleapis/python-api-core |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 226992456 |
| octolytics-dimension-repository_network_root_nwo | googleapis/python-api-core |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 4b249b445842943ed31549e027f57a8ade9881ed |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width