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

Conversation

Projects
None yet
2 participants
@c-w
Copy link
Member

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

This comment has been minimized.

Copy link
Member

commented Jul 5, 2018

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

Fix Flask integration AttributeError on Python 2
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

This comment has been minimized.

Copy link
Member Author

commented Jul 5, 2018

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

@c-w

This comment has been minimized.

Copy link
Member Author

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

This comment has been minimized.

Copy link
Member

commented Jul 10, 2018

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

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
license/cla All CLA requirements met.
Details

@c-w c-w deleted the c-w:fix-traceback-py2 branch Jul 10, 2018

@c-w

This comment has been minimized.

Copy link
Member Author

commented Jul 10, 2018

Thanks for the merge!

@SergeyKanzhelev

This comment has been minimized.

Copy link
Member

commented Jul 10, 2018

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

This comment has been minimized.

Copy link
Member Author

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
You can’t perform that action at this time.