Skip to content

Commit

Permalink
DEPS: Drop Python 3.4 support (#16303)
Browse files Browse the repository at this point in the history
* DEPS: Drop Python 3.4 support

Closes gh-15251.

* TST: Patch locale failure on Circle
  • Loading branch information
gfyoung authored and jreback committed May 16, 2017
1 parent 0ea0f25 commit 2ba7f5f
Show file tree
Hide file tree
Showing 17 changed files with 72 additions and 73 deletions.
4 changes: 0 additions & 4 deletions ci/requirements-3.4.build

This file was deleted.

2 changes: 0 additions & 2 deletions ci/requirements-3.4.pip

This file was deleted.

18 changes: 0 additions & 18 deletions ci/requirements-3.4.run

This file was deleted.

20 changes: 0 additions & 20 deletions ci/requirements-3.4_SLOW.run

This file was deleted.

7 changes: 0 additions & 7 deletions ci/requirements-3.4_SLOW.sh

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
python=3.4*
python=3.6*
python-dateutil
pytz
nomkl
numpy=1.10*
numpy
cython
Empty file added ci/requirements-3.6_LOCALE.pip
Empty file.
22 changes: 22 additions & 0 deletions ci/requirements-3.6_LOCALE.run
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
python-dateutil
pytz
numpy
scipy
openpyxl
xlsxwriter
xlrd
xlwt
numexpr
pytables
matplotlib
lxml
html5lib
jinja2
sqlalchemy
pymysql
# feather-format (not available on defaults ATM)
# psycopg2 (not avail on defaults ATM)
beautifulsoup4
s3fs
xarray
ipython
6 changes: 6 additions & 0 deletions ci/requirements-3.6_LOCALE_SLOW.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
python=3.6*
python-dateutil
pytz
nomkl
numpy
cython
Empty file.
22 changes: 22 additions & 0 deletions ci/requirements-3.6_LOCALE_SLOW.run
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
python-dateutil
pytz
numpy
scipy
openpyxl
xlsxwriter
xlrd
xlwt
numexpr
pytables
matplotlib
lxml
html5lib
jinja2
sqlalchemy
pymysql
# feather-format (not available on defaults ATM)
# psycopg2 (not available on defaults ATM)
beautifulsoup4
s3fs
xarray
ipython
4 changes: 2 additions & 2 deletions circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ dependencies:
0)
sudo apt-get install language-pack-it && ./ci/install_circle.sh JOB="2.7_COMPAT" LOCALE_OVERRIDE="it_IT.UTF-8" ;;
1)
sudo apt-get install language-pack-zh-hans && ./ci/install_circle.sh JOB="3.4_SLOW" LOCALE_OVERRIDE="zh_CN.UTF-8" ;;
sudo apt-get install language-pack-zh-hans && ./ci/install_circle.sh JOB="3.6_LOCALE" LOCALE_OVERRIDE="zh_CN.UTF-8" ;;
2)
sudo apt-get install language-pack-zh-hans && ./ci/install_circle.sh JOB="3.4" LOCALE_OVERRIDE="zh_CN.UTF-8" ;;
sudo apt-get install language-pack-zh-hans && ./ci/install_circle.sh JOB="3.6_LOCALE_SLOW" LOCALE_OVERRIDE="zh_CN.UTF-8" ;;
3)
./ci/install_circle.sh JOB="3.5_ASCII" LOCALE_OVERRIDE="C" ;;
esac
Expand Down
2 changes: 1 addition & 1 deletion doc/source/whatsnew/v0.21.0.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Other Enhancements
Backwards incompatible API changes
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


- Support has been dropped for Python 3.4 (:issue:`15251`)

.. _whatsnew_0210.api:

Expand Down
4 changes: 2 additions & 2 deletions pandas/compat/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
Key items to import for 2/3 compatible code:
* iterators: range(), map(), zip(), filter(), reduce()
* lists: lrange(), lmap(), lzip(), lfilter()
* unicode: u() [u"" is a syntax error in Python 3.0-3.2]
* unicode: u() [no unicode builtin in Python 3]
* longs: long (int in Python 3)
* callable
* iterable method compatibility: iteritems, iterkeys, itervalues
Expand Down Expand Up @@ -110,7 +110,7 @@ def signature(f):
unichr = chr

# This was introduced in Python 3.3, but we don't support
# Python 3.x < 3.4, so checking PY3 is safe.
# Python 3.x < 3.5, so checking PY3 is safe.
FileNotFoundError = FileNotFoundError

# list-producing versions of the major Python iterating functions
Expand Down
19 changes: 10 additions & 9 deletions pandas/tests/util/test_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@

import pandas.util.testing as tm

CURRENT_LOCALE = locale.getlocale()
LOCALE_OVERRIDE = os.environ.get('LOCALE_OVERRIDE', None)


class TestDecorators(object):

Expand Down Expand Up @@ -412,6 +409,7 @@ class TestLocaleUtils(object):
@classmethod
def setup_class(cls):
cls.locales = tm.get_locales()
cls.current_locale = locale.getlocale()

if not cls.locales:
pytest.skip("No locales found")
Expand All @@ -421,6 +419,7 @@ def setup_class(cls):
@classmethod
def teardown_class(cls):
del cls.locales
del cls.current_locale

def test_get_locales(self):
# all systems should have at least a single locale
Expand All @@ -438,17 +437,19 @@ def test_set_locale(self):
pytest.skip("Only a single locale found, no point in "
"trying to test setting another locale")

if all(x is None for x in CURRENT_LOCALE):
if all(x is None for x in self.current_locale):
# Not sure why, but on some travis runs with pytest,
# getlocale() returned (None, None).
pytest.skip("CURRENT_LOCALE is not set.")
pytest.skip("Current locale is not set.")

locale_override = os.environ.get('LOCALE_OVERRIDE', None)

if LOCALE_OVERRIDE is None:
if locale_override is None:
lang, enc = 'it_CH', 'UTF-8'
elif LOCALE_OVERRIDE == 'C':
elif locale_override == 'C':
lang, enc = 'en_US', 'ascii'
else:
lang, enc = LOCALE_OVERRIDE.split('.')
lang, enc = locale_override.split('.')

enc = codecs.lookup(enc).name
new_locale = lang, enc
Expand All @@ -465,4 +466,4 @@ def test_set_locale(self):
assert normalized_locale == new_locale

current_locale = locale.getlocale()
assert current_locale == CURRENT_LOCALE
assert current_locale == self.current_locale
1 change: 0 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,6 @@ def build_extensions(self):
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Cython',
Expand Down
10 changes: 5 additions & 5 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# and then run "tox" from this directory.

[tox]
envlist = py27, py34, py35
envlist = py27, py35, py36

[testenv]
deps =
Expand Down Expand Up @@ -49,14 +49,14 @@ deps =
bigquery
{[testenv]deps}

[testenv:py34]
[testenv:py35]
deps =
numpy==1.8.0
numpy==1.10.0
{[testenv]deps}

[testenv:py35]
[testenv:py36]
deps =
numpy==1.10.0
numpy
{[testenv]deps}

[testenv:openpyxl1]
Expand Down

0 comments on commit 2ba7f5f

Please sign in to comment.