bpo-34132: Fix netrc parsing regression by bbayles · Pull Request #8320 · python/cpython
This PR adds a test and fix for the issue described in bpo-34132, a strange regression in netrc parsing that causes recent versions of Python 3 to fail to parse files like this:
# Comment
default login user password pass
but to succesfully parse files like this:
#Comment
default login user password pass
This fix is adapted from the Python 2 version, which is able to parse the former file.