New submission from ita <[email protected]>:
Consider the following file, containing a null byte on a *commented* line:
$ echo -e "#\!/usr/bin/env python\n# encoding: ISO8859-1\nprint('ok')\n#\x00" >
x.py
It works in cpython 2 and 3 (and in jython and in ironpython)
$ python2 x.py
ok
young@yang:~$ python3 x.py
ok
It also works in pypy 2 as expected:
$ ~/Downloads/pypy-2.2.1-linux64/bin/pypy x.py
ok
But pypy3 refuses to run it:
$ ~/pypy3-2.1-beta1-linux64/bin/pypy x.py
TypeError: argument must be a string without NUL characters
----------
messages: 6452
nosy: ita, pypy-issue
priority: bug
status: unread
title: py3k: invalid encoding validation
________________________________________
PyPy bug tracker <[email protected]>
<https://bugs.pypy.org/issue1667>
________________________________________
_______________________________________________
pypy-issue mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-issue