You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Support running stubtest in non-UTF8 terminals (#19085)
Fixes#19071. I looked through the `open()` calls in the codebase, and
only `reports.py` raises some concerns. Stubtest crashes due to this
`print` call with incompatible encoding.
I tested this on Linux with `LC_CTYPE=ru_RU.CP1251` (random non-utf8
locale I found in `/usr/share/i18n/SUPPORTED`) and confirmed that
`stubtest` crashes without the patch and passes with it.
Using a simple MRE (empty stub file and `A = "╙"` in a file, this symbol
is `$'\u2559'`), I got this:
```
error: package.A is not present in stub
Stub: in file /tmp/tmp.Cs4RioNSuR/demo/stub/package/__init__.pyi
MISSING
Runtime:
'?'
Found 1 error (checked 1 module)
```
Without the patch I get a crash - same as in the linked issue.
0 commit comments