Python 3.7 added a new contextvars module to present a unified context-local storage API for both threaded and async programs.
https://docs.python.org/3.7/library/contextvars.html
Context managers that have state should use Context Variables instead of threading.local() to prevent their state from bleeding to other code unexpectedly, when used in concurrent code.
This seems to tie into the ongoing async logging work
Python 3.7 added a new contextvars module to present a unified context-local storage API for both threaded and async programs.
https://docs.python.org/3.7/library/contextvars.html
This seems to tie into the ongoing async logging work