118 Commits
Author SHA1 Message Date
github-actions[bot]andJarek Potiuk cfbd70b66d [main] Upgrade important CI environment (#76278)
* [main] CI: Upgrade important CI environment

* Ignore pydantic-ai's generic OpenAI-compatible provider in vendor drift checks

pydantic-ai-slim 2.63.0 adds a provider for any OpenAI-compatible endpoint. It needs a service name at construction and infer_model has no prefix for it, so a common.ai connection can never reach it and it is not a vendor the services page should list.

Generated-by: Claude Opus 5

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Jarek Potiuk <jarek@potiuk.com>
2026-11-02 19:39:05 +01:00
github-actions[bot]andJarek Potiuk 44e8ff3e44 [main] Upgrade important CI environment (#75270)
* [main] CI: Upgrade important CI environment

* Bump pypdf to 6.21.4 to fix high-severity advisories

The CI environment upgrade resolved pypdf 6.21.3, which the dependency
review gate rejects (GHSA-mfr5-77xh-9j7h, GHSA-cggf-277g-3q54,
GHSA-5849-834g-hvw5). The fixed 6.21.4 is still inside the 4-day
exclude-newer window, so add a temporary per-package cutoff for it.

Generated-by: Claude Opus 5

* Support pydantic-ai 2.60+ and opensandbox 1.2 in common.ai provider

pydantic-ai 2.60 records a durable streamed model request as the bare
response rather than a response-plus-events wrapper, so replaying or
tracking a streamed request in AirflowDurability failed to decode it.
The same release answers a tool retry with the call's own ToolReturnPart
(outcome "retried") instead of RetryPromptPart, which broke tests that
told retries from results by part type.

opensandbox 1.2 allows an egress rule with ports and no target. When the
enforced policy did not match the requested one, sorting the allowed
targets for the error message raised TypeError on that None, hiding the
real reason the sandbox was refused.

Both work with the older releases too, which the provider still supports.

Generated-by: Claude Opus 5

* Fix provider tests and type checks after the dependency upgrade

The tool-part predicates in the common.ai tests returned a plain bool, so
mypy could not narrow the message part they matched and the providers
type check failed.

On Python 3.14 the upgrade moves snowflake-connector-python to 5.1 and
snowflake-sqlalchemy to 2.1. connector 5.1's connect() no longer goes
through SnowflakeConnection, so patching that class stopped intercepting
the connection and the test tried a real login. snowflake-sqlalchemy
2.0.0 started percent-encoding "?" in the URL password, which the URI
test pinned to the older, unencoded form. Older Python versions keep the
earlier releases, so both tests have to accept either.

Generated-by: Claude Opus 5

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Jarek Potiuk <jarek@potiuk.com>
2026-10-31 17:06:37 +00:00
Shahar EpsteinandJarek Potiuk 3e0ed979c1 Require Python 3.11 in all distributions (#74157)
* Require Python 3.11 in all distributions

Every pyproject.toml that declares requires-python now says >= 3.11 and
drops the Python 3.10 trove classifier, the tomli build requirement that
only existed for 3.10 and the per-version dependency markers for 3.10.
Lock files are regenerated.

With 3.10 gone, the tomli fallbacks in scripts, dev tooling and tests go
too, along with the tomli additional_dependencies of the prek hooks and
the blacken-docs py310 target. The tomllib imports that only sat inside
functions because of the fallback move to the top of their modules. The
four dev/registry and scripts/ci/prek modules left out of the earlier
UP017 pass also take their timezone.utc to datetime.UTC fixes here. The
minimum host Python checked by check-min-python-version, the default
Python of run_generate_constraints.py and the provider cut-off date
parsing (fromisoformat, which reads a trailing Z from 3.11) follow the
new baseline.

ruff infers py311 from the new requires-python, which enables the
PEP 646 star-index fix (UP044) applied here and makes two more rules
reportable: UP042 (str, Enum to StrEnum) alters what str() and
format() return for serialized enum values, and ASYNC109 means
dropping the public timeout parameter from async APIs. Both need
per-site judgement, so they go on the ignore list with that rationale.

The datamodel-codegen target moves to 3.11 too, with use-specialized-enum
turned off for the same reason: otherwise the generated Task SDK and
airflowctl enums would switch from (str, Enum) to StrEnum.

* Drop the Python 3.10 provider metadata shim

With provider distributions now requiring Python 3.11, breeze can derive
requires-python and classifiers from the default and allowed versions
again. The patch-exclusion test and the matching example in
MANAGING_PROVIDERS_LIFECYCLE.rst move from 3.10.0 to 3.11.0, the oldest
patch release CI still covers.

* Keep Breeze's locked dependency versions when dropping Python 3.10

Relocking Breeze for the Python 3.11 baseline ran while recently bumped versions were still inside the 4-day exclude-newer window, so it downgraded pyjwt (reverting #73969), prek, boto3/botocore and filelock. Relocking from the previous lock keeps them and only drops the packages Python 3.11 no longer needs.

Generated-by: Claude Opus 5

---------

Co-authored-by: Jarek Potiuk <jarek@potiuk.com>
2026-10-06 23:20:49 +02:00
Shahar Epstein e853537c04 Bump inline script metadata to Python 3.11 (#74152)
* Bump inline script metadata to Python 3.11

The prek hooks and dev scripts declare the interpreter they run under
in PEP 723 metadata, and prek picks the hook interpreter from it, so
this has to land before any hook starts using 3.11-only APIs. With
Python 3.10 gone from the project they can also drop the tomli backport from their dependency lists, because
tomllib is in the standard library from 3.11.

* Refresh diagram checksums for the Python 3.11 script headers
2026-10-06 23:20:46 +02:00
github-actions[bot]andJarek Potiuk 22ebb0943f [main] Upgrade important CI environment (#73629)
* [main] CI: Upgrade important CI environment

* Cap azure-datalake-store below 1 in the Microsoft Azure provider

azure-datalake-store 1.x removed the lib.auth API that AzureDataLakeHook
uses, so the floor bump to 1.0.1 in the CI upgrade broke the hook and
every TestAzureDataLakeHook test. Supporting 1.x is tracked in #73795.

Generated-by: Claude Opus 5

* Regenerate provider requirement tables after the floor bumps

The floor bumps changed provider pyproject.toml files without regenerating
the README.rst and docs/index.rst requirement tables derived from them,
so update-providers-build-files and sync-provider-readme failed static checks.

Generated-by: Claude Opus 5

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Jarek Potiuk <jarek@potiuk.com>
2026-09-27 19:47:48 +02:00
Ash Berlin-Taylor 172a3e6b8c Revert "[main] Upgrade important CI environment (#73308)" (#73621)
This reverts commit ecfa20322b.

Main is broken, so reverting this for now.

Errors:

```
azure-ai-projects 2.7.0 has requirement openai>=3.0.0, but you have openai 2.54.0.
```
2026-09-23 16:10:50 +01:00
github-actions[bot] ecfa20322b [main] Upgrade important CI environment (#73308) 2026-09-23 21:47:23 +08:00
Rahul Vats 1370a121ce Update python client version/changelog for 3.3.2 release (#73309) 2026-09-18 13:15:43 +05:30
github-actions[bot]andJarek Potiuk 47dd611cfd [main] Upgrade important CI environment (#71590)
Co-authored-by: Jarek Potiuk <jarek@potiuk.com>
2026-08-20 13:53:59 +08:00
github-actions[bot] 0e6ad21034 [main] CI: Upgrade important CI environment (#70501)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-08-13 16:27:29 +02:00
Rahul Vats 1970ddb699 Update python client version/changelog for 3.3.1 release (#71538) 2026-08-13 14:55:20 +05:30
Jarek Potiuk cf4c7690e0 Require a lower bound on every dependency in pyproject.toml (#71378)
An unbounded requirement lets the resolver answer with any version that has
ever been published, so what our constraints pin - and what a user ends up
installing - depends on how the resolution went rather than on what the code
needs. Four such requirements were found and fixed by hand while pinning
providers in constraints (#71324); they sat in four different dependency
tables, which is why they went unnoticed for so long.

Distributions that are members of the uv workspace are exempt - they resolve
from the checkout, so a version range would say nothing - as are direct URL
requirements, where the URL already names the exact artifact.
2026-08-11 23:32:51 +08:00
github-actions[bot] c8d313a5d2 [main] Upgrade important CI environment (#69694) 2026-07-16 17:52:34 +08:00
Rahul Vats 6387f53744 Update python client version/changelog for 3.3.0 release (#69600) 2026-07-08 14:55:03 +05:30
Jens Scheffler f636d83bd9 [main] Upgrade important CI environment (#68163)
* [main] CI: Upgrade important CI environment

* Fix end of file in providers-deps
2026-06-07 20:21:06 +02:00
Rahul Vats 3532abd0d4 Update python client version/changelog for 3.2.2 release (#67824) 2026-06-01 14:59:26 +05:30
github-actions[bot] a2d5fa9c43 [main] CI: Upgrade important CI environment (#67593)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-05-27 15:13:16 +02:00
github-actions[bot] f3f7e909b0 [main] CI: Upgrade important CI environment (#67313)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-05-25 09:58:55 +02:00
github-actions[bot] 8a76a8926e [main] CI: Upgrade important CI environment (#66843)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-05-14 10:37:39 +02:00
github-actions[bot] 6f306eb780 [main] CI: Upgrade important CI environment (#66068)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-05-04 09:22:00 +02:00
hojeong park 08f8b74c71 refactor: word changed from DAG to Dag in clients/ (#66115) 2026-04-29 14:02:20 -04:00
github-actions[bot] 29477eaa6f [main] CI: Upgrade important CI environment (#65933)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-04-27 11:22:00 +02:00
Rahul Vats b22d7516e0 Update python client version/changelog for 3.2.1 release (#65770) 2026-04-24 16:33:51 +05:30
github-actions[bot] 3a40713353 [main] CI: Upgrade important CI environment (#65521)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-04-20 17:51:22 +02:00
Rahul Vats 1ffd2da4fb Update python client version/changelog for 3.2.0 release (#64951) 2026-04-09 15:40:48 +05:30
Jason(Zhe-You) Liu 048e2813e1 CI: Upgrade important CI environment (#64451)
Bump tomli from `2.4.0` to `2.4.1`.
2026-03-30 15:00:43 +08:00
Jarek Potiuk abfda18a46 Add 4-day cooldown for uv dependency resolution (#64249)
Set `exclude-newer = "4 days"` in `[tool.uv]` to only consider package
versions uploaded at least 4 days ago. This provides supply-chain security
by giving the community time to identify and remediate compromised releases.

Also downgrade pyodps requirement for Python >= 3.13 from >=0.12.6 to
>=0.12.5.1 since 0.12.6 was published within the cooldown window.
2026-03-27 19:03:24 +01:00
Wei Lee 526768d721 [main] Upgrade important CI environment (#64239) 2026-03-26 17:50:21 +08:00
Rahul Vats 64f22f81b4 Update python client version/changelog for 3.1.8 release (#64214) 2026-03-25 17:31:26 +05:30
Dev-iLandClaude Opus 4.6 be8252e628 Add Python 3.14 Support (#63520)
* Update python version exclusion to 3.15

* Add 3.14 metadata version classifiers and related constants

* Regenerate Breeze command help screenshots

* Assorted workarounds to fix breeze image building

- constraints are skipped entirely
- greenlet pin updated

* Exclude cassandra

* Exclude amazon

* Exclude google

* CI: Only add pydantic extra to Airflow 2 migration tests

Before this fix there were two separate issues in the migration-test setup for Python 3.14:

1. The migration workflow always passes --airflow-extras pydantic.
2. For Python 3.14, the minimum Airflow version is resolved to 3.2.0 by get_min_airflow_version_for_python.py, and apache-airflow[pydantic]==3.2.0 is not a valid thing to install.

So when constraints installation fails, the fallback path tries to install an invalid spec.

* Disable DB migration tests for python 3.14

* Enforce werkzeug 3.x for python 3.14

* Increase K8s executor test timeout for Python 3.14

Python 3.14 changed the default multiprocessing start method from 'fork' to 'forkserver' on Linux. The forkserver start method is slower because each new process must import modules from scratch rather than copying the parent's address space. This makes `multiprocessing.Manager()` initialization take longer, causing the test to exceed its 10s timeout.

* Adapt LocalExecutor tests for Python 3.14 forkserver default

Python 3.14 changed the default multiprocessing start method from
'fork' to 'forkserver' on Linux.  Like 'spawn', 'forkserver' doesn't
share the parent's address space, so mock patches applied in the test
process are invisible to worker subprocesses.

- Skip tests that mock across process boundaries on non-fork methods
- Add test_executor_lazy_worker_spawning to verify that non-fork start
  methods defer worker creation and skip gc.freeze
- Make test_multiple_team_executors_isolation and
  test_global_executor_without_team_name assert the correct worker
  count for each start method instead of assuming pre-spawning
- Remove skip from test_clean_stop_on_signal (works on all methods)
  and increase timeout from 5s to 30s for forkserver overhead

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* Bump dependencies to versions supporting 3.14

* Fix PROD image build failing on Python 3.14 due to excluded providers

The PROD image build installed all provider wheels regardless of Python
version compatibility. Providers like google and amazon that exclude
Python 3.14 were still passed to pip, causing resolution failures (e.g.
ray has no cp314 wheel on PyPI).

Two fixes:
- get_distribution_specs.py now reads each wheel's Requires-Python
  metadata and skips incompatible wheels instead of passing them to pip.
- The requires-python specifier generation used !=3.14 which per PEP 440
  only excludes 3.14.0, not 3.14.3. Changed to !=3.14.* wildcard.

* Split core test types into 2 matrix groups to avoid OOM on Python 3.14

Non-DB core tests use xdist which runs all test types in a single pytest
process. With 2059 items across 4 workers, memory accumulates until the
OOM killer strikes at ~86% completion (exit code 137).

Split core test types into 2 groups (API/Always/CLI and
Core/Other/Serialization), similar to how provider tests already use
_split_list with NUMBER_OF_LOW_DEP_SLICES. Each group gets ~1000 items,
well under the ~1770 threshold where OOM occurs.

Update selective_checks test expectations to reflect the 2-group split.

* Gracefully handle an already removed password file in fixture

The old code had a check-then-act race (if `os.path.exists` → `os.remove`), which fails when the file doesn't exist at removal time. `contextlib.suppress(FileNotFoundError)` handles this atomically — if the file is missing (never created in this xdist worker, or removed between check and delete), it's silently ignored.

* Fix OOM and flaky tests in test_process_utils

Replace multiprocessing.Process with subprocess.Popen running minimal
inline scripts. multiprocessing.Process uses fork(), which duplicates
the entire xdist worker memory. At 95% test completion the worker has
accumulated hundreds of MBs; forking it triggers the OOM killer
(exit code 137) on Python 3.14.

subprocess.Popen starts a fresh lightweight process (~10MB) without
copying the parent's memory, avoiding the OOM entirely.

Also replace the racy ps -ax process counting in
TestKillChildProcessesByPids with psutil.pid_exists() checks on the
specific PID — the old approach was non-deterministic because unrelated
processes could start/stop between measurements.

* Add prek hook to validate python_version markers for excluded providers

When a provider declares excluded-python-versions in provider.yaml,
every dependency string referencing that provider in pyproject.toml
must carry a matching python_version marker. Missing markers cause
excluded providers to be silently installed as transitive dependencies
(e.g. aiobotocore pulling in amazon on Python 3.14).

The new check-excluded-provider-markers hook reads exclusions from
provider.yaml and validates all dependency strings in pyproject.toml
at commit time, preventing regressions like the one fixed in the
previous commit.

* Update `uv.lock`

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 23:03:46 +02:00
Jarek Potiuk 444d45c6ce Add *.iml to .gitignore in all distributions (#63636)
IntelliJ IDEA .iml files could end up in sdist/wheel packages when
building distributions that lack their own .gitignore. Adding *.iml
to every distribution's .gitignore ensures these IDE metadata files
are excluded from built packages.
2026-03-15 14:05:58 +01:00
Jarek Potiuk 0699930e26 CI: Upgrade important CI environment (#62610) 2026-02-28 08:51:07 +01:00
Jarek PotiukandClaude Opus 4.6 94e189618a Fix all build-system/requires including transitive dependencies (#62570)
* Fix all build-system/requires including transitive dependencies

Add a feature to fix all build-system/requires to make build
reproducibility works. The build-system requires are managed
automatically by the `upgrade-important-versions` prek hook.

This should not only provide reproducibility, but also it should
prevent cases where transient dependency upgrade might break
building sdist (for example as it happened with virtualenv 21
breaking hatchling with https://github.com/pypa/hatch/issues/2193

* Fix mypy 'Cannot infer type of lambda' error in upgrade script

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-27 21:05:52 +01:00
Jens Scheffler b1a6ebc6c5 Fix Python 3.13 classifiers (#61419) 2026-02-05 00:02:21 +01:00
Jarek Potiuk 96b7724d68 Updated links in PyPI packages for Python client (#60840)
There were few links in the client's PyPI metadata that needed fix:

* Link to source code was leading to 404
* Link to issues linked to airflow-python-client issues which
  is somewhat wrong, because it's unlikely we will be able to
  solve any issues in that repo (the repo is entirely generated)

Since Python client source code is entirely automatically generated
from Airflow, it likely makes little sense to have issues there, it
probably makes sense to disable issues entirely and point to the
apache-airflow repo instead. Issues created in Python Client does
not seem to be looked at for years anyway - so they are kind-of
misleading that anyone will solve them.

I closed/resolved all the remaining issues and in this PR I also
change .asf.yaml to disable the issues tab. We can probably leave
discussions enabled though - and they might be better placed to
direct people to create issues or PRs in the Airflow API instead.
2026-01-20 23:24:25 +01:00
Jarek Potiuk ed62102b55 Fix python client NOTICE and wheel content (#60539)
There were some issues found in the process of Python Client
generation:

* NOTICE file was empty
* The .whl file contained `docs` and `tests` folders needlessly
* Verification steps were not separated out from publishing RC

This PR fixes those problems.
2026-01-14 21:46:57 +01:00
Ephraim Anierobi 92a69564a7 Update python client version/changelog for 3.1.6 release (#60459) 2026-01-13 18:13:50 +01:00
c2e5bde10e Treat non-sensitive-only as true and always mask sensitive values in public api's (#59880)
* Treat non-sensitive-only as true and always mask sensitive values in public APIs.

* Add newsfragment and update docs and client references for config masking

* newline error fixed - config.yml

* Update clients/python/README.md

Co-authored-by: Bas Harenslak <BasPH@users.noreply.github.com>

* CI image check resolved

* newline error in config.py fixed

---------

Co-authored-by: Jarek Potiuk <jarek@potiuk.com>
Co-authored-by: Bas Harenslak <BasPH@users.noreply.github.com>
2026-01-03 14:49:17 +01:00
Ephraim Anierobi 0c794d01a4 Update version and add changelog for 3.1.4 Python Client Release (#59274) 2025-12-10 20:52:48 +01:00
Jarek Potiuk dd31202e8c Convert the exclusion on urllib3 to != for 2.6.0 (#59203)
After discussion in https://github.com/urllib3/urllib3/issues/3731
maintainers of urllib3 decided to restore the removed getheaders()
method for now. We should change < to !=.
2025-12-08 17:18:24 +01:00
Jarek Potiuk e7cf65045a Consistently exclude Python 3.14 (#58657)
Since UV and other installers essentially ignore < limit in the
python-requires, a good practice is to simply exclude current Python
versions that we **know** we are not compatible with rather than
using <.

Python 3.14 is a thing now and people will get it by default as
latest versions, but we do not run our tests with Python 3.14
yet (not until March/April 2026). Providers have all
upper-bind exclusion except those that do not support Python 3.13,
but that's ok because they are actually limited by Airflow they
can be installed on. But for distributions like airflow-ctl,
we should explicitly exclude 3.14 until we support and test it.

This PR synchronizes all python-requires in non-provider
distribution to consistently exclude Python 3.14 with !=.
2025-11-25 01:36:48 +01:00
Jarek Potiuk 1cf1b84321 Update release python client docs (#58507) 2025-11-20 08:09:32 +01:00
Ephraim Anierobi a6932cfd90 Add changelog for python client 3.1.3 release (#58394)
* Add changelog for python client 3.1.3 release

* Apply suggestions from code review
2025-11-18 14:16:42 +01:00
Wei Lee 0534b90db6 Update pyproject.toml files with pytest>=9.0.0 TOML syntax (#58182) 2025-11-12 22:44:35 +08:00
Jarek Potiuk 11fbd848a2 Convert all airflow distributions to be compliant with ASF requirements (#58138)
According to https://www.apache.org/legal/src-headers.html#faq-binaries
all our released source packages and binaries should have both LICENCE
and NOTICE files - even if we do not have any 3rd-party software embedded.

This PR updates it accross the board and makes sure that all our
distributions contain both LICENCE and NOTICE file and that they
are added as "licence" information to all our distribution packages
when they are built.

This PR also modernizes all our pyproject.toml files with regards
to latest metadata for licenses:

* license-file is an array of glob patterns
* license is s license expression
* the deprecated Trove Classifier is removed

Inspired by #58131
2025-11-10 17:22:44 +01:00
Kaxil Naik 6fb4e26f98 Port Airflow Python client changes (#57103)
Changes from https://github.com/apache/airflow/tree/python-client/3.1.0rc1 / https://github.com/apache/airflow-client-python/pull/138
2025-10-22 23:01:54 +01:00
Bowrna cc7c94348d adding link to api docs (#53346) 2025-09-13 00:52:26 +02:00
Jarek Potiuk 0df08334cd Switch all our prek python hooks to use PEP-723 inline dependencies (#54917)
Following the change in https://github.com/j178/prek/pull/529 and
release of prek 0.1.3, we convert all our Python scripts to use
PEP-723-compliant inline scripts.

This will remove decoupling of scripts from their dependencies,
and will allow to run them easily by `uv run` as well as easier
debugging and testing.
2025-08-25 21:59:08 +02:00
Jarek Potiuk 3f6f1db510 Remove remnants of ~= used in requires-python. (#52985)
Follow up after #52980 - there are still few more places where
the ~= was used in requires-python.
2025-07-07 19:33:44 +02:00
Jens Scheffler ca264ba696 Clean some leftovers of Python 3.9 removal - All the rest (#52432)
* Clean some leftovers of Python 3.9 removal - All the rest

* Fix static checks
2025-06-29 17:29:46 +02:00