[Python-3000] text_zipimport fix
Paul Colomiets
pc at gafol.net
Fri Aug 3 09:22:39 CEST 2007
Hi,
I've just uploaded patch that fixes test_zipimport.
http://www.python.org/sf/1766592
I'm still in doubt of some str/bytes issues. Fix me if I'm wrong.
1. imp.get_magic() should return bytes
2. loader.get_data() should return bytes
3. loader.get_source() should return str with encoding given from "# -*-
coding: something -*-" header
How to achieve third without reinventing something? Seems that compiler
makes use of it something thought the ast, but I'm not sure.
Currently it does PyString_FromStringAndSize(bytes) which should be
equivalent of str(the_bytes), and uses utf8 I think.
--
Paul.
More information about the Python-3000
mailing list