[New-bugs-announce] [issue43733] PEP 597: netrc uses locale encoding.

Inada Naoki report at bugs.python.org
Mon Apr 5 08:46:50 EDT 2021


New submission from Inada Naoki <songofacandy at gmail.com>:

https://github.com/python/cpython/blob/c8e5eb904e12010d2302364e1037c24a30f5e241/Lib/netrc.py#L29

Can we change the encoding="utf-8" and errors="replace"?

IMHO, comments are source of UnicodeDecodeError. So we can open file with binary mode and skip comments without decoding it.
But we need to decode non-comment lines lines with some encoding anyway.

----------
components: Library (Lib)
messages: 390232
nosy: methane
priority: normal
severity: normal
status: open
title: PEP 597: netrc uses locale encoding.
versions: Python 3.10

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43733>
_______________________________________


More information about the New-bugs-announce mailing list