Message98098
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. |
|
Date |
User |
Action |
Args |
2010-01-21 02:59:39 | vstinner | set | recipients:
+ vstinner, flox |
2010-01-21 02:59:33 | vstinner | set | messageid: <1264042771.3.0.456592237963.issue7668@psf.upfronthosting.co.za> |
2010-01-21 02:59:29 | vstinner | link | issue7668 messages |
2010-01-21 02:59:28 | vstinner | create | |
|