Skip to content
This repository was archived by the owner on Mar 31, 2026. It is now read-only.

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

Merged
andrewsg merged 3 commits into
mainfrom
fileio-closed-property
Dec 6, 2022
Merged

fix: implement closed property on fileio.py classes#907
andrewsg merged 3 commits into
mainfrom
fileio-closed-property

Conversation

@andrewsg

@andrewsgandrewsg commented Nov 15, 2022

Copy link
Copy Markdown
Contributor

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 teamNovember 15, 2022 23:48
@product-auto-labelproduct-auto-labelBot added size: s Pull request size is small. api: storage Issues related to the googleapis/python-storage API. labels Nov 15, 2022

@cojencocojenco 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.

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
andrewsgforce-pushed the fileio-closed-property branch from 5432691 to a9e6bcfCompareDecember 6, 2022 23:22
@andrewsg
andrewsg merged commit 64406ca into mainDec 6, 2022
@andrewsg
andrewsg deleted the fileio-closed-property branch December 6, 2022 23:34
@release-pleaserelease-pleaseBot mentioned this pull request Dec 6, 2022
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

api: storageIssues related to the googleapis/python-storage API.size: sPull 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

@andrewsg@frankyn@cojenco