From 5a4c5b84c994da28153f7c4a2af767a02e142463 Mon Sep 17 00:00:00 2001 From: Tom Augspurger Date: Fri, 22 Jun 2018 17:01:47 -0500 Subject: [PATCH 1/4] CI: 3.7 --- .travis.yml | 5 +++++ ci/travis-37.yaml | 14 ++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 ci/travis-37.yaml diff --git a/.travis.yml b/.travis.yml index 4e25380a7d941..2d2a0bc019c80 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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 diff --git a/ci/travis-37.yaml b/ci/travis-37.yaml new file mode 100644 index 0000000000000..8b255c9e6ec72 --- /dev/null +++ b/ci/travis-37.yaml @@ -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 From aa15d4da469af4d605b2ed025e127e81b9d55e71 Mon Sep 17 00:00:00 2001 From: Tom Augspurger Date: Fri, 22 Jun 2018 21:47:53 -0500 Subject: [PATCH 2/4] COMPAT: datetime.timedelta repr change --- pandas/compat/__init__.py | 9 +++++---- pandas/tests/tseries/offsets/test_offsets.py | 10 ++++++++-- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/pandas/compat/__init__.py b/pandas/compat/__init__.py index 5ae22694d0da7..28a55133e68aa 100644 --- a/pandas/compat/__init__.py +++ b/pandas/compat/__init__.py @@ -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 diff --git a/pandas/tests/tseries/offsets/test_offsets.py b/pandas/tests/tseries/offsets/test_offsets.py index 66cb9baeb9357..74bc08ee9649b 100644 --- a/pandas/tests/tseries/offsets/test_offsets.py +++ b/pandas/tests/tseries/offsets/test_offsets.py @@ -591,7 +591,10 @@ def test_repr(self): assert repr(self.offset) == '' assert repr(self.offset2) == '<2 * BusinessDays>' - expected = '' + if compat.PY37: + expected = '' + else: + expected = '' assert repr(self.offset + timedelta(1)) == expected def test_with_offset(self): @@ -1651,7 +1654,10 @@ def test_repr(self): assert repr(self.offset) == '' assert repr(self.offset2) == '<2 * CustomBusinessDays>' - expected = '' + if compat.PY37: + expected = '' + else: + expected = '' assert repr(self.offset + timedelta(1)) == expected def test_with_offset(self): From ee91bfe55e3ab883f699dbd7cfa764f63862bd1a Mon Sep 17 00:00:00 2001 From: Tom Augspurger Date: Fri, 22 Jun 2018 21:52:28 -0500 Subject: [PATCH 3/4] changelog --- doc/source/whatsnew/v0.23.2.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/doc/source/whatsnew/v0.23.2.txt b/doc/source/whatsnew/v0.23.2.txt index c781f45715bd4..494c7bacac9aa 100644 --- a/doc/source/whatsnew/v0.23.2.txt +++ b/doc/source/whatsnew/v0.23.2.txt @@ -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 From de3e8dfad5cdb8b5694fcac40917430bf759de9e Mon Sep 17 00:00:00 2001 From: Tom Augspurger Date: Mon, 25 Jun 2018 08:00:03 -0500 Subject: [PATCH 4/4] DOC --- doc/source/install.rst | 2 +- setup.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/source/install.rst b/doc/source/install.rst index 87d1b63914635..fa6b9f4fc7f4d 100644 --- a/doc/source/install.rst +++ b/doc/source/install.rst @@ -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 ----------------- diff --git a/setup.py b/setup.py index d6890a08b09d0..dd026bd611727 100755 --- a/setup.py +++ b/setup.py @@ -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']