GitHub
06/28/2026, 5:09 PMGenerator generic type with default SendType and ReturnType
Pull request opened by edgarrmondragon
Description
SSIA.
• https://docs.python.org/3.13/library/typing.html#annotating-generators-and-coroutines
• PEP 696 – Type Defaults for Type Parameters
Checklist
• I have read the contribution guide
Was generative AI tooling used to co-author this PR?
• Yes (please specify the tool below)
Related Issues
• Closes #XXXX
Summary by Sourcery
Adopt Python 3.13-compatible Generator and AsyncGenerator type annotations across core modules and tests, using collections.abc with typing_extensions fallbacks, and simplify generator signatures to rely on default Send/Return type parameters.
Enhancements:
• Standardize generator and async generator type hints to use the Python 3.13 Generator/AsyncGenerator generics with default Send/Return types throughout the codebase.
• Introduce conditional imports that prefer collections.abc.Generator/AsyncGenerator on Python 3.13+ and fall back to typing_extensions for earlier versions.
• Align several contextmanager and fixture return annotations from Iterator/AsyncIterator to Generator/AsyncGenerator and adjust some APIs to return Iterable where appropriate (e.g., list_all_files).
meltano/meltanoGitHub
06/28/2026, 5:09 PMGenerator generic type with default SendType and ReturnType
Pull request ready for review by edgarrmondragon
meltano/meltanoGitHub
06/28/2026, 5:13 PM