Skip to content

Commit

Permalink
CI: Test against Python 3.7 (#21604)
Browse files Browse the repository at this point in the history
  • Loading branch information
TomAugspurger committed Jun 25, 2018
1 parent 4922c0e commit 7829ad3
Show file tree
Hide file tree
Showing 7 changed files with 40 additions and 7 deletions.
5 changes: 5 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ matrix:
language: generic
env:
- JOB="3.5, OSX" ENV_FILE="ci/travis-35-osx.yaml" TEST_ARGS="--skip-slow --skip-network"

- dist: trusty
env:
- JOB="3.7" ENV_FILE="ci/travis-37.yaml" TEST_ARGS="--skip-slow --skip-network"

- dist: trusty
env:
- JOB="2.7, locale, slow, old NumPy" ENV_FILE="ci/travis-27-locale.yaml" LOCALE_OVERRIDE="zh_CN.UTF-8" SLOW=true
Expand Down
14 changes: 14 additions & 0 deletions ci/travis-37.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: pandas
channels:
- defaults
- conda-forge
- c3i_test
dependencies:
- python=3.7
- cython
- numpy
- python-dateutil
- nomkl
- pytz
- pytest
- pytest-xdist
2 changes: 1 addition & 1 deletion doc/source/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ For more information, see the `Python 3 statement`_ and the `Porting to Python 3
Python version support
----------------------

Officially Python 2.7, 3.5, and 3.6.
Officially Python 2.7, 3.5, 3.6, and 3.7.

Installing pandas
-----------------
Expand Down
6 changes: 6 additions & 0 deletions doc/source/whatsnew/v0.23.2.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ v0.23.2
This is a minor bug-fix release in the 0.23.x series and includes some small regression fixes
and bug fixes. We recommend that all users upgrade to this version.

.. note::

Pandas 0.23.2 is first pandas release that's compatible with
Python 3.7 (:issue:`20552`)


.. contents:: What's new in v0.23.2
:local:
:backlinks: none
Expand Down
9 changes: 5 additions & 4 deletions pandas/compat/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,11 @@
from collections import namedtuple

PY2 = sys.version_info[0] == 2
PY3 = (sys.version_info[0] >= 3)
PY35 = (sys.version_info >= (3, 5))
PY36 = (sys.version_info >= (3, 6))
PYPY = (platform.python_implementation() == 'PyPy')
PY3 = sys.version_info[0] >= 3
PY35 = sys.version_info >= (3, 5)
PY36 = sys.version_info >= (3, 6)
PY37 = sys.version_info >= (3, 7)
PYPY = platform.python_implementation() == 'PyPy'

try:
import __builtin__ as builtins
Expand Down
10 changes: 8 additions & 2 deletions pandas/tests/tseries/offsets/test_offsets.py
Original file line number Diff line number Diff line change
Expand Up @@ -591,7 +591,10 @@ def test_repr(self):
assert repr(self.offset) == '<BusinessDay>'
assert repr(self.offset2) == '<2 * BusinessDays>'

expected = '<BusinessDay: offset=datetime.timedelta(1)>'
if compat.PY37:
expected = '<BusinessDay: offset=datetime.timedelta(days=1)>'
else:
expected = '<BusinessDay: offset=datetime.timedelta(1)>'
assert repr(self.offset + timedelta(1)) == expected

def test_with_offset(self):
Expand Down Expand Up @@ -1651,7 +1654,10 @@ def test_repr(self):
assert repr(self.offset) == '<CustomBusinessDay>'
assert repr(self.offset2) == '<2 * CustomBusinessDays>'

expected = '<BusinessDay: offset=datetime.timedelta(1)>'
if compat.PY37:
expected = '<BusinessDay: offset=datetime.timedelta(days=1)>'
else:
expected = '<BusinessDay: offset=datetime.timedelta(1)>'
assert repr(self.offset + timedelta(1)) == expected

def test_with_offset(self):
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,7 @@ def build_extensions(self):
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Cython',
'Topic :: Scientific/Engineering']

Expand Down

0 comments on commit 7829ad3

Please sign in to comment.