Skip to content

feat(init): set PYTHONUTF8=1 for Python services - #468

Merged
7schmiede merged 1 commit into
mainfrom
feat/init-pythonutf8
Nov 6, 2026
Merged

7schmiede merged 1 commit into
mainfrom
feat/init-pythonutf8

Conversation

@7schmiede

Copy link
Copy Markdown
Member

What and why

On Windows a native Python service reads text files in the ANSI code page (cp1252) unless the code passes encoding=; the same code in a container reads UTF-8. A seed job read UTF-8 fixtures as mojibake only under devstack, with nothing pointing at the encoding (#464).

  • devstack init writes PYTHONUTF8 = "1" (with a comment why) into the env of every Python app it drafts (Django, FastAPI, Flask). Harmless on Linux and macOS.
  • docs/stack-file.md (Environment) and the devstack-config skill name the pitfall for native Python services and commands.
  • Test: the draft of a repository with FastAPI, Django and Go loads, the Python services carry the variable, the Go one does not.

No card: no stack file key, no contract; init writes a first draft only.

Gates: cargo fmt --check, cargo clippy --workspace --all-targets -D warnings, cargo test -p devstack -p devstack-skills green on Windows.

Closes #464

🤖 Generated with Claude Code

On Windows a native Python process opens text files in the ANSI code page
(cp1252) unless the code passes `encoding=`; in a container the same code
reads UTF-8. `devstack init` now gives each Django, FastAPI and Flask
service `PYTHONUTF8 = "1"` in its env, and the stack file reference and
the devstack-config skill name the pitfall.

Closes #464

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@7schmiede
7schmiede force-pushed the feat/init-pythonutf8 branch from 9146acf to ecb4a17 Compare November 6, 2026 12:55
@7schmiede
7schmiede merged commit c52e170 into main Nov 6, 2026
@7schmiede
7schmiede deleted the feat/init-pythonutf8 branch November 6, 2026 13:03
@7schmiede 7schmiede mentioned this pull request Nov 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

init: set PYTHONUTF8=1 for Python services (Windows reads files as cp1252)

1 participant