Skip to content

Commit 62842da

Browse files
committed
fix(workflows): standardize Python 3.12 across all Node.js builds
Unified Python version to 3.12 in build-smol.yml, build-sea.yml, and build-wasm.yml. All three use gyp which has hashlib.md5() compatibility issues with Python 3.13. Verified Alpine 3.19 (Docker builds) ships Python 3.11.14 - not affected. Python 3.13 error: TypeError: Strings must be encoded before hashing At: tools/gyp/pylib/gyp/generator/ninja.py:813
1 parent dbf965c commit 62842da

File tree

3 files changed

+16
-2
lines changed

3 files changed

+16
-2
lines changed

.github/workflows/build-sea.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,12 @@ jobs:
335335
if: steps.check-platform.outputs.should-run == 'true' && steps.yoga-cache-valid.outputs.valid != 'true' && matrix.os != 'windows'
336336
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
337337
with:
338-
python-version: '3.13.0'
338+
# Use 3.12 instead of 3.13 - gyp has hashlib compatibility issues with 3.13.
339+
# Error: TypeError: Strings must be encoded before hashing
340+
# At: tools/gyp/pylib/gyp/generator/ninja.py:813 hashlib.md5(outputs[0])
341+
# Python 3.13 requires .encode() for hashlib, but gyp doesn't support it yet.
342+
# Alpine 3.19 (Docker builds) ships Python 3.11.14, not affected.
343+
python-version: '3.12'
339344

340345
- name: Cache Emscripten SDK (non-Windows)
341346
if: steps.check-platform.outputs.should-run == 'true' && steps.yoga-cache-valid.outputs.valid != 'true' && matrix.os != 'windows'

.github/workflows/build-smol.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -346,6 +346,10 @@ jobs:
346346
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
347347
with:
348348
# Use 3.12 instead of 3.13 - gyp has hashlib compatibility issues with 3.13.
349+
# Error: TypeError: Strings must be encoded before hashing
350+
# At: tools/gyp/pylib/gyp/generator/ninja.py:813 hashlib.md5(outputs[0])
351+
# Python 3.13 requires .encode() for hashlib, but gyp doesn't support it yet.
352+
# Alpine 3.19 (Docker builds) ships Python 3.11.14, not affected.
349353
python-version: '3.12'
350354

351355
- name: Verify Python installation

.github/workflows/build-wasm.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,12 @@ jobs:
204204
- name: Setup Python
205205
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
206206
with:
207-
python-version: '3.13.0'
207+
# Use 3.12 instead of 3.13 - gyp has hashlib compatibility issues with 3.13.
208+
# Error: TypeError: Strings must be encoded before hashing
209+
# At: tools/gyp/pylib/gyp/generator/ninja.py:813 hashlib.md5(outputs[0])
210+
# Python 3.13 requires .encode() for hashlib, but gyp doesn't support it yet.
211+
# Alpine 3.19 (Docker builds) ships Python 3.11.14, not affected.
212+
python-version: '3.12'
208213

209214
- name: Cache pip packages
210215
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0

0 commit comments

Comments
 (0)