René's URL Explorer Experiment


Title: Can't delete custom metadata key on object · Issue #381 · googleapis/python-storage · GitHub

Open Graph Title: Can't delete custom metadata key on object · Issue #381 · googleapis/python-storage

X Title: Can't delete custom metadata key on object · Issue #381 · googleapis/python-storage

Description: I ran into some issues trying to delete a custom metadata key from a storage object. I expected the following to work, but did not result in the key being deleted: # blob has metadata with key 'foo' new_metadata = {} for x in blob.metada...

Open Graph Description: I ran into some issues trying to delete a custom metadata key from a storage object. I expected the following to work, but did not result in the key being deleted: # blob has metadata with key 'foo...

X Description: I ran into some issues trying to delete a custom metadata key from a storage object. I expected the following to work, but did not result in the key being deleted: # blob has metadata with key '...

Opengraph URL: https://github.com/googleapis/python-storage/issues/381

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Can't delete custom metadata key on object","articleBody":"I ran into some issues trying to delete a custom metadata key from a storage object. I expected the following to work, but did not result in the key being deleted:\r\n\r\n```python\r\n# blob has metadata with key 'foo'\r\nnew_metadata = {}\r\nfor x in blob.metadata:\r\n    if x != 'foo':\r\n        new_metadata[x] = blob.metadata[x]\r\n# new_metadata is now a copy of the metadata without key 'foo'\r\nblob.metadata = new_metadata\r\nblob.patch()\r\n# The blob's metadata still has key 'foo'\r\n```\r\n\r\nThe Rest API indicated to send a value of JSON null associated with the key to perform a deletion,  but that doesn't seem to happen when issuing a blob.patch with a metadata with a key removed.\r\n\r\nAs a work around, I created a copy of the desired metadata, deleted all of the blob's metadata (which does work), then updated the metadata to be the desired metadata.\r\n```python\r\nnew_metadata = {}\r\nfor x in blob.metadata:\r\n    if x != 'foo':\r\n        new_metadata[x] = blob.metadata[x]\r\nblob.metadata = None\r\nblob.patch()\r\nblob.metadata = new_metadata\r\nblob.patch()\r\n```","author":{"url":"https://github.com/hankd-v","@type":"Person","name":"hankd-v"},"datePublished":"2021-02-16T19:49:32.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/381/python-storage/issues/381"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:c4d528d6-027c-8dd7-6e40-9561da61e0ae
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idDCC4:91DE5:C1F8FE:11CE06B:6A4E2471
html-safe-noncef892cc9afbf2b652b9405fe10bcadeae1be41406e730b4192296c4047fbcb819
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEQ0M0OjkxREU1OkMxRjhGRToxMUNFMDZCOjZBNEUyNDcxIiwidmlzaXRvcl9pZCI6Ijc3NzkzNzM1MjY1NzAzNzgzNTQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac3e0420f363e2e81210b323dbba9f0b0d6aebcfeeaa4b9b0bc1e0b6109a8c5533
hovercard-subject-tagissue:809599979
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/googleapis/python-storage/381/issue_layout
twitter:imagehttps://opengraph.githubassets.com/b837a3f522a5bb1eb6cb3e40268ddb2299a1451c85f216e56d34c6157067922e/googleapis/python-storage/issues/381
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/b837a3f522a5bb1eb6cb3e40268ddb2299a1451c85f216e56d34c6157067922e/googleapis/python-storage/issues/381
og:image:altI ran into some issues trying to delete a custom metadata key from a storage object. I expected the following to work, but did not result in the key being deleted: # blob has metadata with key 'foo...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamehankd-v
hostnamegithub.com
expected-hostnamegithub.com
None030096ee0db095447bfe77409d33bfac127ca7128299c58deef27c52eaa1b1f0
turbo-cache-controlno-preview
go-importgithub.com/googleapis/python-storage git https://github.com/googleapis/python-storage.git
octolytics-dimension-user_id16785467
octolytics-dimension-user_logingoogleapis
octolytics-dimension-repository_id226992639
octolytics-dimension-repository_nwogoogleapis/python-storage
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id226992639
octolytics-dimension-repository_network_root_nwogoogleapis/python-storage
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
released9dd20d38f8ae3c4cb6b597807431db300d0bd2a
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/googleapis/python-storage/issues/381#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgoogleapis%2Fpython-storage%2Fissues%2F381
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgoogleapis%2Fpython-storage%2Fissues%2F381
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=googleapis%2Fpython-storage
Reloadhttps://github.com/googleapis/python-storage/issues/381
Reloadhttps://github.com/googleapis/python-storage/issues/381
Reloadhttps://github.com/googleapis/python-storage/issues/381
Please reload this pagehttps://github.com/googleapis/python-storage/issues/381
googleapis https://github.com/googleapis
python-storagehttps://github.com/googleapis/python-storage
Notifications https://github.com/login?return_to=%2Fgoogleapis%2Fpython-storage
Fork 172 https://github.com/login?return_to=%2Fgoogleapis%2Fpython-storage
Star 502 https://github.com/login?return_to=%2Fgoogleapis%2Fpython-storage
Code https://github.com/googleapis/python-storage
Issues 0 https://github.com/googleapis/python-storage/issues
Pull requests 0 https://github.com/googleapis/python-storage/pulls
Actions https://github.com/googleapis/python-storage/actions
Projects https://github.com/googleapis/python-storage/projects
Security and quality 0 https://github.com/googleapis/python-storage/security
Insights https://github.com/googleapis/python-storage/pulse
Code https://github.com/googleapis/python-storage
Issues https://github.com/googleapis/python-storage/issues
Pull requests https://github.com/googleapis/python-storage/pulls
Actions https://github.com/googleapis/python-storage/actions
Projects https://github.com/googleapis/python-storage/projects
Security and quality https://github.com/googleapis/python-storage/security
Insights https://github.com/googleapis/python-storage/pulse
#383https://github.com/googleapis/python-storage/pull/383
Can't delete custom metadata key on objecthttps://github.com/googleapis/python-storage/issues/381#top
#383https://github.com/googleapis/python-storage/pull/383
https://github.com/tritone
api: storageIssues related to the googleapis/python-storage API.https://github.com/googleapis/python-storage/issues?q=state%3Aopen%20label%3A%22api%3A%20storage%22
priority: p2Moderately-important priority. Fix may not be included in next release.https://github.com/googleapis/python-storage/issues?q=state%3Aopen%20label%3A%22priority%3A%20p2%22
type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.https://github.com/googleapis/python-storage/issues?q=state%3Aopen%20label%3A%22type%3A%20bug%22
https://github.com/hankd-v
hankd-vhttps://github.com/hankd-v
on Feb 16, 2021https://github.com/googleapis/python-storage/issues/381#issue-809599979
tritonehttps://github.com/tritone
api: storageIssues related to the googleapis/python-storage API.https://github.com/googleapis/python-storage/issues?q=state%3Aopen%20label%3A%22api%3A%20storage%22
priority: p2Moderately-important priority. Fix may not be included in next release.https://github.com/googleapis/python-storage/issues?q=state%3Aopen%20label%3A%22priority%3A%20p2%22
type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.https://github.com/googleapis/python-storage/issues?q=state%3Aopen%20label%3A%22type%3A%20bug%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.