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

ita tracker at bugs.pypy.org
Fri Jan 3 18:18:15 CET 2014


New submission from ita <tnagy1024 at gmail.com>:

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 at 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 <tracker at bugs.pypy.org>
<https://bugs.pypy.org/issue1667>
________________________________________


More information about the pypy-issue mailing list