Crys, is this OK with you?
On 10/13/07, Alexandre Vassalotti <report@bugs.python.org> wrote:
>
> Alexandre Vassalotti added the comment:
>
> Guido wrote:
> > 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.
>
> Done.
>
> I had to remove a few another PyString instances in pyexpat.c and
> _ctypes.c. So, here (hopefully) the final version of the patch.
>
> The changes from the last version are:
>
> - Correct a typo in of the comments in PyUnicode_DecodeFSDefault
> - Specified in the API doc of PyUnicode_DecodeFSDefault that the
> function take a null-terminated string.
> - Bumped the magic number in import.c
> - Fix PyCode_New calls in _ctypes and pyexpat module.
> - Remove the PyString type check on 'filename' and 'name' in PyCode_New.
> - Remove the unneeded string coercion code from PyCode_New.
>
> __________________________________
> Tracker <report@bugs.python.org>
> <http://bugs.python.org/issue1272>
> __________________________________
> |