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

Remove use of unwrap #1888

Merged
merged 4 commits into from
Sep 26, 2021
Merged

Remove use of unwrap #1888

merged 4 commits into from
Sep 26, 2021

Conversation

momirza
Copy link
Contributor

@momirza momirza commented Sep 25, 2021

Propagates error back instead of panicking. We had an issue in production when a worker in the process of shutting down returned SystemExit when calling inner.instance(py).str() on the Python object. This should be propagated back instead of resulting in a PanicException.

thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: PyErr { type: <class 'SystemExit'>, value: SystemExit(1), traceback: Some(<traceback object at 0x7fe1bbcacd70>) }'

@momirza momirza marked this pull request as ready for review September 25, 2021 19:42
Copy link
Member

@davidhewitt davidhewitt left a comment

Choose a reason for hiding this comment

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

Thanks for fixing, sorry for letting this panic slip through review 😬

I'm going to adjust the CHANGELOG message - I prefer them to be more informative to how the typical user experience will change rather than the actual code change we made.

I'll push a commit to tweak and then merge.

CHANGELOG.md Outdated Show resolved Hide resolved
@davidhewitt davidhewitt merged commit 4a34cc6 into PyO3:main Sep 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants