| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| if isinstance(doomed, Bucket): | ||
| retry = RetryErrors(Conflict) | ||
| retry(doomed.delete)(force=True) | ||
| retry_409 = RetryErrors(Conflict) |
| retry_409(doomed.delete)(force=True) | ||
| else: | ||
| doomed.delete() | ||
| retry_400(doomed.delete)() |
|
@tseaver Were you able to reproduce this locally? |
Sorry, something went wrong.
Not except by borking the delete of tables in the dataset. |
Sorry, something went wrong.
|
Gotcher. Thanks for the tip. Can you add an error predicate, e.g. def err_pred(exc):
return (len(exc._errors) == 1 and
exc._errors[0]['reason'] == 'resourceInUse')Here is the output from catching that error: >>> try:
... dataset.delete()
... except Exception as exc:
... pass
...
>>> import json
>>> print(json.dumps(exc.__dict__, indent=2))
{
"message": "Dataset {PROJ}:create_table{TESTID} is still in use (DELETE https://www.googleapis.com/bigquery/v2/projects/{PROJ}/datasets/create_table{TESTID})",
"_errors": [
{
"domain": "global",
"message": "Dataset {PROJ}:create_table{TESTID} is still in use",
"reason": "resourceInUse"
}
]
} |
Sorry, something went wrong.
Addresses: #2333 (comment)
There was a problem hiding this comment.
LGTM
Sorry, something went wrong.
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: - [ ] Make sure to open an issue as a [bug/issue](https://github.com/googleapis/python-bigquery/issues/new/choose) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea - [ ] Ensure the tests and linter pass - [ ] Code coverage does not decrease (if any source code was changed) - [ ] Appropriate docs were updated (if necessary) Fixes #<issue_number_goes_here> 🦕 --------- Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
PR created by the Librarian CLI to initialize a release. Merging this PR will auto trigger a release. Librarian Version: v0.7.0 Language Image: us-central1-docker.pkg.dev/cloud-sdk-librarian-prod/images-prod/python-librarian-generator@sha256:c8612d3fffb3f6a32353b2d1abd16b61e87811866f7ec9d65b59b02eb452a620 <details><summary>google-cloud-bigquery: 3.40.0</summary> ## [3.40.0](googleapis/python-bigquery@v3.39.0...v3.40.0) (2026-01-08) ### Features * support load_table and list_rows with picosecond timestamp (#2351) ([46764a59](googleapis/python-bigquery@46764a59)) * support timestamp_precision in table schema (#2333) ([8d5785ae](googleapis/python-bigquery@8d5785ae)) </details>
| Back | FazBrowse Home | New Git URL |
Closes #2318.