In fact, it must not be a subtype for exactly this reason.
> It would be nice if there was some way to use the abc module here, e.g.
> collections.Generator or something, but there isn't.
That's because there has never been a need for another generator type in
CPython.
I agree that it's Twisted that needs fixing here - assuming it's not
exactly a generator type that it really needs, including frames and all
that. It should either drop the type test or replace it by a test for what
it actually needs to assert about the decorated function.
I think it would be worth asking about this on their mailing list.
Stefan