Skip to content

Support portable Windows style generation - #48

Merged
biodranik merged 1 commit into
masterfrom
ab/designer-windows
Oct 7, 2026
Merged

biodranik merged 1 commit into
masterfrom
ab/designer-windows

Conversation

@biodranik

@biodranik biodranik commented Oct 6, 2026 •

Copy link
Copy Markdown
Member

Windows has no fork start method, so default style compilation fails. Use an explicit fork context where available and serial evaluation otherwise, without changing the interpreter's global start method.

The parent production-style test also exposed CP1252 decoding of UTF-8 MapCSS imports. Read/write compiler text explicitly as UTF-8; a regression simulates a legacy default encoding and checks imported Unicode values.

The real compiler tests use temporary fixtures, compare spawn-only output with the default path, and run on Linux/Windows with Python 3.9 and 3.14. All 60 tests and Ruff pass locally. The parent's full default-family generation also passes locally.

Fixes Windows portability issues reported in organicmaps/organicmaps#12699.

@biodranik
biodranik force-pushed the ab/designer-windows branch from 19f4938 to d4beca5 Compare October 6, 2026 21:30
@biodranik biodranik changed the title Support style generation on Windows without fork Support portable Windows style generation Oct 6, 2026
Use an explicit fork context to share parsed style globals where available,
and evaluate serially on platforms such as Windows that lack fork. Avoid
changing the interpreter's process-wide start method.

Read and write compiler text as UTF-8 so MapCSS imports and data files do
not depend on the Windows system code page. Cover a legacy encoding default.

Signed-off-by: Alexander Borsuk <me@alex.bio>
@biodranik
biodranik force-pushed the ab/designer-windows branch from d4beca5 to 570e62f Compare October 7, 2026 07:20
@biodranik
biodranik requested a review from strump October 7, 2026 07:20
@biodranik

Copy link
Copy Markdown
Member Author

What were the reasons to keep kothic on Python 3.9, not on 3.12? Maybe make a separate PR that will upgrade it?

@biodranik
biodranik merged commit 021f0f5 into master Oct 7, 2026
5 checks passed
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.

2 participants