[SciPy-Dev] Remove print_function import?

Alexei Colin alexei at alexeicolin.com
Fri May 24 14:12:15 EDT 2013


On 05/23/2013 11:31 PM, Tim Leslie wrote:
> This feature was added in Python 2.6, which is the oldest version of python
> supported by the latest scipy. If you need to still use python 2.5 you will
> need to use an older release of scipy.

Yep, thanks. Even though it built without the import, print(..., end='')
is indeed used all over. Turned out that there were also more
incompatibilities: "from .common import *" and the b'' prefix. The
version 0.11.0 worked for me.

Should I try to update this doc page with "2.6"?
http://www.scipy.org/Installing_SciPy/BuildingGeneral
"To build SciPy, Python version 2.4 or newer is required."



> On 24 May 2013 13:12, Alexei Colin <alexei at alexeicolin.com> wrote:
> 
>> Hello,
>>
>> SciPy setup in a virtualenv for Python 2.5.2 failed due to not
>> recognizing 'print_function' in many source files:
>> from __future__ import division, print_function, absolute_import
>>
>> Since the import appears to be unused...
>> $ grep -rnI print_function scipy | grep -v import | wc -l
>> 0
>>
>> ...would it be correct to remove it?:
>> $ find  scipy/ -type f -name "*.py" | \
>> xargs -n 1 sed -i 's/, print_function//g'
>>
>> -alexei
>> _______________________________________________
>> SciPy-Dev mailing list
>> SciPy-Dev at scipy.org
>> http://mail.scipy.org/mailman/listinfo/scipy-dev
>>
> 
> 
> 
> _______________________________________________
> SciPy-Dev mailing list
> SciPy-Dev at scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-dev
> 




More information about the SciPy-Dev mailing list