Feature summary:
api.APIGenerator should be a Generator as the class name says
Use case(s) :
Currenly all api generators are Iterables; they work with for loops but it doest not support next() function of an Iterator but this is used a couple o times: see here.
This also solves T301318.
Benefits:
Making api generators a collections.abc.Generator they are capable to be used as
- Iterable (for loops etc.)
- Iterator (next() function etc.)
- Generator (close() method which is used by BaseBot; BaseBot tries to convert every Iterable to a Generator)