[Biopython-dev] 2to3 and doctests

Tiago Antão tiagoantao at gmail.com
Fri Jul 16 15:44:35 UTC 2010


2010/7/16 Peter <biopython at maubp.freeserve.co.uk>:

> Maybe we should file an enhancement bug report?

Good idea, I will do that.

> I like that plan except for a "bug" in 2to3, it will turn this example which
> works for BOTH python 2 and python 3:
>
> print("Hello world")
>
> into this:
>
> print(("Hello world"))

Well, as I see it, setup.py will never need to be converted by 2to3.
Its is possible to do a single file that works in all versions,
therefore that problem does not apply (unless people try to convert it
explicitly - I think we need to recommend against that). This seems to
be the case with numpy setup.py.

My view is this:
Current case:
person calls setup.py, always works. In the p3 case just prints the
warning and 2to3 recommendation.
Future (stable):
person calls setup.py , and it does everything necessary (calling 2to3
if needed)
Never:
Person calls 2to3
person calls setup.py

In fact it does not make much sense as it is now: the person has to
call 2to3 against setup.py in order to be informed to... call 2to3 ;)
See my point?

Tiago



More information about the Biopython-dev mailing list