Commit 1220a09
committed
fix(smol): add gyp patch for Python 3 hashlib.md5() compatibility
Fixes TypeError: Strings must be encoded before hashing at
tools/gyp/pylib/gyp/generator/ninja.py:813
Python 3's hashlib.md5() requires bytes, not strings. The gyp code
was passing a string (file path) directly to hashlib.md5() when
generating unique_name for Windows builds.
This patch adds .encode() to convert the string to bytes before
hashing, fixing compatibility with all Python 3 versions.1 parent fc7fb60 commit 1220a09
1 file changed
Lines changed: 25 additions & 0 deletions
Lines changed: 25 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
0 commit comments