[Python-3000] setup.py fails in the py3k-struni branch

Ron Adam rrr at ronadam.com
Fri Jun 8 04:31:44 CEST 2007


Guido van Rossum wrote:

>> The os.environ.get() method probably should return a unicode string. (?)
> 
> Indeed -- care to contribute a patch?

I thought you might ask that.  :-)

It looks like os.py module imports a 'envirion' dictionary from various 
sources depending on the platform.

       posix, nt, os2   <--->  posixmodule.c

       mac, ce, riscos  <--->  ?, ?, ?

Then os.py uses it to initialize the os._Environ user dict.  I can 
contribute a patch for os.py to covert the items at that point, but if 
someone imports the platform modules directly they will get surprises.

Patching posixmodule.c and the other platform files where ever they live 
may still be a bit beyond me at this time.

I'm still learning my way around pythons C code.  :-)

Cheers,
    Ron














More information about the Python-3000 mailing list