bramhanandlingala opened a new pull request, #70249:
URL: https://github.com/apache/airflow/pull/70249
closes: #70232
### What
`datetime.datetime`-typed CLI parameters in `airflowctl` (e.g.
`dagrun list --start-date/--end-date`) rejected every input value.
### Root cause
`_python_type_from_string()` in `cli_config.py` mapped
`datetime.datetime` to the bare class as the argparse `type=`
callable. argparse calls `type(value)` on the raw CLI string, so it
tried `datetime.datetime("2026-07-01")` — but that constructor expects
positional `(year, month, day, ...)` ints, not a string, so it always
raised `TypeError`, regardless of the input format.
### Fix
Added `iso_datetime_type()`, a real parser using
`datetime.datetime.fromisoformat()`, and mapped `datetime.datetime` to
it instead of the bare class. This mirrors the existing fix already
applied for `dict` → `json_dict_type`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]