[pypy-issue] [issue1667] py3k: invalid encoding validation

Armin Rigo tracker at bugs.pypy.org
Mon Jan 6 11:12:49 CET 2014


Armin Rigo <armin.rigo at gmail.com> added the comment:

The fact that it works on PyPy 2 is accidental, because \x00 is not a special
character in RPython, unlike C.  In CPython 2, it doesn't actually really work
as expected: you get nonsense, as explained in http://bugs.python.org/issue20115
, if your "#\x00" line is followed by a line of non-commented-out code.

CPython will likely fix the problem in 3.4 or 3.5 by banning NUL bytes.  I think
it would be a sane choice, and I don't think we should try to reproduce the
current buggy behavior.  I'm fine with closing this as: "it's actually a CPython
bug, reported".

________________________________________
PyPy bug tracker <tracker at bugs.pypy.org>
<https://bugs.pypy.org/issue1667>
________________________________________


More information about the pypy-issue mailing list