Skip to content

Don't swallow ImportError in temporary_directory()#3031

Merged
abn merged 1 commit into
python-poetry:masterfrom
remram44:dont-mask-importerror
Oct 1, 2020
Merged

Don't swallow ImportError in temporary_directory()#3031
abn merged 1 commit into
python-poetry:masterfrom
remram44:dont-mask-importerror

Conversation

@remram44
Copy link
Copy Markdown
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
Copy Markdown
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
@github-actions
Copy link
Copy Markdown

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