This is an automated email from the ASF dual-hosted git repository.
potiuk pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new edbe8602fd Disable coverage for Python 3.12 (#38255)
edbe8602fd is described below
commit edbe8602fd309e74bdf780ee24d0191c3836499c
Author: Jarek Potiuk <[email protected]>
AuthorDate: Mon Mar 18 12:52:34 2024 +0100
Disable coverage for Python 3.12 (#38255)
Finally we have to disable coverage for Python 3.12 because with
coverage enabled it runs slower and occasionally timeouts in
coverage methods.
---
dev/breeze/src/airflow_breeze/utils/run_tests.py | 7 ++++++-
scripts/in_container/run_ci_tests.sh | 12 ------------
2 files changed, 6 insertions(+), 13 deletions(-)
diff --git a/dev/breeze/src/airflow_breeze/utils/run_tests.py
b/dev/breeze/src/airflow_breeze/utils/run_tests.py
index 3e8ae591c9..69aac4abc5 100644
--- a/dev/breeze/src/airflow_breeze/utils/run_tests.py
+++ b/dev/breeze/src/airflow_breeze/utils/run_tests.py
@@ -364,7 +364,12 @@ def generate_args_for_pytest(
args.extend(get_excluded_provider_args(python_version))
if use_xdist:
args.extend(["-n", str(parallelism) if parallelism else "auto"])
- if enable_coverage:
+ # We have to disabke coverage for Python 3.12 because of the issue with
coverage that takes too long, despite
+ # Using experimental support for Python 3.12 PEP 669. The coverage.py is
not yet fully compatible with the
+ # full scope of PEP-669. That will be fully done when
https://github.com/nedbat/coveragepy/issues/1746 is
+ # resolve for now we are disabling coverage for Python 3.12, and it causes
slower execution and occasional
+ # timeouts
+ if enable_coverage and python_version != "3.12":
args.extend(
[
"--cov=airflow",
diff --git a/scripts/in_container/run_ci_tests.sh
b/scripts/in_container/run_ci_tests.sh
index ef3bd83e8d..3d6b5a6a68 100755
--- a/scripts/in_container/run_ci_tests.sh
+++ b/scripts/in_container/run_ci_tests.sh
@@ -23,18 +23,6 @@ echo "Starting the tests with those pytest arguments:" "${@}"
echo
set +e
-# We have to tweak coverage for Python 3.12 because of the issue with coverage
that takes too long, despite
-# Using experimental support for Python 3.12 PEP 669. The coverage.py is not
yet fully compatible with the
-# full scope of PEP-669. That will be fully done when
https://github.com/nedbat/coveragepy/issues/1746 is
-# resolve for now we are disabling coverage for Python 3.12, but possibly it
is enough for now.
-PYTHON_3_12_OR_ABOVE=$(python -c "import sys; print(sys.version_info >=
(3,12))")
-
-if [[ ${PYTHON_3_12_OR_ABOVE} == "True" ]]; then
- echo
- echo "${COLOR_BLUE}Enabling experimental PEP-669 support in coverage.py
for Python 3.12 and above.${COLOR_RESET}"
- echo
- export COVERAGE_CORE=sysmon
-fi
pytest "${@}"
RES=$?