EncrypterParv opened a new pull request, #75520:
URL: https://github.com/apache/airflow/pull/75520

   The scripts package supports Python 3.11 from its first patch release, but 
`TarFile.extractall` gained the `filter` argument only in Python 3.11.4. As a 
result, the opt-in real-prek cache integration test fails on Python 
3.11.0–3.11.3.
   
   This change detects whether `tarfile.data_filter` is available. It retains 
explicit `fully_trusted` extraction where supported and uses the legacy call on 
older runtimes. A deterministic regression test covers both call forms, and the 
real-prek integration test now uses the compatibility helper.
   
   ### Testing
   
   - `uv run --project scripts ruff format 
scripts/tests/ci/test_prek_cache_optimizations.py` — passed (file unchanged).
   - `uv run --project scripts ruff check --fix 
scripts/tests/ci/test_prek_cache_optimizations.py` — passed.
   - `uv run --project scripts pytest 
scripts/tests/ci/test_prek_cache_optimizations.py -q` — 32 passed, 1 skipped.
   - `RUN_PREK_INTEGRATION=1 uv run --project scripts pytest 
scripts/tests/ci/test_prek_cache_optimizations.py::test_real_prek_repair_and_reuse
 -q` — 1 passed.
   - `uv run --project scripts pytest scripts/tests/ -q` — 1,771 passed, 1 
skipped.
   - `uvx --from prek==0.5.3 prek run --files 
scripts/tests/ci/test_prek_cache_optimizations.py --stage pre-commit` — passed.
   - `uvx --from prek==0.5.3 prek run --files 
scripts/tests/ci/test_prek_cache_optimizations.py --stage manual --skip 
compile-ui-assets-dev --skip view-skill-eval --skip run-skill-eval-codex` — 
passed.
   - Python 3.11.0 Docker temporary-archive compatibility smoke test — passed; 
`tarfile.data_filter` was absent and legacy extraction restored the archive 
contents.
   - `git diff --check` — passed.
   
   ---
   
   ##### Was generative AI tooling used to co-author this PR?
   
   - [X] Yes — OpenAI Codex (GPT-6)
   
   Generated-by: OpenAI Codex (GPT-6) following [the 
guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions)
   


-- 
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]

Reply via email to