You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 31, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Mar 31, 2026. It is now read-only.
bucket.delete(force=True) does not work if versioning is enabled #1071
api: storageIssues related to the googleapis/python-storage API.priority: p2Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.
(<class 'google.api_core.exceptions.Conflict'>, Conflict('DELETE https://storage.googleapis.com/storage/v1/b/sa-bk3-hec42-cis-tmp?prettyPrint=false: The bucket you tried to delete is not empty.'), <traceback object at 0x102c416c0>)
Expected Result
According to the documentation, If force=True is passed, this will first attempt to delete all the objects / blobs in the bucket (i.e. try to empty the bucket).
Besides, 409 should indicates that the bucket name is not available. This error number seems to be misleading.
changed the title [-]bucket.delete(force=True) does not work if [/-][+]bucket.delete(force=True) does not work if versioning is enabled[/+]on Jul 6, 2023
api: storageIssues related to the googleapis/python-storage API.priority: p2Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.
Activity
[-]bucket.delete(force=True) does not work if [/-][+]bucket.delete(force=True) does not work if versioning is enabled[/+]fix: bucket.delete(force=True) now works with version-enabled buckets (…