You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
aiocontextvars is required on Python 3.6 to make async integrations work (e.g. ASGI), but this is only obvious from reading the source code.
Technical Background
Here the aiocontextvars is optionally used under Python 3.6 to setup async-aware context vars. Without the package, async integrations just silently break (e.g. the ASGI integration misses a bunch of metadata, likely because under some conditions the current Hub/client is not found).
Potential Solutions
log message: emit a message indicating the missing requirement (maybe only if the debug=True flag is set)
warning: same as previous point, but as a Python warning (not logging)
optional requirement: add an optional requirement (like async) that under Python 3.6 requires aiocontextvarshere.
…701)
Found multiple issues with the asgi middleware:
lack of warning if contextvars are broken -- as part of that I refactored/unified the error message we give in such situations, also added more information as gevent just recently released a version that deals with contextvars better
exposed methods that were meant for overriding.. but all that is done in there can be done in event processors, so we make them private
Fix#630Fix#700Fix#694
Abstract
aiocontextvars
is required on Python 3.6 to make async integrations work (e.g. ASGI), but this is only obvious from reading the source code.Technical Background
Here the
aiocontextvars
is optionally used under Python 3.6 to setup async-aware context vars. Without the package, async integrations just silently break (e.g. the ASGI integration misses a bunch of metadata, likely because under some conditions the current Hub/client is not found).Potential Solutions
debug=True
flag is set)async
) that under Python 3.6 requiresaiocontextvars
here.Refs
#289, #293
The text was updated successfully, but these errors were encountered: