Skip to content

Storage: str() metadata for bucket and blob #9729

@frankyn

Description

@frankyn

Surfaced by GCS team.

The Cloud Storage library must stringify metadata sent in bucket and blob.

Here's a known issue from not doing so:

from google.cloud import storage
client = storage.Client(project="my-project")
my_bucket = client.get_bucket("my-bucket")
my_blob = my_bucket.get_blob("my-blob")
my_blob.metadata["bad"] = float('nan')
my_blob.patch()

myblob.patch() will send an unquoted NaN, which is a bug in the Cloud Storage API that the client should no longer depend on.

Metadata

Metadata

Labels

api: storageIssues related to the Cloud Storage API.help wantedWe'd love to have community involvement on this issue.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.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions