Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: implement closed property on fileio.py classes #907

Merged
merged 3 commits into from
Dec 6, 2022

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 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