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

   ## Summary
   
   Provider dependency generation parses Python source files using the platform 
default text encoding. On Windows this is commonly `cp1252`, which can fail on 
valid UTF-8 provider files and abort dependency-cache generation.
   
   Use Python's `tokenize.open()` when reading provider source. It honors PEP 
263 encoding declarations and uses Python's standard UTF-8 default, while 
preserving support for files using another declared encoding. Add a regression 
test for a Latin-1 source file.
   
   ## Testing
   
   - Ruff format and check passed.
   - `uv run --project scripts pytest 
scripts/tests/ci/prek/test_common_prek_utils.py -q -k TestGetImportsFromFile` — 
8 passed.
   
   ---
   
   ##### Was generative AI tooling used to co-author this PR?
   
   - [X] Yes — Codex (GPT-5)
   
   Generated-by: Codex (GPT-5) 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