Very good idea Hussein, I like the proposal!
________________________________
From: Hussein Awala <[email protected]>
Sent: Monday, March 23, 2026 21:57
To: [email protected] <[email protected]>
Subject: [DISCUSS] Release apache-airflow-mypy as a standalone package

EXTERNAL MAIL: Indien je de afzender van deze e-mail niet kent en deze niet 
vertrouwt, klik niet op een link of open geen bijlages. Bij twijfel, stuur deze 
e-mail als bijlage naar [email protected]<mailto:[email protected]>.

Hi everyone,

I’d like to propose releasing the existing MyPy plugins as a standalone
package: *apache-airflow-mypy*.


*Background*

Apache Airflow currently ships two MyPy plugins (decorators and outputs)
that improve type checking for DAG authors.

At the moment, these plugins live inside the repository but are not
published to PyPI. As a result, users who want to benefit from type
checking need to manually copy these plugin files into their own projects.
This is what several teams are doing today.


*Proposal*

Publish *apache-airflow-mypy* as an independently versioned package on
PyPI, following SemVer.

The package is small and self-contained (two plugins, ~150 lines of code),
which should make it straightforward to maintain.

PR: 
https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fapache%2Fairflow%2Fpull%2F61422&data=05%7C02%7Cdavid.blain%40infrabel.be%7C744fad9585e54987f93c08de891ef3dd%7Cb82bc314ab8e4d6fb18946f02e1f27f2%7C0%7C0%7C639098963203053619%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=SdMKbaSyMeLrCzKCeylnFO5AO1Hv%2BTUYJ1tMuOG3Xm8%3D&reserved=0<https://github.com/apache/airflow/pull/61422>

It includes:

   - A dedicated package under dev/mypy/ with its own pyproject.toml
   - A Breeze release command: prepare-mypy-distributions
   - Release documentation: dev/README_RELEASE_MYPY.md
   - Tests and Towncrier-based release notes

The name *apache-airflow-mypy* has already been reserved on PyPI (thanks
Jens!).


*What the plugins do*

   - *outputs plugin*
   Makes operator.output and @task calls return Any instead of XComArg,
   allowing DAGs that pass task outputs between tasks to type-check without
   errors.
   - *decorators plugin*
   Adjusts type signatures for certain Google Cloud decorators (e.g.
   fallback_to_default_project_id, etc.).


*Usage*

pip install apache-airflow-mypy

Add to mypy.ini:

[mypy]
plugins =
    airflow_mypy.plugins.decorators
    airflow_mypy.plugins.outputs


I’m happy to take ownership of the release process for this package.

Any thoughts or feedback would be very welcome.

Thanks,
Hussein

Reply via email to