Under which category would you file this issue?
Airflow Core
Apache Airflow version
main checkout at commit 49674b7
What happened and how to reproduce it?
On Windows, running a focused provider test can fail during pytest collection before any tests are collected. The tests_common.pytest_plugin invokes scripts/ci/prek/update_providers_dependencies.py, which reads UTF-8 project files with Path.read_text() without an explicit encoding. With the Windows cp1252 locale this raises UnicodeDecodeError.
Observed error:
UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position ...
...
subprocess.CalledProcessError: ... update_providers_dependencies.py
The failure occurs before the test file runs.
What you think should happen instead?
Airflow's provider dependency refresh and pytest collection should read repository files as UTF-8 explicitly and work on Windows without requiring a locale override.
Operating System
Windows 11
Deployment
None
Apache Airflow Provider(s)
No response
Versions of Apache Airflow Providers
Airflow main checkout (2026-09-22), Python 3.11, pytest 9.1.1
Official Helm Chart version
Not Applicable
Kubernetes Version
No response
Helm Chart configuration
No response
Docker Image customizations
No response
Anything else?
Reproduction on Windows with a non-UTF-8 default locale:
set PYTHONUTF8=0
set PYTHONPATH=devel-common/src;providers/google/src
.venv\Scripts\python.exe -m pytest providers/google/tests/unit/google/cloud/operators/test_stackdriver.py -q
Pytest collection fails before tests run. Setting PYTHONUTF8=1 allows collection to progress, which points to locale-dependent file reads.
Relevant files:
- devel-common/src/tests_common/pytest_plugin.py
- scripts/ci/prek/update_providers_dependencies.py
Both contain repository-file reads without an explicit UTF-8 encoding. GitHub search found no existing Airflow issue for this exact Windows/cp1252 failure.
Are you willing to submit a PR?
Code of Conduct:
Are you willing to submit PR?
Code of Conduct
Under which category would you file this issue?
Airflow Core
Apache Airflow version
main checkout at commit 49674b7
What happened and how to reproduce it?
On Windows, running a focused provider test can fail during pytest collection before any tests are collected. The tests_common.pytest_plugin invokes scripts/ci/prek/update_providers_dependencies.py, which reads UTF-8 project files with Path.read_text() without an explicit encoding. With the Windows cp1252 locale this raises UnicodeDecodeError.
Observed error:
The failure occurs before the test file runs.
What you think should happen instead?
Airflow's provider dependency refresh and pytest collection should read repository files as UTF-8 explicitly and work on Windows without requiring a locale override.
Operating System
Windows 11
Deployment
None
Apache Airflow Provider(s)
No response
Versions of Apache Airflow Providers
Airflow main checkout (2026-09-22), Python 3.11, pytest 9.1.1
Official Helm Chart version
Not Applicable
Kubernetes Version
No response
Helm Chart configuration
No response
Docker Image customizations
No response
Anything else?
Reproduction on Windows with a non-UTF-8 default locale:
Pytest collection fails before tests run. Setting PYTHONUTF8=1 allows collection to progress, which points to locale-dependent file reads.
Relevant files:
Both contain repository-file reads without an explicit UTF-8 encoding. GitHub search found no existing Airflow issue for this exact Windows/cp1252 failure.
Are you willing to submit a PR?
Code of Conduct:
Are you willing to submit PR?
Code of Conduct