Title: Storage: Blob.delete returns self.bucket.delete_blob but delete_blob returns nothing · Issue #9985 · googleapis/google-cloud-python · GitHub
Open Graph Title: Storage: Blob.delete returns self.bucket.delete_blob but delete_blob returns nothing · Issue #9985 · googleapis/google-cloud-python
X Title: Storage: Blob.delete returns self.bucket.delete_blob but delete_blob returns nothing · Issue #9985 · googleapis/google-cloud-python
Description: Description In this function docs returns part says returns The blob that was just deleted. but actually self.bucket.delete_blob didn't return anything and rtype also not Blob but None. I'm not sure the fault is that Blob.delete return u...
Open Graph Description: Description In this function docs returns part says returns The blob that was just deleted. but actually self.bucket.delete_blob didn't return anything and rtype also not Blob but None. I'm not sur...
X Description: Description In this function docs returns part says returns The blob that was just deleted. but actually self.bucket.delete_blob didn't return anything and rtype also not Blob but None. I'm...
Opengraph URL: https://github.com/googleapis/google-cloud-python/issues/9985
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Storage: Blob.delete returns self.bucket.delete_blob but delete_blob returns nothing","articleBody":"## Description\r\n\r\nIn this function docs returns part says returns `The blob that was just deleted.` but actually `self.bucket.delete_blob` didn't return anything and `rtype` also not `Blob` but `None`.\r\n\r\nI'm not sure the fault is that `Blob.delete` return unnecessary or `Bucket.delete_blob` didn't return after `blob` api_request.\r\n\r\n## Blob\r\n\r\n\u003chttps://github.com/googleapis/google-cloud-python/blob/master/storage/google/cloud/storage/blob.py#L548\u003e\r\n\r\n```python\r\n def delete(self, client=None):\r\n \"\"\"Deletes a blob from Cloud Storage.\r\n If :attr:`user_project` is set on the bucket, bills the API request\r\n to that project.\r\n :type client: :class:`~google.cloud.storage.client.Client` or\r\n ``NoneType``\r\n :param client: Optional. The client to use. If not passed, falls back\r\n to the ``client`` stored on the blob's bucket.\r\n :rtype: :class:`Blob`\r\n :returns: The blob that was just deleted.\r\n :raises: :class:`google.cloud.exceptions.NotFound`\r\n (propagated from\r\n :meth:`google.cloud.storage.bucket.Bucket.delete_blob`).\r\n \"\"\"\r\n return self.bucket.delete_blob(\r\n self.name, client=client, generation=self.generation\r\n )\r\n```\r\n\r\n## Bucket\r\n\r\n\u003chttps://github.com/googleapis/google-cloud-python/blob/master/storage/google/cloud/storage/bucket.py#L1055\u003e\r\n\r\n```python\r\n def delete_blob(self, blob_name, client=None, generation=None):\r\n \"\"\"Deletes a blob from the current bucket.\r\n If the blob isn't found (backend 404), raises a\r\n :class:`google.cloud.exceptions.NotFound`.\r\n For example:\r\n .. literalinclude:: snippets.py\r\n :start-after: [START delete_blob]\r\n :end-before: [END delete_blob]\r\n If :attr:`user_project` is set, bills the API request to that project.\r\n :type blob_name: str\r\n :param blob_name: A blob name to delete.\r\n :type client: :class:`~google.cloud.storage.client.Client` or\r\n ``NoneType``\r\n :param client: Optional. The client to use. If not passed, falls back\r\n to the ``client`` stored on the current bucket.\r\n :type generation: long\r\n :param generation: Optional. If present, permanently deletes a specific\r\n revision of this object.\r\n :raises: :class:`google.cloud.exceptions.NotFound` (to suppress\r\n the exception, call ``delete_blobs``, passing a no-op\r\n ``on_error`` callback, e.g.:\r\n .. literalinclude:: snippets.py\r\n :start-after: [START delete_blobs]\r\n :end-before: [END delete_blobs]\r\n \"\"\"\r\n client = self._require_client(client)\r\n blob = Blob(blob_name, bucket=self, generation=generation)\r\n\r\n # We intentionally pass `_target_object=None` since a DELETE\r\n # request has no response value (whether in a standard request or\r\n # in a batch request).\r\n client._connection.api_request(\r\n method=\"DELETE\",\r\n path=blob.path,\r\n query_params=blob._query_params,\r\n _target_object=None,\r\n )\r\n````\r\n","author":{"url":"https://github.com/sheiun","@type":"Person","name":"sheiun"},"datePublished":"2019-12-17T09:36:47.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/9985/google-cloud-python/issues/9985"}
| 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:3745d6aa-8ab1-6b94-3274-02e4bf036c7d |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C5C2:6529:397803:5216FE:6A4E6AA8 |
| html-safe-nonce | 896a51597c3ae9bb614522521803e0332ecba7840d2fc767a8844e30c3a53dbb |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNUMyOjY1Mjk6Mzk3ODAzOjUyMTZGRTo2QTRFNkFBOCIsInZpc2l0b3JfaWQiOiI0ODM1NTE0NDk5OTI1NDM3MDk2IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | b3a94c87b04a14f0f776ba355ad9079aa8424d7900438334b202e34b456f589e |
| hovercard-subject-tag | issue:538946703 |
| 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/google-cloud-python/9985/issue_layout |
| twitter:image | https://opengraph.githubassets.com/2f301220d7290002a5f02aee56b4fcb0200c378520316f3ffb8f9ebf7f234f03/googleapis/google-cloud-python/issues/9985 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/2f301220d7290002a5f02aee56b4fcb0200c378520316f3ffb8f9ebf7f234f03/googleapis/google-cloud-python/issues/9985 |
| og:image:alt | Description In this function docs returns part says returns The blob that was just deleted. but actually self.bucket.delete_blob didn't return anything and rtype also not Blob but None. I'm not sur... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | sheiun |
| hostname | github.com |
| expected-hostname | github.com |
| None | 41b6ab3ba6d20a71766ac245b5a4a94c6fc672a9cd4da7d44c1b33ab8bf6a21c |
| turbo-cache-control | no-preview |
| go-import | github.com/googleapis/google-cloud-python git https://github.com/googleapis/google-cloud-python.git |
| octolytics-dimension-user_id | 16785467 |
| octolytics-dimension-user_login | googleapis |
| octolytics-dimension-repository_id | 16316451 |
| octolytics-dimension-repository_nwo | googleapis/google-cloud-python |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 16316451 |
| octolytics-dimension-repository_network_root_nwo | googleapis/google-cloud-python |
| 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 | e6a744804e8e70f97b4d5a18a94dcc63db22f97a |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width