[Biopython-dev] 2to3 and doctests
Tiago Antão
tiagoantao at gmail.com
Fri Jul 16 15:24:20 UTC 2010
2010/7/16 Peter <biopython at maubp.freeserve.co.uk>:
> You've been looking more carefully at 2to3 and doctests than I have,
> perhaps you can answer this query for me: It seems to me it does
> not automatically fix doctests.
>
> I'm aware of the -d or --doctests_only option, but that means we have
> to run 2to3 twice I think (once for the code, once for the doctests).
>
> Is there an extra flag or something obvious I am missing here? I want
> to call 2to3 once and have it fix the code including the doctests.
My assessment is exactly the same as yours.
I call the app 2 times: one for code, another for doctests.
The setup.py that I provided only does code precisely because of this.
I still did not have time to, programatically, call both
transformations.
So: yes it sucks.
Talking about setup.py, its current incarnation is broken on Python 3.
Even if the objective is for it to print some information on calling
2to3 it will not work. Just putting the prints with () should sort it
(and work everywhere)
Anyway, I think we can make setup.py much more helpful in the p3 case
by calling 2to3 (like numpy). The tests would also need to be
transformed, I think.
Regards,
Tiago
More information about the Biopython-dev
mailing list