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

Fix Flask integration AttributeError on Python 2 #111

Merged
merged 1 commit into from
Jul 10, 2018
Merged

Fix Flask integration AttributeError on Python 2 #111

merged 1 commit into from
Jul 10, 2018

Conversation

c-w
Copy link
Contributor

@c-w c-w commented Jul 3, 2018

The __traceback__ attribute for exceptions was only introduced in
Python 3 so the current way of sending exception information to
Application Insights from Flask fails in Python 2. This change fixes
that by re-raising the exception and using sys.exc_info under the hood
to gather the exception information.

@SergeyKanzhelev
Copy link
Contributor

@c-w can you please add a note in CHANGELOG as well?

The `__traceback__` attribute for exceptions was only introduced in
Python 3 so the current way of sending exception information to
Application Insights from Flask fails in Python 2. This change fixes
that by re-raising the exception and using `sys.exc_info` under the hood
to gather the exception information.
@c-w
Copy link
Contributor Author

c-w commented Jul 5, 2018

Thanks for the review @SergeyKanzhelev. Updated the change-log in 6e37159.

@c-w
Copy link
Contributor Author

c-w commented Jul 10, 2018

Hi @SergeyKanzhelev, just checking in on this again. Is there anything else that you need me to do on this PR?

@SergeyKanzhelev
Copy link
Contributor

Sorry. Lost track of notifications after 4th of July vacation. Merging now. Thanks again!

@SergeyKanzhelev SergeyKanzhelev merged commit d089503 into microsoft:develop Jul 10, 2018
@c-w c-w deleted the fix-traceback-py2 branch July 10, 2018 16:40
@c-w
Copy link
Contributor Author

c-w commented Jul 10, 2018

Thanks for the merge!

@SergeyKanzhelev
Copy link
Contributor

I'll wait till releasing the new version. There is a new issue about the logger and dictConfig that looks to be blocking somebody. It would be great if these two issues can be shipped at once.

If you need new version now - let me know

@c-w
Copy link
Contributor Author

c-w commented Jul 10, 2018

Sure thing, no worries.

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.

None yet

2 participants