Skip to content

BUG 1.4: do not suppress errors when closing file handles #47160

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

Closed
wants to merge 1 commit into from
Closed

BUG 1.4: do not suppress errors when closing file handles #47160

wants to merge 1 commit into from

Conversation

twoertwein
Copy link
Member

@twoertwein twoertwein commented May 28, 2022

xref #47153 (comment), closes #47136

@simonjayhawkins simonjayhawkins added this to the 1.4.3 milestone May 28, 2022
@simonjayhawkins simonjayhawkins added IO Data IO issues that don't fit into a more specific label Error Reporting Incorrect or improved errors from pandas labels May 28, 2022
@simonjayhawkins simonjayhawkins linked an issue May 29, 2022 that may be closed by this pull request
3 tasks
Copy link
Member

@simonjayhawkins simonjayhawkins left a comment

Choose a reason for hiding this comment

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

@twoertwein can you open against main instead and we will merge this first, then merge main on the other PR

@twoertwein
Copy link
Member Author

@twoertwein can you open against main instead and we will merge this first, then merge main on the other PR

These changes will fail on main because _BytesTarFile was causing errors. I'm not entirely sure why, maybe super().close() will call close on both superclasses which then caused a ValueError.

@simonjayhawkins
Copy link
Member

right. so this PR is effectively a manual partial backport of #47153 (opened prematurely) and not broken off from #47153

I suppose that's OK (although not how we normally do things) if there are other issues on main.

the other PR should be merged first then?

@twoertwein
Copy link
Member Author

right. so this PR is effectively a manual partial backport of #47153 (opened prematurely) and not broken off from #47153

#47153 also de-duplicates the write buffer across _BytesTarFile and _BytesZipFile which is technically not needed for this bug.

the other PR should be merged first then?

When seeing it as a backport, it would make sense to merge the other one first.

@twoertwein
Copy link
Member Author

maybe a cleaner option: I do not remove the try-catch in #47153 (just fix the underlying bug+cleanup), open this PR against main after #47153 is merged

@twoertwein
Copy link
Member Author

maybe a cleaner option: I do not remove the try-catch in #47153 (just fix the underlying bug+cleanup), open this PR against main after #47153 is merged

I removed the bug fix in #47153

@twoertwein twoertwein marked this pull request as draft May 29, 2022 13:26
@simonjayhawkins
Copy link
Member

maybe a cleaner option: I do not remove the try-catch in #47153 (just fix the underlying bug+cleanup), open this PR against main after #47153 is merged

sgtm

@twoertwein
Copy link
Member Author

Closing this one as I don't know how to change the target branch. Opened #47165.

@twoertwein twoertwein closed this May 29, 2022
@twoertwein twoertwein deleted the close_14 branch June 8, 2022 19:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Error Reporting Incorrect or improved errors from pandas IO Data IO issues that don't fit into a more specific label
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: Pandas should not swallow exceptions when close()ing a write handle
2 participants