Commit d1ea9b3
committed
gh-158633: say that subprocess text mode guesses the child's encoding
Text mode documents which encoding is used and not that the value is a guess
about the child process, so a wrong guess reads as a bug in this module: the
output is either silently mojibake, or a UnicodeDecodeError raised while the
stream is read, reported from inside subprocess rather than from the call that
is missing encoding=.
The warning keeps to what was asked for on gh-105312: the default is a guess,
pass encoding= on every platform, and on Windows more than one default is in
force at once -- the ANSI code page and the console output code page -- so a
console child is read with the console page while a Python child can be told
what to write through PYTHONUTF8 / PYTHONIOENCODING.1 parent 1a85213 commit d1ea9b3
1 file changed
Lines changed: 23 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
308 | 308 | | |
309 | 309 | | |
310 | 310 | | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
311 | 334 | | |
312 | 335 | | |
313 | 336 | | |
| |||
0 commit comments