Skip to content

Add 'Bucket.labels' property. - #3478

Merged
tseaver merged 2 commits into
googleapis:masterfrom
tseaver:3473-storage-bucket_labels
Jun 6, 2017
Merged

Add 'Bucket.labels' property.#3478
tseaver merged 2 commits into
googleapis:masterfrom
tseaver:3473-storage-bucket_labels

Conversation

@tseaver

Copy link
Copy Markdown
Contributor

@tseavertseaver added api: storage Issues related to the Cloud Storage API. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. labels Jun 6, 2017
@googlebotgooglebot added the cla: yes This human has signed the Contributor License Agreement. label Jun 6, 2017

@dhermesdhermes left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM pending nits


:setter: Set labels for this bucket.
:getter: Gets the labels for this bucket.

This comment was marked as spam.

blob = self._make_one(blob_name, bucket=None)
unicode_name = u'wet \N{sailboat}'
self.assertNotEqual(blob.name, blob_name)
self.assertNotIsInstance(blob.name, bytes)

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

Comment threadstorage/tests/unit/test_blob.py Outdated
unicode_name = u'wet \N{sailboat}'
self.assertNotEqual(blob.name, blob_name)
self.assertNotIsInstance(blob.name, bytes)
self.assertIsInstance(blob.name, type(unicode_name))

This comment was marked as spam.

This comment was marked as spam.

Comment threadstorage/tests/unit/test_bucket.py Outdated
self.assertEqual(bucket.labels, {})
bucket.labels = LABELS
self.assertEqual(bucket.labels, LABELS)
self.assertTrue('labels' in bucket._changes)

This comment was marked as spam.

This comment was marked as spam.

@tseaver

Copy link
Copy Markdown
ContributorAuthor

I will merge when CI is green.

Comment threadstorage/tests/unit/test_bucket.py Outdated
self.assertEqual(bucket.labels, {})
bucket.labels = LABELS
self.assertEqual(bucket.labels, LABELS)
self.assertIsNot(bucket.labels, LABELS)

This comment was marked as spam.

This comment was marked as spam.

@tseaver
tseaver merged commit 179997e into googleapis:masterJun 6, 2017
@tseaver
tseaver deleted the 3473-storage-bucket_labels branch June 6, 2017 23:01
This was referenced Jun 26, 2017
landrito pushed a commit to landrito/google-cloud-python that referenced this pull request Aug 21, 2017
* Avoid UnicodeWarning reported by new py.test
* Add 'Bucket.labels' property.
See: https://cloud.google.com/storage/docs/json_api/v1/buckets#labelsClosesgoogleapis#3473.
landrito pushed a commit to landrito/google-cloud-python that referenced this pull request Aug 22, 2017
* Avoid UnicodeWarning reported by new py.test
* Add 'Bucket.labels' property.
See: https://cloud.google.com/storage/docs/json_api/v1/buckets#labelsClosesgoogleapis#3473.
landrito pushed a commit to landrito/google-cloud-python that referenced this pull request Aug 22, 2017
* Avoid UnicodeWarning reported by new py.test
* Add 'Bucket.labels' property.
See: https://cloud.google.com/storage/docs/json_api/v1/buckets#labelsClosesgoogleapis#3473.
parthea pushed a commit that referenced this pull request Oct 21, 2023
parthea pushed a commit that referenced this pull request Mar 9, 2026
* Avoid UnicodeWarning reported by new py.test
* Add 'Bucket.labels' property.
See: https://cloud.google.com/storage/docs/json_api/v1/buckets#labelsCloses#3473.
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: storageIssues related to the Cloud Storage API.cla: yesThis human has signed the Contributor License Agreement.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@tseaver@dhermes@googlebot