Skip to content

Conversation

@andrewsg
Copy link
Contributor

@andrewsg andrewsg commented Nov 15, 2022

Replace _checkClosed() function with closed property on fileio.py classes. _checkClosed() will still work, as the inherited implementation uses self.closed.

Fixes #903 🦕

@andrewsg andrewsg requested review from a team as code owners November 15, 2022 23:48
@product-auto-label product-auto-label bot added size: s Pull request size is small. api: storage Issues related to the googleapis/python-storage API. labels Nov 15, 2022
Copy link
Contributor

@cojenco cojenco left a comment

Choose a reason for hiding this comment

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

Thanks Andrew for working on this!

Could we update the unit tests, maybe an extra line of assertion in test_close and test_write? Also, do we want to apply the same changes to BlobReader? Seems like it uses the same inherited implementation.

@andrewsg andrewsg force-pushed the fileio-closed-property branch from 5432691 to a9e6bcf Compare December 6, 2022 23:22
@andrewsg andrewsg merged commit 64406ca into main Dec 6, 2022
@andrewsg andrewsg deleted the fileio-closed-property branch December 6, 2022 23:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: storage Issues related to the googleapis/python-storage API. size: s Pull request size is small.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BlobWriter does not implement closed property

3 participants