Skip to content

Conversation

eric-wieser
Copy link
Contributor

Context managers will resume with an exception if the with block calling them fails.
This happening is not an excuse to not clean up.

  • closes #xxxx
  • tests added / passed
  • passes black pandas
  • passes git diff upstream/master -u -- "*.py" | flake8 --diff
  • whatsnew entry

Found by inspecting the code, not by actually finding a failing example.

Context managers will resume with an exception if the with block calling them fails.
This happening is not an excuse to not clean up.
@simonjayhawkins
Copy link
Member

Thanks @eric-wieser for the PR

(just adding a note: #35314 uses _group_selection_context more, so if #35314 gets backported, maybe this should also be backported)

@WillAyd WillAyd merged commit 877dc15 into pandas-dev:master Aug 6, 2020
@WillAyd
Copy link
Member

WillAyd commented Aug 6, 2020

Thanks @eric-wieser

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants