Skip to content

Commit 9de6b51

Browse files
gfyoungpcluo
authored andcommitted
DEPS: Drop Python 3.4 support (pandas-dev#16303)
* DEPS: Drop Python 3.4 support Closes pandas-devgh-15251. * TST: Patch locale failure on Circle
1 parent 9479f2a commit 9de6b51

17 files changed

+72
-73
lines changed

ci/requirements-3.4.build

-4
This file was deleted.

ci/requirements-3.4.pip

-2
This file was deleted.

ci/requirements-3.4.run

-18
This file was deleted.

ci/requirements-3.4_SLOW.run

-20
This file was deleted.

ci/requirements-3.4_SLOW.sh

-7
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
python=3.4*
1+
python=3.6*
22
python-dateutil
33
pytz
44
nomkl
5-
numpy=1.10*
5+
numpy
66
cython

ci/requirements-3.6_LOCALE.pip

Whitespace-only changes.

ci/requirements-3.6_LOCALE.run

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
python-dateutil
2+
pytz
3+
numpy
4+
scipy
5+
openpyxl
6+
xlsxwriter
7+
xlrd
8+
xlwt
9+
numexpr
10+
pytables
11+
matplotlib
12+
lxml
13+
html5lib
14+
jinja2
15+
sqlalchemy
16+
pymysql
17+
# feather-format (not available on defaults ATM)
18+
# psycopg2 (not avail on defaults ATM)
19+
beautifulsoup4
20+
s3fs
21+
xarray
22+
ipython

ci/requirements-3.6_LOCALE_SLOW.build

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
python=3.6*
2+
python-dateutil
3+
pytz
4+
nomkl
5+
numpy
6+
cython

ci/requirements-3.6_LOCALE_SLOW.pip

Whitespace-only changes.

ci/requirements-3.6_LOCALE_SLOW.run

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
python-dateutil
2+
pytz
3+
numpy
4+
scipy
5+
openpyxl
6+
xlsxwriter
7+
xlrd
8+
xlwt
9+
numexpr
10+
pytables
11+
matplotlib
12+
lxml
13+
html5lib
14+
jinja2
15+
sqlalchemy
16+
pymysql
17+
# feather-format (not available on defaults ATM)
18+
# psycopg2 (not available on defaults ATM)
19+
beautifulsoup4
20+
s3fs
21+
xarray
22+
ipython

circle.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ dependencies:
2323
0)
2424
sudo apt-get install language-pack-it && ./ci/install_circle.sh JOB="2.7_COMPAT" LOCALE_OVERRIDE="it_IT.UTF-8" ;;
2525
1)
26-
sudo apt-get install language-pack-zh-hans && ./ci/install_circle.sh JOB="3.4_SLOW" LOCALE_OVERRIDE="zh_CN.UTF-8" ;;
26+
sudo apt-get install language-pack-zh-hans && ./ci/install_circle.sh JOB="3.6_LOCALE" LOCALE_OVERRIDE="zh_CN.UTF-8" ;;
2727
2)
28-
sudo apt-get install language-pack-zh-hans && ./ci/install_circle.sh JOB="3.4" LOCALE_OVERRIDE="zh_CN.UTF-8" ;;
28+
sudo apt-get install language-pack-zh-hans && ./ci/install_circle.sh JOB="3.6_LOCALE_SLOW" LOCALE_OVERRIDE="zh_CN.UTF-8" ;;
2929
3)
3030
./ci/install_circle.sh JOB="3.5_ASCII" LOCALE_OVERRIDE="C" ;;
3131
esac

doc/source/whatsnew/v0.21.0.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Other Enhancements
3535
Backwards incompatible API changes
3636
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3737

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

4040
.. _whatsnew_0210.api:
4141

pandas/compat/__init__.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
Key items to import for 2/3 compatible code:
88
* iterators: range(), map(), zip(), filter(), reduce()
99
* lists: lrange(), lmap(), lzip(), lfilter()
10-
* unicode: u() [u"" is a syntax error in Python 3.0-3.2]
10+
* unicode: u() [no unicode builtin in Python 3]
1111
* longs: long (int in Python 3)
1212
* callable
1313
* iterable method compatibility: iteritems, iterkeys, itervalues
@@ -110,7 +110,7 @@ def signature(f):
110110
unichr = chr
111111

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

116116
# list-producing versions of the major Python iterating functions

pandas/tests/util/test_util.py

+10-9
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,6 @@
1616

1717
import pandas.util.testing as tm
1818

19-
CURRENT_LOCALE = locale.getlocale()
20-
LOCALE_OVERRIDE = os.environ.get('LOCALE_OVERRIDE', None)
21-
2219

2320
class TestDecorators(object):
2421

@@ -412,6 +409,7 @@ class TestLocaleUtils(object):
412409
@classmethod
413410
def setup_class(cls):
414411
cls.locales = tm.get_locales()
412+
cls.current_locale = locale.getlocale()
415413

416414
if not cls.locales:
417415
pytest.skip("No locales found")
@@ -421,6 +419,7 @@ def setup_class(cls):
421419
@classmethod
422420
def teardown_class(cls):
423421
del cls.locales
422+
del cls.current_locale
424423

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

441-
if all(x is None for x in CURRENT_LOCALE):
440+
if all(x is None for x in self.current_locale):
442441
# Not sure why, but on some travis runs with pytest,
443442
# getlocale() returned (None, None).
444-
pytest.skip("CURRENT_LOCALE is not set.")
443+
pytest.skip("Current locale is not set.")
444+
445+
locale_override = os.environ.get('LOCALE_OVERRIDE', None)
445446

446-
if LOCALE_OVERRIDE is None:
447+
if locale_override is None:
447448
lang, enc = 'it_CH', 'UTF-8'
448-
elif LOCALE_OVERRIDE == 'C':
449+
elif locale_override == 'C':
449450
lang, enc = 'en_US', 'ascii'
450451
else:
451-
lang, enc = LOCALE_OVERRIDE.split('.')
452+
lang, enc = locale_override.split('.')
452453

453454
enc = codecs.lookup(enc).name
454455
new_locale = lang, enc
@@ -465,4 +466,4 @@ def test_set_locale(self):
465466
assert normalized_locale == new_locale
466467

467468
current_locale = locale.getlocale()
468-
assert current_locale == CURRENT_LOCALE
469+
assert current_locale == self.current_locale

setup.py

-1
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,6 @@ def build_extensions(self):
246246
'Programming Language :: Python :: 2',
247247
'Programming Language :: Python :: 3',
248248
'Programming Language :: Python :: 2.7',
249-
'Programming Language :: Python :: 3.4',
250249
'Programming Language :: Python :: 3.5',
251250
'Programming Language :: Python :: 3.6',
252251
'Programming Language :: Cython',

tox.ini

+5-5
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# and then run "tox" from this directory.
55

66
[tox]
7-
envlist = py27, py34, py35
7+
envlist = py27, py35, py36
88

99
[testenv]
1010
deps =
@@ -49,14 +49,14 @@ deps =
4949
bigquery
5050
{[testenv]deps}
5151

52-
[testenv:py34]
52+
[testenv:py35]
5353
deps =
54-
numpy==1.8.0
54+
numpy==1.10.0
5555
{[testenv]deps}
5656

57-
[testenv:py35]
57+
[testenv:py36]
5858
deps =
59-
numpy==1.10.0
59+
numpy
6060
{[testenv]deps}
6161

6262
[testenv:openpyxl1]

0 commit comments

Comments
 (0)