Closed gdude2002 closed 7 years ago
Ugh, no, it's a annoying Linux-vs-Windows thing that makes sense now that I think about it, but... ugh.
Nope, looks like that didn't actually work: https://ci.appveyor.com/project/njsmith/async-generator/build/job/k9ivyqlnw8mobbfy
So the problem is that _PyAsyncGenValueWrapperNew
is not marked as a PyAPI_FUNC
, which means that extensions can happily call it on MacOS and Linux, but on Windows it's impossible to call. @1st1 not sure if this is a bug or what but FYI :-).
This might mean that we can't support yield_from_
in native async generators on Windows, which is a weird sentence to type but here we are.
Okay, I just pushed async_generator v1.5 to pypi, which should fix this problem. (I found a way that should make it work in principle, but haven't yet figured out how to get ctypes to work properly, so for now I just disabled the clever-hack that was causing this problem.)
So the problem is that _PyAsyncGenValueWrapperNew is not marked as a PyAPI_FUNC, which means that extensions can happily call it on MacOS and Linux, but on Windows it's impossible to call. @1st1 not sure if this is a bug or what but FYI :-).
It was intentional. I didn't want to mark _PyAsyncGenValueWrapperNew
as any kind of API (stable or private), at least until we implement yield from
and the design is proven to be correct.
I was asked to raise this here from https://github.com/SunDwarf/Kyoukai/issues/19
I get a TypeError,
bad argument type for built-in operation
within Kyoukai, at an import statement (withinasyncio_extras
:from async_generator import yield_
.