File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 44
55from sentry_sdk .hub import Hub , _should_send_default_pii
66from sentry_sdk .utils import (
7+ HAS_REAL_CONTEXTVARS ,
78 event_from_exception ,
89 capture_internal_exceptions ,
910 transaction_from_function ,
@@ -39,11 +40,11 @@ def setup_once():
3940 if tornado_version is None or tornado_version < (5 , 0 ):
4041 raise RuntimeError ("Tornado 5+ required" )
4142
42- if sys . version_info < ( 3 , 7 ) :
43+ if not HAS_REAL_CONTEXTVARS :
4344 # Tornado is async. We better have contextvars or we're going to leak
4445 # state between requests.
4546 raise RuntimeError (
46- "The tornado integration for Sentry requires Python 3.7+ "
47+ "The tornado integration for Sentry requires Python 3.6+ or the aiocontextvars package "
4748 )
4849
4950 ignore_logger ("tornado.application" )
You can’t perform that action at this time.
0 commit comments