From 2b1c191fa867917e484d0551177c375bd61cef66 Mon Sep 17 00:00:00 2001 From: y-p Date: Thu, 22 Nov 2012 01:27:56 +0200 Subject: [PATCH 1/3] CLN: remove next() shim for python 2.5 --- pandas/core/common.py | 7 ------- pandas/io/parsers.py | 7 ------- 2 files changed, 14 deletions(-) diff --git a/pandas/core/common.py b/pandas/core/common.py index 30f6b66a2b7d3..71d767a57bccb 100644 --- a/pandas/core/common.py +++ b/pandas/core/common.py @@ -8,13 +8,6 @@ import itertools -try: - next -except NameError: # pragma: no cover - # Python < 2.6 - def next(x): - return x.next() - from numpy.lib.format import read_array, write_array import numpy as np diff --git a/pandas/io/parsers.py b/pandas/io/parsers.py index 52c8c4aa65a13..a5fc7ebeed101 100644 --- a/pandas/io/parsers.py +++ b/pandas/io/parsers.py @@ -7,13 +7,6 @@ from urlparse import urlparse import csv -try: - next -except NameError: # pragma: no cover - # Python < 2.6 - def next(x): - return x.next() - import numpy as np from pandas.core.index import Index, MultiIndex From 45607c0426f6c24567225f428323b2a57113a673 Mon Sep 17 00:00:00 2001 From: y-p Date: Thu, 22 Nov 2012 01:28:33 +0200 Subject: [PATCH 2/3] CLN: remove with_statment import for python 2.5 --- pandas/core/frame.py | 2 -- pandas/io/tests/test_pytables.py | 3 --- pandas/tests/test_common.py | 1 - pandas/tests/test_graphics.py | 6 ++---- pandas/tseries/tests/test_timeseries.py | 1 - pandas/tseries/tests/test_timezones.py | 1 - 6 files changed, 2 insertions(+), 12 deletions(-) diff --git a/pandas/core/frame.py b/pandas/core/frame.py index f7f296e822e15..44b31926f4e15 100644 --- a/pandas/core/frame.py +++ b/pandas/core/frame.py @@ -1,5 +1,3 @@ -from __future__ import with_statement - """ DataFrame --------- diff --git a/pandas/io/tests/test_pytables.py b/pandas/io/tests/test_pytables.py index 9442f274a7810..afd05610e3427 100644 --- a/pandas/io/tests/test_pytables.py +++ b/pandas/io/tests/test_pytables.py @@ -1,5 +1,3 @@ -from __future__ import with_statement - import nose import unittest import os @@ -723,4 +721,3 @@ def _test_sort(obj): import nose nose.runmodule(argv=[__file__,'-vvs','-x','--pdb', '--pdb-failure'], exit=False) - diff --git a/pandas/tests/test_common.py b/pandas/tests/test_common.py index 44c40b6930784..661c3a2a3edd8 100644 --- a/pandas/tests/test_common.py +++ b/pandas/tests/test_common.py @@ -1,4 +1,3 @@ -from __future__ import with_statement from datetime import datetime import sys diff --git a/pandas/tests/test_graphics.py b/pandas/tests/test_graphics.py index 708f8143de3d5..05f9e51150850 100644 --- a/pandas/tests/test_graphics.py +++ b/pandas/tests/test_graphics.py @@ -1,5 +1,3 @@ -from __future__ import with_statement - import nose import os import string @@ -460,9 +458,9 @@ def test_parallel_coordinates(self): path = os.path.join(curpath(), 'data/iris.csv') df = read_csv(path) _check_plot_works(parallel_coordinates, df, 'Name') - _check_plot_works(parallel_coordinates, df, 'Name', + _check_plot_works(parallel_coordinates, df, 'Name', colors=('#556270', '#4ECDC4', '#C7F464')) - _check_plot_works(parallel_coordinates, df, 'Name', + _check_plot_works(parallel_coordinates, df, 'Name', colors=['dodgerblue', 'aquamarine', 'seagreen']) @slow diff --git a/pandas/tseries/tests/test_timeseries.py b/pandas/tseries/tests/test_timeseries.py index 86feb68052f67..6cec53eff382f 100644 --- a/pandas/tseries/tests/test_timeseries.py +++ b/pandas/tseries/tests/test_timeseries.py @@ -1,5 +1,4 @@ # pylint: disable-msg=E1101,W0612 -from __future__ import with_statement # for Python 2.5 import pandas.util.compat as itertools from datetime import datetime, time, timedelta import sys diff --git a/pandas/tseries/tests/test_timezones.py b/pandas/tseries/tests/test_timezones.py index 688e4945b6eb3..5da018b54ad4a 100644 --- a/pandas/tseries/tests/test_timezones.py +++ b/pandas/tseries/tests/test_timezones.py @@ -1,5 +1,4 @@ # pylint: disable-msg=E1101,W0612 -from __future__ import with_statement # for Python 2.5 from datetime import datetime, time, timedelta, tzinfo import sys import os From 2091db4e2baafd9f4754cb23a16b71237f990690 Mon Sep 17 00:00:00 2001 From: y-p Date: Thu, 22 Nov 2012 01:32:20 +0200 Subject: [PATCH 3/3] CLN: drop py25 from tox ini files --- tox.ini | 11 +---------- tox_prll.ini | 11 +---------- 2 files changed, 2 insertions(+), 20 deletions(-) diff --git a/tox.ini b/tox.ini index 7d09b3aa887e1..9f8e1af8ae924 100644 --- a/tox.ini +++ b/tox.ini @@ -4,7 +4,7 @@ # and then run "tox" from this directory. [tox] -envlist = py25, py26, py27, py31, py32 +envlist = py26, py27, py31, py32 [testenv] deps = @@ -35,15 +35,6 @@ commands = # tox should provide a preinstall-commands hook. pip uninstall pandas -qy - -[testenv:py25] -deps = - cython - numpy >= 1.6.1 - nose - pytz - simplejson - [testenv:py26] [testenv:py27] diff --git a/tox_prll.ini b/tox_prll.ini index 85856db064ca3..70edffac717a2 100644 --- a/tox_prll.ini +++ b/tox_prll.ini @@ -4,7 +4,7 @@ # and then run "tox" from this directory. [tox] -envlist = py25, py26, py27, py31, py32 +envlist = py26, py27, py31, py32 sdistsrc = {env:DISTFILE} [testenv] @@ -36,15 +36,6 @@ commands = # tox should provide a preinstall-commands hook. pip uninstall pandas -qy - -[testenv:py25] -deps = - cython - numpy >= 1.6.1 - nose - pytz - simplejson - [testenv:py26] [testenv:py27]