Description
Help wanted!
The interaction between unpythonic
and the async
stuff that was added in Python 3.5 is totally untested, because I haven't used, and I'm not even that familiar with, that part of Python myself.
Reading Brett Cannon's explanation, I surmise the async features are intended mainly for "microthreading" typical server loads, which mostly wait on I/O, but must scale to thousands of simultaneous requests. Coming from numerical background where the load is practically always CPU- or memory-bound, I haven't found much use for such constructs, since there the GIL makes them uninteresting. Multiprocessing, Cython + OpenMP, or MPI, exactly one task per core, done.
So, discussion and test cases are more than welcome!
If interested, please post a comment here, or open a PR if you have some tests you'd like to suggest. See directories unpythonic/test
and unpythonic/syntax/test
for examples. (Any test modules in these directories are autodetected by runtests.py
.)
Note that I have absolutely no idea in which kind of use cases unpythonic
and async
would appear together - that is exactly why this is help wanted.
If you have such a use case and especially if it doesn't work, please share!
(As of 0.14.1, the current level of async
support in unpythonic
is a blind guess. The macros recognize the AST nodes for the async stuff, but since I'm not quite sure what should be done with them, they try to do something similar as to the same "basic" (no async) node. Needless to say, there are probably bugs.)