From 0ea4dfc5f241e5c3322cd465293456141271c553 Mon Sep 17 00:00:00 2001 From: Kaxil Naik Date: Mon, 15 Sep 2025 23:38:41 +0100 Subject: [PATCH] Dev: Fix Python 3.13 compatibility in production image tests Replace `remove()` with `discard()` when handling `apache-airflow-providers-fab` package for Python 3.13 to avoid `KeyError` when package is not present. Example error: https://github.com/apache/airflow/actions/runs/17747714819/job/50436510299 on `v3-1-test` --- docker-tests/tests/docker_tests/test_prod_image.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-tests/tests/docker_tests/test_prod_image.py b/docker-tests/tests/docker_tests/test_prod_image.py index 0b72c0e03cf8f..3c4bf9528e8be 100644 --- a/docker-tests/tests/docker_tests/test_prod_image.py +++ b/docker-tests/tests/docker_tests/test_prod_image.py @@ -98,7 +98,7 @@ def test_required_providers_are_installed(self, default_docker_image): image=default_docker_image, ) if python_version.startswith("Python 3.13"): - packages_to_install.remove("apache-airflow-providers-fab") + packages_to_install.discard("apache-airflow-providers-fab") output = run_bash_in_docker( "airflow providers list --output json", image=default_docker_image,