Pin text I/O to UTF-8 and fail CI on locale-dependent reads/writes (#3296)
Co-authored-by: ShuQingDollarVoyager <57471784+ShuQingDollarVoyager@users.noreply.github.com> Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
52ad0a8876
commit
5285e936a9
1 changed files with 76 additions and 57 deletions
3
.github/workflows/shared.yml
vendored
3
.github/workflows/shared.yml
vendored
|
|
@ -99,6 +99,9 @@ jobs:
|
|||
# tests/examples/test_stories_smoke.py is gated on this var; it spawns real
|
||||
# stdio + uvicorn subprocesses, so run it on exactly one matrix cell.
|
||||
MCP_EXAMPLES_SMOKE: ${{ matrix.os == 'ubuntu-latest' && matrix.python-version == '3.12' && matrix.dep-resolution.name == 'locked' && '1' || '' }}
|
||||
# PEP 597: text I/O without encoding= raises EncodingWarning, which pytest's "error"
|
||||
# filter makes fatal on every cell. An env var (not -X) so pytest-xdist workers inherit it.
|
||||
PYTHONWARNDEFAULTENCODING: "1"
|
||||
run: |
|
||||
uv run --frozen --no-sync coverage erase
|
||||
uv run --frozen --no-sync coverage run -m pytest -n auto
|
||||
|
|
|
|||
Loading…
Reference in a new issue