Message 320819 - Python tracker

Message320819

Author hellysmile
Recipients asvetlov, hellysmile, yselivanov
Date 2018-07-01.00:10:12
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1530403813.29.0.56676864532.issue34014@psf.upfronthosting.co.za>
In-reply-to
Content
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
History
Date User Action Args
2018-07-01 00:10:13hellysmilesetrecipients: + hellysmile, asvetlov, yselivanov
2018-07-01 00:10:13hellysmilesetmessageid: <1530403813.29.0.56676864532.issue34014@psf.upfronthosting.co.za>
2018-07-01 00:10:13hellysmilelinkissue34014 messages
2018-07-01 00:10:12hellysmilecreate