Skip to content

BLD: remove support for 3.2, #9118 #10397

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 22, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 0 additions & 14 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"
Expand Down
4 changes: 0 additions & 4 deletions ci/requirements-3.2.txt

This file was deleted.

2 changes: 1 addition & 1 deletion doc/source/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
-----------------
Expand Down
4 changes: 4 additions & 0 deletions doc/source/whatsnew/v0.17.0.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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:


Expand Down
1 change: 0 additions & 1 deletion pandas/compat/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down
6 changes: 1 addition & 5 deletions pandas/core/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 1 addition & 4 deletions pandas/io/parsers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions pandas/tests/test_categorical.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
8 changes: 0 additions & 8 deletions pandas/tests/test_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
4 changes: 1 addition & 3 deletions pandas/tseries/tests/test_timedeltas.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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'])
Expand Down
4 changes: 1 addition & 3 deletions pandas/tseries/tests/test_timeseries.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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])
Expand Down
6 changes: 0 additions & 6 deletions pandas/tslib.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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)
Expand Down
1 change: 0 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down