[Python-Dev] Serious regression in doctest in Py3.1rc1
Amaury Forgeot d'Arc
amauryfa at gmail.com
Wed Jun 3 13:26:13 CEST 2009
Hello,
2009/6/3 Stefan Behnel <stefan_ml at behnel.de>:
> Hi,
>
> I can't currently file a bug report on this, but I was told by Lisandro
> Dalcín that there is a serious problem with the doctest module in Py3.1rc1.
> In Cython, we use doctests to test the compiler in that we compile a
> Python/Cython module with doctests into a C module and then run doctest on
> the imported extension module.
>
> >From the error report it seems to me that doctest is now trying to read the
> module itself through linecache for some reason, which horribly fails for a
> binary module.
>
> Could someone please look into this? I'll open up a bug report tomorrow
> unless someone beats me to it.
I don't have the time either, but the problem looks very similar to
http://bugs.python.org/issue4050
The fix was to replace:
file = inspect.getsourcefile(object) or inspect.getfile(object)
was replaced with
file = inspect.getsourcefile(object)
--
Amaury Forgeot d'Arc
More information about the Python-Dev
mailing list