diff --git a/.travis.yml b/.travis.yml index 246154310a50f..b867601ba0b96 100644 --- a/.travis.yml +++ b/.travis.yml @@ -86,13 +86,6 @@ matrix: - CLIPBOARD=xsel - BUILD_TYPE=conda - JOB_NAME: "34_slow" - - python: 3.2 - env: - - NOSE_ARGS="not slow and not network and not disabled" - - FULL_DEPS=true - - CLIPBOARD_GUI=qt4 - - BUILD_TYPE=pydata - - JOB_NAME: "32_nslow" - python: 2.7 env: - EXPERIMENTAL=true @@ -103,13 +96,6 @@ matrix: - BUILD_TYPE=pydata - PANDAS_TESTING_MODE="deprecate" allow_failures: - - python: 3.2 - env: - - NOSE_ARGS="not slow and not network and not disabled" - - FULL_DEPS=true - - CLIPBOARD_GUI=qt4 - - BUILD_TYPE=pydata - - JOB_NAME: "32_nslow" - python: 2.7 env: - NOSE_ARGS="slow and not network and not disabled" diff --git a/ci/requirements-3.2.txt b/ci/requirements-3.2.txt deleted file mode 100644 index 8c2f675b65603..0000000000000 --- a/ci/requirements-3.2.txt +++ /dev/null @@ -1,4 +0,0 @@ -python-dateutil==2.1 -pytz==2013b -numpy==1.7.1 -cython==0.19.1 diff --git a/doc/source/install.rst b/doc/source/install.rst index b3f86db5e3e59..5a17f25ab1654 100644 --- a/doc/source/install.rst +++ b/doc/source/install.rst @@ -18,7 +18,7 @@ Instructions for installing from source, Python version support ---------------------- -Officially Python 2.6, 2.7, 3.2, 3.3, and 3.4. +Officially Python 2.6, 2.7, 3.3, and 3.4. Installing pandas ----------------- diff --git a/doc/source/whatsnew/v0.17.0.txt b/doc/source/whatsnew/v0.17.0.txt index 6f7e9bce0a3a6..8e3074c2de3f2 100644 --- a/doc/source/whatsnew/v0.17.0.txt +++ b/doc/source/whatsnew/v0.17.0.txt @@ -7,6 +7,10 @@ This is a major release from 0.16.2 and includes a small number of API changes, enhancements, and performance improvements along with a large number of bug fixes. We recommend that all users upgrade to this version. +.. warning:: + + pandas >= 0.17.0 will no longer support compatibility with Python version 3.2 (:issue:`9118`) + Highlights include: diff --git a/pandas/compat/__init__.py b/pandas/compat/__init__.py index 2a273629544cb..20d71de28d2e2 100644 --- a/pandas/compat/__init__.py +++ b/pandas/compat/__init__.py @@ -37,7 +37,6 @@ import types PY3 = (sys.version_info[0] >= 3) -PY3_2 = sys.version_info[:2] == (3, 2) PY2 = sys.version_info[0] == 2 diff --git a/pandas/core/common.py b/pandas/core/common.py index c2203bd506d7e..990eec08d0bd6 100644 --- a/pandas/core/common.py +++ b/pandas/core/common.py @@ -2813,11 +2813,7 @@ def _get_handle(path, mode, encoding=None, compression=None): else: raise ValueError('Unrecognized compression type: %s' % compression) - if compat.PY3_2: - # gzip and bz2 don't work with TextIOWrapper in 3.2 - encoding = encoding or get_option('display.encoding') - f = StringIO(f.read().decode(encoding)) - elif compat.PY3: + if compat.PY3: from io import TextIOWrapper f = TextIOWrapper(f, encoding=encoding) return f diff --git a/pandas/io/parsers.py b/pandas/io/parsers.py index 508cf1103cee5..d1e6e5677da0b 100755 --- a/pandas/io/parsers.py +++ b/pandas/io/parsers.py @@ -1327,10 +1327,7 @@ def _wrap_compressed(f, compression, encoding=None): import gzip f = gzip.GzipFile(fileobj=f) - if compat.PY3_2: - # 3.2's gzip doesn't support read1 - f = StringIO(f.read().decode(encoding)) - elif compat.PY3: + if compat.PY3: from io import TextIOWrapper f = TextIOWrapper(f) diff --git a/pandas/tests/test_categorical.py b/pandas/tests/test_categorical.py index c83ba897125bf..3a2f388bdd65b 100755 --- a/pandas/tests/test_categorical.py +++ b/pandas/tests/test_categorical.py @@ -395,8 +395,8 @@ def f(): self.assertRaises(TypeError, lambda: cat_rev > a) # The following work via '__array_priority__ = 1000' - # works only on numpy >= 1.7.1 and not on PY3.2 - if LooseVersion(np.__version__) > "1.7.1" and not compat.PY3_2: + # works only on numpy >= 1.7.1 + if LooseVersion(np.__version__) > "1.7.1": self.assertRaises(TypeError, lambda: a < cat) self.assertRaises(TypeError, lambda: a < cat_rev) diff --git a/pandas/tests/test_index.py b/pandas/tests/test_index.py index f422c3b49b691..0700d5a050516 100644 --- a/pandas/tests/test_index.py +++ b/pandas/tests/test_index.py @@ -2690,14 +2690,6 @@ def create_index(self): def test_pickle_compat_construction(self): pass - def test_numeric_compat(self): - super(TestDatetimeIndex, self).test_numeric_compat() - - if not compat.PY3_2: - for f in [lambda : np.timedelta64(1, 'D').astype('m8[ns]') * pd.date_range('2000-01-01', periods=3), - lambda : pd.date_range('2000-01-01', periods=3) * np.timedelta64(1, 'D').astype('m8[ns]') ]: - self.assertRaises(TypeError, f) - def test_get_loc(self): idx = pd.date_range('2000-01-01', periods=3) diff --git a/pandas/tseries/tests/test_timedeltas.py b/pandas/tseries/tests/test_timedeltas.py index 948a0be91b276..5456bd7602e63 100644 --- a/pandas/tseries/tests/test_timedeltas.py +++ b/pandas/tseries/tests/test_timedeltas.py @@ -11,7 +11,7 @@ from pandas import (Index, Series, DataFrame, Timestamp, Timedelta, TimedeltaIndex, isnull, notnull, bdate_range, date_range, timedelta_range, Int64Index) import pandas.core.common as com -from pandas.compat import StringIO, lrange, range, zip, u, OrderedDict, long, PY3_2 +from pandas.compat import StringIO, lrange, range, zip, u, OrderedDict, long from pandas import compat, to_timedelta, tslib from pandas.tseries.timedeltas import _coerce_scalar_to_timedelta_type as ct from pandas.util.testing import (assert_series_equal, @@ -1040,8 +1040,6 @@ def test_comparisons_coverage(self): self.assert_numpy_array_equal(result, exp) def test_comparisons_nat(self): - if PY3_2: - raise nose.SkipTest('nat comparisons on 3.2 broken') tdidx1 = pd.TimedeltaIndex(['1 day', pd.NaT, '1 day 00:00:01', pd.NaT, '1 day 00:00:01', '5 day 00:00:03']) diff --git a/pandas/tseries/tests/test_timeseries.py b/pandas/tseries/tests/test_timeseries.py index 09b2bb24714af..9ad814410741c 100644 --- a/pandas/tseries/tests/test_timeseries.py +++ b/pandas/tseries/tests/test_timeseries.py @@ -28,7 +28,7 @@ import pandas.index as _index -from pandas.compat import range, long, StringIO, lrange, lmap, zip, product, PY3_2 +from pandas.compat import range, long, StringIO, lrange, lmap, zip, product from numpy.random import rand from numpy.testing import assert_array_equal from pandas.util.testing import assert_frame_equal @@ -2225,8 +2225,6 @@ def test_comparisons_coverage(self): self.assert_numpy_array_equal(result, exp) def test_comparisons_nat(self): - if PY3_2: - raise nose.SkipTest('nat comparisons on 3.2 broken') fidx1 = pd.Index([1.0, np.nan, 3.0, np.nan, 5.0, 7.0]) fidx2 = pd.Index([2.0, 3.0, np.nan, np.nan, 6.0, 7.0]) diff --git a/pandas/tslib.pyx b/pandas/tslib.pyx index 59eb432844ee3..6a858b16fed4a 100644 --- a/pandas/tslib.pyx +++ b/pandas/tslib.pyx @@ -2543,9 +2543,6 @@ cdef inline _get_datetime64_nanos(object val): npy_datetime ival unit = get_datetime64_unit(val) - if unit == 3: - raise ValueError('NumPy 1.6.1 business freq not supported') - ival = get_datetime64_value(val) if unit != PANDAS_FR_ns: @@ -2613,9 +2610,6 @@ def cast_to_nanoseconds(ndarray arr): return result unit = get_datetime64_unit(arr.flat[0]) - if unit == 3: - raise ValueError('NumPy 1.6.1 business freq not supported') - for i in range(n): pandas_datetime_to_datetimestruct(ivalues[i], unit, &dts) iresult[i] = pandas_datetimestruct_to_datetime(PANDAS_FR_ns, &dts) diff --git a/setup.py b/setup.py index 6ff03eb4cf11f..01364892cd0f3 100755 --- a/setup.py +++ b/setup.py @@ -185,7 +185,6 @@ def build_extensions(self): 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', - 'Programming Language :: Python :: 3.2', 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', 'Programming Language :: Cython',