Skip to content

Resolve "Python 3.12 support"

Yury Matveyev requested to merge 553-python-3-12-support into develop

Closes #553 (closed)

The reason of falling test is our implementation of Asyncio executor, which is using the functionally, deprecated since Py 3.8. We already had a problem with Pyhton 3.11 after _coroutine method was removed. We bypassed it by coping if its code. In Python 3.12 the cleaning-up continued and now all our methods, wrapped with _coroutine, are not allowed for execution anymore, since the coroutines.iscoroutine methods now return False for types.GeneratorType. As the result, the run_coroutine_threadsafe raises TypeError.

As an ugly and incorrect solution, we can do another round: we can again copy method code and modify it in a way, that types.GeneratorType are allowed. This work, as least pipeline pass, but I am not sure, that we test all possible scenarios.

Anyway it is definitely agony, and I am 100% sure, that this is dead end. If we are not going to finally copy the whole asyncio module, we should completely rewrite asyncio part. But it will take time.

Merge request reports