1.7 does support py2.4... sadly.

On Sat, Mar 9, 2013 at 1:06 PM, Ondřej Čertík <notifications@github.com>wrote:

> In numpy/distutils/tests/test_exec_command.py:
>
> > +        self._old_name = os.name
> > +        os.name = self._new_name
> > +
> > +    def __exit__(self, exc_type, exc_value, traceback):
> > +        os.name = self._old_name
> > +
> > +
> > +def test_exec_command_stdout():
> > +    # Regression test for gh-2999 and gh-2915.
> > +    # There are several packages (nose, scipy.weave.inline, Sage inline
> > +    # Fortran) that replace stdout, in which case it doesn't have a fileno
> > +    # method.  This is tested here, with a do-nothing command that fails if the
> > +    # presence of fileno() is assumed in exec_command.
> > +
> > +    # Test posix version:
> > +    with redirect_stdout(StringIO.StringIO()):
>
> @njsmith <https://github.com/njsmith> --- we do not support Python 2.4
> anyway. For Python 2.5, can I use from __future__ import with_statement ?
> That would make the code very similar.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/numpy/numpy/pull/3136/files#r3307894>
> .
>