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

Don't swallow ImportError in temporary_directory() #3031

Merged
merged 1 commit into from
Oct 1, 2020
Merged

Don't swallow ImportError in temporary_directory() #3031

merged 1 commit into from
Oct 1, 2020

Conversation

remram44
Copy link
Contributor

@remram44 remram44 commented Oct 1, 2020

If the context wrapped by the temporary_directory() context manager raised ImportError (for example because distutils.util cannot be imported, #721 #1837), it would previously keep going, causing a RuntimeError from contextlib:

RuntimeError: generator didn't stop after throw()

Pull Request Check List

Resolves: #3026

  • Added tests for changed code.
  • Updated documentation for changed code.

Fixes #3026

If the context wrapped by the temporary_directory() context manager
raised ImportError (for example because distutils.util cannot be
imported, #721 #1837), it would previously keep going, causing a
RuntimeError from contextlib:

    RuntimeError: generator didn't stop after throw()
@remram44 remram44 mentioned this pull request Oct 1, 2020
3 tasks
@finswimmer finswimmer requested a review from a team October 1, 2020 20:07
Copy link
Member

@abn abn left a comment

Choose a reason for hiding this comment

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

Thank you for the fix @remram44 - good find!

@abn abn merged commit 7a5f260 into python-poetry:master Oct 1, 2020
@remram44 remram44 deleted the dont-mask-importerror branch October 1, 2020 23:37
Copy link

github-actions bot commented Mar 1, 2024

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

RuntimeError
2 participants