Viktor Kovtun <hellysm...@gmail.com> added the comment:
What about to check instance of executor and depending on that propagate contextvars or not? As well to raise RuntimeError for ProcessPoolExecutor with provided context? I assume, that ProcessPoolExecutor as executor is not so popular in real world, but I can not provide any stats. Different behavior is defiantly at least weird, but do not support natively what is technically expected also strange. https://docs.python.org/3.7/library/contextvars.html#asyncio-support `Context variables are natively supported in asyncio` is hard for end users. Each use case of contextvars + run_in_executor will produce copy-paste boilerplate As for me it is very similar to the `asyncio.get_event_loop()` history ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue34014> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com