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

ref(tornado): Use new scopes API #2907

Merged
merged 2 commits into from
Mar 27, 2024

Conversation

sentrivana
Copy link
Contributor

@sentrivana sentrivana commented Mar 26, 2024

Forgot to give the Tornado integration the new scopes treatment -- fixing that now.

This integration is a bit special because trying to update it to the new API leads to the tests failing with

ValueError: <Token var=<ContextVar name='isolation_scope' default=None at 0x1049e8c70> at 0x104ecf080> was created in a different Context

when trying to restore the old isolation and current contexts at the end of with isolation_scope(). Digging deeper, I came across a Tornado issue. There's a fix in Tornado 6 and also in our case, everything seems to work on 6.0 up, so I'm dropping support for older Tornado to make sure contextvars work correctly. 6.0 itself is already 5 years old so I think we can afford to drop support for older versions.

@sentrivana sentrivana marked this pull request as ready for review March 27, 2024 14:14
tox.ini Show resolved Hide resolved
tox.ini Show resolved Hide resolved
@sentrivana sentrivana merged commit c06bf06 into sentry-sdk-2.0 Mar 27, 2024
111 checks passed
@sentrivana sentrivana deleted the ivana/2.0/tornado-new-scopes branch March 27, 2024 15:52
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