[New-bugs-announce] [issue43214] site: Potential UnicodeDecodeError when handling pth file
Inada Naoki
report at bugs.python.org
Sat Feb 13 03:53:26 EST 2021
New submission from Inada Naoki <songofacandy at gmail.com>:
https://github.com/python/cpython/blob/4230bd52e3f9f289f02e41ab17a95f50ed4db5a6/Lib/site.py#L160
```
f = io.TextIOWrapper(io.open_code(fullname))
```
When default text encoding is not UTF-8 and pth file contains non-ASCII character, it will raise UnicodeDecodeError.
----------
components: Library (Lib)
keywords: 3.8regression
messages: 386916
nosy: methane
priority: normal
severity: normal
status: open
title: site: Potential UnicodeDecodeError when handling pth file
type: behavior
versions: Python 3.10, Python 3.8, Python 3.9
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43214>
_______________________________________
More information about the New-bugs-announce
mailing list