kartik00052 commented on issue #73525:
URL: https://github.com/apache/airflow/issues/73525#issuecomment-5773511536

   I can confirm and narrow this down exactly — grepped both files for 
`.read_text()` / `.write_text()` / `open()` calls without an explicit encoding:
   
   **`devel-common/src/tests_common/pytest_plugin.py`**
   - L169: `AIRFLOW_PYPROJECT_TOML_FILE_PATH.read_text().splitlines()`
   - L201: `PROVIDER_DEPENDENCIES_JSON_HASH_PATH.read_text().strip()`
   - L203: 
`PROVIDER_DEPENDENCIES_JSON_HASH_PATH.write_text(calculated_provider_deps_hash)`
   
   **`scripts/ci/prek/update_providers_dependencies.py`**
   - L73: `pyproject_toml_file_path.read_text()` (fed into `tomllib.loads`)
   - L98: `provider_yaml_file.read_text()` (fed into `yaml.safe_load`)
   - L230, L233: `DEPENDENCIES_JSON_FILE_PATH.read_text()`
   - L235: `DEPENDENCIES_JSON_FILE_PATH.write_text(new_content)`
   
   That's 8 call sites total, no bare `open()` calls in either file — so the 
fix is contained to adding `encoding="utf-8"` to these 8 
`read_text`/`write_text` calls, nothing broader in scope.
   
   Planning to validate by reproducing with `set PYTHONUTF8=0` per the repro 
steps above, confirming collection fails first, then confirming it passes after 
the change — and separately confirming behavior is unchanged on Linux/macOS 
(these are already UTF-8 by default there, so this should be a no-op change on 
non-Windows). Will submit a PR once that's verified.


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