Skip to content

Update Flask and Quart integrations #1520

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

Merged
merged 2 commits into from
Aug 2, 2022
Merged

Conversation

pgjones
Copy link
Contributor

@pgjones pgjones commented Jul 25, 2022

Flask and Quart are deprecating and removing the _xxx_ctx_stacks
and adopting a more direct usage of ContextVars. The previous code
will therefore break for the latest version of Quart and start to warn
for Flask and then break.

This fix should work with any version of Flask or Quart, and hence is
a more robust version. There is an extra indirection, however I don't
think this is on any hot path.

Flask and Quart are deprecating and removing the ``_xxx_ctx_stack``s
and adopting a more direct usage of ContextVars. The previous code
will therefore break for the latest version of Quart and start to warn
for Flask and then break.

This fix should work with any version of Flask or Quart, and hence is
a more robust version. There is an extra indirection, however I don't
think this is on any hot path.
@antonpirker
Copy link
Member

Hey @pgjones !
Thanks for your PR, great work!

I have one request for making it backwards compatible. Otherwise it looks good!

@antonpirker antonpirker enabled auto-merge (squash) August 2, 2022 08:29
@antonpirker antonpirker merged commit 056286b into getsentry:master Aug 2, 2022
@antonpirker
Copy link
Member

Hey again @pgjones! If you send me your shipping address to anton |dot| pirker \at\ sentry [dot] io, I can send you a couple of stickers as a small token of appreciation.

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