STINNER Victor <victor.stin...@haypocalc.com> added the comment:

CGIHTTPServerTestCase creates .py files with sys.executable in a shebang:
-----
cgi_file1 = """\
#!%s
..."""

with open(self.file1_path, 'w') as file1:
    file1.write(cgi_file1 % sys.executable)
-----
The shebang have to be the first line, and the encoding cookie (#coding:...) 
have to be written before any non-ASCII character. Since the shebang contains 
non-ASCII character, the cookie have to be written before... which is 
impossible.

Whereas issue #7708 contains the tested modules, this issue is specific to the 
tests themself.

Possible workaround: create a symbolic link to an ASCII directory (eg. 
"/tmp/python") and use the link in the shebang.

----------
nosy: +haypo

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue7668>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to