[issue1272] Decode __file__ and co_filename to unicode using fs default
Guido van Rossum
report at bugs.python.org
Sun Oct 14 02:51:49 CEST 2007
Guido van Rossum added the comment:
> > Oh. Hm. I still wish that PyCode_New() could just insist that the
> > filename argument is a PyUnicode instance. Why can't it? Perhaps the
> > caller should be fixed instead?
> I'll try.
I figured out the problem -- it came from marshalled old code objects.
If you throw away all .pyc files the problem goes away. You can also
get rid of the similar checks for the 'name' argument -- this should
just be a PyUnicode too. A systematic approach to invalidating all the
.pyc files is updating the magic number in import.c.
__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue1272>
__________________________________
More information about the Python-bugs-list
mailing list