From 796603556d7da238ffb6f35f500a655d1a0b05ca Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Sat, 26 Jan 2019 01:18:52 +0100 Subject: [PATCH 01/44] Remove py27 CI jobs --- ci/deps/{azure-27-compat.yaml => azure-35-compat.yaml} | 2 +- ci/deps/{azure-27-locale.yaml => azure-36-locale.yaml} | 2 +- ci/deps/azure-windows-36.yaml | 2 +- ci/deps/{azure-windows-27.yaml => azure-windows-37.yaml} | 6 +++--- ci/deps/{travis-27.yaml => travis-35.yaml} | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) rename ci/deps/{azure-27-compat.yaml => azure-35-compat.yaml} (96%) rename ci/deps/{azure-27-locale.yaml => azure-36-locale.yaml} (96%) rename ci/deps/{azure-windows-27.yaml => azure-windows-37.yaml} (87%) rename ci/deps/{travis-27.yaml => travis-35.yaml} (97%) diff --git a/ci/deps/azure-27-compat.yaml b/ci/deps/azure-35-compat.yaml similarity index 96% rename from ci/deps/azure-27-compat.yaml rename to ci/deps/azure-35-compat.yaml index 8899e22bdf6cf..5230cbed5ddec 100644 --- a/ci/deps/azure-27-compat.yaml +++ b/ci/deps/azure-35-compat.yaml @@ -11,7 +11,7 @@ dependencies: - openpyxl=2.5.5 - pytables=3.4.2 - python-dateutil=2.5.0 - - python=2.7* + - python=3.5* - pytz=2013b - scipy=0.18.1 - xlrd=1.0.0 diff --git a/ci/deps/azure-27-locale.yaml b/ci/deps/azure-36-locale.yaml similarity index 96% rename from ci/deps/azure-27-locale.yaml rename to ci/deps/azure-36-locale.yaml index 0846ef5e8264e..4e30778c9d51f 100644 --- a/ci/deps/azure-27-locale.yaml +++ b/ci/deps/azure-36-locale.yaml @@ -11,7 +11,7 @@ dependencies: - openpyxl=2.4.0 - python-dateutil - python-blosc - - python=2.7 + - python=3.6 - pytz - pytz=2013b - scipy diff --git a/ci/deps/azure-windows-36.yaml b/ci/deps/azure-windows-36.yaml index 7b132a134c44e..22bdd2938d4f4 100644 --- a/ci/deps/azure-windows-36.yaml +++ b/ci/deps/azure-windows-36.yaml @@ -15,7 +15,7 @@ dependencies: - pyarrow - pytables - python-dateutil - - python=3.6.6 + - python=3.6.* - pytz - scipy - xlrd diff --git a/ci/deps/azure-windows-27.yaml b/ci/deps/azure-windows-37.yaml similarity index 87% rename from ci/deps/azure-windows-27.yaml rename to ci/deps/azure-windows-37.yaml index b1533b071fa74..a2e1e51dc485a 100644 --- a/ci/deps/azure-windows-27.yaml +++ b/ci/deps/azure-windows-37.yaml @@ -10,12 +10,12 @@ dependencies: - html5lib - jinja2=2.8 - lxml - - matplotlib=2.0.1 + - matplotlib=3.0.1 - numexpr - - numpy=1.12* + - numpy=1.14.* - openpyxl - pytables - - python=2.7.* + - python=3.7.* - pytz - s3fs - scipy diff --git a/ci/deps/travis-27.yaml b/ci/deps/travis-35.yaml similarity index 97% rename from ci/deps/travis-27.yaml rename to ci/deps/travis-35.yaml index 2624797b24fa1..9c207bb9901e0 100644 --- a/ci/deps/travis-27.yaml +++ b/ci/deps/travis-35.yaml @@ -29,7 +29,7 @@ dependencies: - blosc=1.14.3 - python-blosc - python-dateutil=2.5.0 - - python=2.7* + - python=3.5* - pytz=2013b - s3fs - scipy From b224cd62e07476b0cf394dbccedb59c44fbc0ba7 Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Sat, 26 Jan 2019 01:25:46 +0100 Subject: [PATCH 02/44] Remove jinja-pin for 3.7 build --- ci/deps/azure-windows-37.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/deps/azure-windows-37.yaml b/ci/deps/azure-windows-37.yaml index a2e1e51dc485a..425296b7dd529 100644 --- a/ci/deps/azure-windows-37.yaml +++ b/ci/deps/azure-windows-37.yaml @@ -8,7 +8,7 @@ dependencies: - dateutil - gcsfs - html5lib - - jinja2=2.8 + - jinja2 - lxml - matplotlib=3.0.1 - numexpr From b88b87df352f1097eacdcb08b6f9669b64deefcb Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Sat, 2 Feb 2019 00:17:31 +0100 Subject: [PATCH 03/44] Reflect renamed file names in CI config / scripts --- ci/azure/posix.yml | 12 ++++++------ ci/azure/windows.yml | 13 +++---------- ci/run_with_env.cmd | 4 ++-- 3 files changed, 11 insertions(+), 18 deletions(-) diff --git a/ci/azure/posix.yml b/ci/azure/posix.yml index b9e0cd0b9258c..39ba5258f86ff 100644 --- a/ci/azure/posix.yml +++ b/ci/azure/posix.yml @@ -15,14 +15,14 @@ jobs: PATTERN: "not slow and not network" ${{ if eq(parameters.name, 'Linux') }}: - py27_np_120: - ENV_FILE: ci/deps/azure-27-compat.yaml - CONDA_PY: "27" + py35_np_120: + ENV_FILE: ci/deps/azure-35-compat.yaml + CONDA_PY: "35" PATTERN: "not slow and not network" - py27_locale_slow_old_np: - ENV_FILE: ci/deps/azure-27-locale.yaml - CONDA_PY: "27" + py36_locale_slow_old_np: + ENV_FILE: ci/deps/azure36-locale.yaml + CONDA_PY: "36" PATTERN: "slow" LOCALE_OVERRIDE: "zh_CN.UTF-8" EXTRA_APT: "language-pack-zh-hans" diff --git a/ci/azure/windows.yml b/ci/azure/windows.yml index cece002024936..cd5879bf55e4b 100644 --- a/ci/azure/windows.yml +++ b/ci/azure/windows.yml @@ -12,9 +12,9 @@ jobs: ENV_FILE: ci/deps/azure-windows-36.yaml CONDA_PY: "36" - py27_np121: - ENV_FILE: ci/deps/azure-windows-27.yaml - CONDA_PY: "27" + py37_np141: + ENV_FILE: ci/deps/azure-windows-37.yaml + CONDA_PY: "37" steps: - task: CondaEnvironment@1 @@ -22,13 +22,6 @@ jobs: updateConda: no packageSpecs: '' - - powershell: | - $wc = New-Object net.webclient - $wc.Downloadfile("https://download.microsoft.com/download/7/9/6/796EF2E4-801B-4FC4-AB28-B59FBF6D907B/VCForPython27.msi", "VCForPython27.msi") - Start-Process "VCForPython27.msi" /qn -Wait - displayName: 'Install VC 9.0 only for Python 2.7' - condition: eq(variables.CONDA_PY, '27') - - script: | ci\\incremental\\setup_conda_environment.cmd displayName: 'Before Install' diff --git a/ci/run_with_env.cmd b/ci/run_with_env.cmd index 848f4608c8627..0661039a21fae 100644 --- a/ci/run_with_env.cmd +++ b/ci/run_with_env.cmd @@ -1,5 +1,5 @@ :: EXPECTED ENV VARS: PYTHON_ARCH (either x86 or x64) -:: CONDA_PY (either 27, 33, 35 etc. - only major version is extracted) +:: CONDA_PY (either 35, 36 etc. - only major version is extracted) :: :: :: To build extensions for 64 bit Python 3, we need to configure environment @@ -45,7 +45,7 @@ SET WIN_SDK_ROOT=C:\Program Files\Microsoft SDKs\Windows SET MAJOR_PYTHON_VERSION=%CONDA_PY:~0,1% IF "%CONDA_PY:~2,1%" == "" ( - :: CONDA_PY style, such as 27, 34 etc. + :: CONDA_PY style, such as 36, 37 etc. SET MINOR_PYTHON_VERSION=%CONDA_PY:~1,1% ) ELSE ( IF "%CONDA_PY:~3,1%" == "." ( From fdc0035fafa682f5babcbc244d2dc11fc5f9a9cb Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Sat, 2 Feb 2019 01:34:03 +0100 Subject: [PATCH 04/44] fix travis.yml --- .travis.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index e478d71a5c350..bb14c941d2bce 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,5 @@ sudo: false language: python -# Default Python version is usually 2.7 python: 3.5 # To turn off cached cython files and compiler cache @@ -38,7 +37,7 @@ matrix: - dist: trusty env: - - JOB="2.7" ENV_FILE="ci/deps/travis-27.yaml" PATTERN="(not slow or (single and db))" + - JOB="3.5" ENV_FILE="ci/deps/travis-35.yaml" PATTERN="(not slow or (single and db))" addons: apt: packages: From 5de5d5f1afc939f9b7a08b72d1b92069324f44fe Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Sat, 2 Feb 2019 01:40:14 +0100 Subject: [PATCH 05/44] Fix azure builds --- ci/azure/posix.yml | 2 +- ci/deps/azure-35-compat.yaml | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/ci/azure/posix.yml b/ci/azure/posix.yml index 39ba5258f86ff..f361c6a3a91de 100644 --- a/ci/azure/posix.yml +++ b/ci/azure/posix.yml @@ -21,7 +21,7 @@ jobs: PATTERN: "not slow and not network" py36_locale_slow_old_np: - ENV_FILE: ci/deps/azure36-locale.yaml + ENV_FILE: ci/deps/azure-36-locale.yaml CONDA_PY: "36" PATTERN: "slow" LOCALE_OVERRIDE: "zh_CN.UTF-8" diff --git a/ci/deps/azure-35-compat.yaml b/ci/deps/azure-35-compat.yaml index 5230cbed5ddec..d18866f2db78b 100644 --- a/ci/deps/azure-35-compat.yaml +++ b/ci/deps/azure-35-compat.yaml @@ -16,7 +16,6 @@ dependencies: - scipy=0.18.1 - xlrd=1.0.0 - xlsxwriter=0.5.2 - - xlwt=0.7.5 # universal - pytest - pytest-xdist From dcccd6e03a2430c1bdaa12166c55e29a83c80049 Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Sat, 2 Feb 2019 03:15:58 +0100 Subject: [PATCH 06/44] Update minimal versions to make env resolution possible --- ci/deps/azure-35-compat.yaml | 7 ++++--- ci/deps/azure-36-locale.yaml | 8 ++++---- ci/deps/travis-35.yaml | 13 ++++++------- doc/source/whatsnew/v0.25.0.rst | 24 ++++++++++++++++++++++++ 4 files changed, 38 insertions(+), 14 deletions(-) diff --git a/ci/deps/azure-35-compat.yaml b/ci/deps/azure-35-compat.yaml index d18866f2db78b..5e3b9e034e810 100644 --- a/ci/deps/azure-35-compat.yaml +++ b/ci/deps/azure-35-compat.yaml @@ -8,14 +8,15 @@ dependencies: - jinja2=2.8 - numexpr=2.6.1 - numpy=1.12.0 - - openpyxl=2.5.5 + - openpyxl=2.2.6 - pytables=3.4.2 - python-dateutil=2.5.0 - python=3.5* - - pytz=2013b + - pytz=2015.4 - scipy=0.18.1 - xlrd=1.0.0 - - xlsxwriter=0.5.2 + - xlsxwriter=0.7.7 + - xlwt=1.0.0 # universal - pytest - pytest-xdist diff --git a/ci/deps/azure-36-locale.yaml b/ci/deps/azure-36-locale.yaml index 4e30778c9d51f..0305948db515a 100644 --- a/ci/deps/azure-36-locale.yaml +++ b/ci/deps/azure-36-locale.yaml @@ -13,12 +13,12 @@ dependencies: - python-blosc - python=3.6 - pytz - - pytz=2013b + - pytz=2016.10 - scipy - - sqlalchemy=0.8.1 + - sqlalchemy=1.1.4 - xlrd=1.0.0 - - xlsxwriter=0.5.2 - - xlwt=0.7.5 + - xlsxwriter=0.9.4 + - xlwt=1.2.0 # universal - pytest - pytest-xdist diff --git a/ci/deps/travis-35.yaml b/ci/deps/travis-35.yaml index 9c207bb9901e0..5dc51486550c9 100644 --- a/ci/deps/travis-35.yaml +++ b/ci/deps/travis-35.yaml @@ -6,11 +6,9 @@ dependencies: - beautifulsoup4 - bottleneck - cython=0.28.2 - - fastparquet>=0.2.1 - gcsfs - html5lib - ipython - - jemalloc=4.5.0.post - jinja2=2.8 - lxml - matplotlib=2.2.2 @@ -24,26 +22,27 @@ dependencies: - py - pyarrow=0.9.0 - PyCrypto - - pymysql=0.6.3 + - pymysql=0.6.6 - pytables - blosc=1.14.3 - python-blosc - python-dateutil=2.5.0 - python=3.5* - - pytz=2013b + - pytz=2015.4 - s3fs - scipy - sqlalchemy=0.9.6 - xarray=0.9.6 - xlrd=1.0.0 - - xlsxwriter=0.5.2 - - xlwt=0.7.5 + - xlsxwriter=0.7.7 + - xlwt=1.0.0 # universal - pytest - pytest-xdist - - moto==1.3.4 - hypothesis>=3.58.0 - pip: - backports.lzma + - fastparquet>=0.2.1 + - moto==1.3.4 - pandas-gbq - pathlib diff --git a/doc/source/whatsnew/v0.25.0.rst b/doc/source/whatsnew/v0.25.0.rst index 09626be713c4f..185682542f9ce 100644 --- a/doc/source/whatsnew/v0.25.0.rst +++ b/doc/source/whatsnew/v0.25.0.rst @@ -28,6 +28,30 @@ Other Enhancements Backwards incompatible API changes ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.. _whatsnew_0250.api_breaking.deps: + +Dependencies have increased minimum versions +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Due to dropping support for Python 2.7, a number of optional dependencies have updated +minimum versions. If installed, we now require: + ++-----------------+-----------------+----------+ +| Package | Minimum Version | Required | ++=================+=================+==========+ +| openpyxl | 2.2.6 | | ++-----------------+-----------------+----------+ +| pymysql | 0.6.6 | | ++-----------------+-----------------+----------+ +| pytz | 2015.4 | | ++-----------------+-----------------+----------+ +| sqlalchemy | 1.0.8 | | ++-----------------+-----------------+----------+ +| xlsxwriter | 0.7.7 | | ++-----------------+-----------------+----------+ +| xlwt | 1.0.0 | | ++-----------------+-----------------+----------+ + .. _whatsnew_0250.api.other: Other API Changes From a01f50eb69159f8fa744a3e0d4ac4981118a5c14 Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Sun, 3 Feb 2019 15:23:24 +0100 Subject: [PATCH 07/44] More dep resolutions --- ci/deps/azure-35-compat.yaml | 4 ++-- ci/deps/azure-36-locale.yaml | 3 +-- ci/deps/azure-windows-37.yaml | 2 +- ci/deps/travis-35.yaml | 2 +- doc/source/whatsnew/v0.25.0.rst | 2 ++ 5 files changed, 7 insertions(+), 6 deletions(-) diff --git a/ci/deps/azure-35-compat.yaml b/ci/deps/azure-35-compat.yaml index 5e3b9e034e810..1deeb0a2c2403 100644 --- a/ci/deps/azure-35-compat.yaml +++ b/ci/deps/azure-35-compat.yaml @@ -3,8 +3,10 @@ channels: - defaults - conda-forge dependencies: + - beautifulsoup4==4.4.1 - bottleneck=1.2.0 - cython=0.28.2 + - hypothesis>=3.58.0 - jinja2=2.8 - numexpr=2.6.1 - numpy=1.12.0 @@ -22,5 +24,3 @@ dependencies: - pytest-xdist - pip: - html5lib==1.0b2 - - beautifulsoup4==4.2.1 - - hypothesis>=3.58.0 diff --git a/ci/deps/azure-36-locale.yaml b/ci/deps/azure-36-locale.yaml index 0305948db515a..c3042aa752693 100644 --- a/ci/deps/azure-36-locale.yaml +++ b/ci/deps/azure-36-locale.yaml @@ -3,6 +3,7 @@ channels: - defaults - conda-forge dependencies: + - beautifulsoup4==4.5.1 - bottleneck=1.2.0 - cython=0.28.2 - lxml @@ -12,7 +13,6 @@ dependencies: - python-dateutil - python-blosc - python=3.6 - - pytz - pytz=2016.10 - scipy - sqlalchemy=1.1.4 @@ -25,4 +25,3 @@ dependencies: - hypothesis>=3.58.0 - pip: - html5lib==1.0b2 - - beautifulsoup4==4.2.1 diff --git a/ci/deps/azure-windows-37.yaml b/ci/deps/azure-windows-37.yaml index 425296b7dd529..84fc6c73b8aac 100644 --- a/ci/deps/azure-windows-37.yaml +++ b/ci/deps/azure-windows-37.yaml @@ -5,7 +5,6 @@ channels: dependencies: - beautifulsoup4 - bottleneck - - dateutil - gcsfs - html5lib - jinja2 @@ -16,6 +15,7 @@ dependencies: - openpyxl - pytables - python=3.7.* + - python-dateutil - pytz - s3fs - scipy diff --git a/ci/deps/travis-35.yaml b/ci/deps/travis-35.yaml index 5dc51486550c9..53067eb83f220 100644 --- a/ci/deps/travis-35.yaml +++ b/ci/deps/travis-35.yaml @@ -31,7 +31,7 @@ dependencies: - pytz=2015.4 - s3fs - scipy - - sqlalchemy=0.9.6 + - sqlalchemy=1.0.8 - xarray=0.9.6 - xlrd=1.0.0 - xlsxwriter=0.7.7 diff --git a/doc/source/whatsnew/v0.25.0.rst b/doc/source/whatsnew/v0.25.0.rst index 185682542f9ce..a63975e450f25 100644 --- a/doc/source/whatsnew/v0.25.0.rst +++ b/doc/source/whatsnew/v0.25.0.rst @@ -39,6 +39,8 @@ minimum versions. If installed, we now require: +-----------------+-----------------+----------+ | Package | Minimum Version | Required | +=================+=================+==========+ +| beautifulsoup4 | 4.4.1 | | ++-----------------+-----------------+----------+ | openpyxl | 2.2.6 | | +-----------------+-----------------+----------+ | pymysql | 0.6.6 | | From 19ff3a582fc0c51549eddbf471f6292a4ce39c66 Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Sun, 3 Feb 2019 17:32:24 +0100 Subject: [PATCH 08/44] Try if bumping pymysql/xlsxwriter solves failures --- ci/deps/azure-35-compat.yaml | 2 +- ci/deps/travis-35.yaml | 2 +- doc/source/whatsnew/v0.25.0.rst | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ci/deps/azure-35-compat.yaml b/ci/deps/azure-35-compat.yaml index 1deeb0a2c2403..0afd3622fc2dd 100644 --- a/ci/deps/azure-35-compat.yaml +++ b/ci/deps/azure-35-compat.yaml @@ -17,7 +17,7 @@ dependencies: - pytz=2015.4 - scipy=0.18.1 - xlrd=1.0.0 - - xlsxwriter=0.7.7 + - xlsxwriter=0.8.2 - xlwt=1.0.0 # universal - pytest diff --git a/ci/deps/travis-35.yaml b/ci/deps/travis-35.yaml index 53067eb83f220..bc98749ed7d42 100644 --- a/ci/deps/travis-35.yaml +++ b/ci/deps/travis-35.yaml @@ -22,7 +22,7 @@ dependencies: - py - pyarrow=0.9.0 - PyCrypto - - pymysql=0.6.6 + - pymysql=0.7.6 - pytables - blosc=1.14.3 - python-blosc diff --git a/doc/source/whatsnew/v0.25.0.rst b/doc/source/whatsnew/v0.25.0.rst index a63975e450f25..59746b994a98b 100644 --- a/doc/source/whatsnew/v0.25.0.rst +++ b/doc/source/whatsnew/v0.25.0.rst @@ -43,13 +43,13 @@ minimum versions. If installed, we now require: +-----------------+-----------------+----------+ | openpyxl | 2.2.6 | | +-----------------+-----------------+----------+ -| pymysql | 0.6.6 | | +| pymysql | 0.7.6 | | +-----------------+-----------------+----------+ | pytz | 2015.4 | | +-----------------+-----------------+----------+ | sqlalchemy | 1.0.8 | | +-----------------+-----------------+----------+ -| xlsxwriter | 0.7.7 | | +| xlsxwriter | 0.8.2 | | +-----------------+-----------------+----------+ | xlwt | 1.0.0 | | +-----------------+-----------------+----------+ From 835679ed9b9c216b1c1f4953c9f2b2834e63d848 Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Sun, 3 Feb 2019 17:41:01 +0100 Subject: [PATCH 09/44] fix naming of azure jobs --- ci/azure/posix.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ci/azure/posix.yml b/ci/azure/posix.yml index f361c6a3a91de..7119054cf2f53 100644 --- a/ci/azure/posix.yml +++ b/ci/azure/posix.yml @@ -9,13 +9,13 @@ jobs: strategy: matrix: ${{ if eq(parameters.name, 'macOS') }}: - py35_np_120: + py35_macos: ENV_FILE: ci/deps/azure-macos-35.yaml CONDA_PY: "35" PATTERN: "not slow and not network" ${{ if eq(parameters.name, 'Linux') }}: - py35_np_120: + py35_compat: ENV_FILE: ci/deps/azure-35-compat.yaml CONDA_PY: "35" PATTERN: "not slow and not network" From 7827b71726ddb8d55d449e64d453941c04cb0246 Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Sun, 3 Feb 2019 18:21:28 +0100 Subject: [PATCH 10/44] Unpin pymysql/xlsxwriter in affected builds to check... --- ci/deps/azure-35-compat.yaml | 2 +- ci/deps/travis-35.yaml | 2 +- doc/source/whatsnew/v0.25.0.rst | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ci/deps/azure-35-compat.yaml b/ci/deps/azure-35-compat.yaml index 0afd3622fc2dd..1560b859f8ebd 100644 --- a/ci/deps/azure-35-compat.yaml +++ b/ci/deps/azure-35-compat.yaml @@ -17,7 +17,7 @@ dependencies: - pytz=2015.4 - scipy=0.18.1 - xlrd=1.0.0 - - xlsxwriter=0.8.2 + - xlsxwriter - xlwt=1.0.0 # universal - pytest diff --git a/ci/deps/travis-35.yaml b/ci/deps/travis-35.yaml index bc98749ed7d42..61c8515b5061d 100644 --- a/ci/deps/travis-35.yaml +++ b/ci/deps/travis-35.yaml @@ -22,7 +22,7 @@ dependencies: - py - pyarrow=0.9.0 - PyCrypto - - pymysql=0.7.6 + - pymysql - pytables - blosc=1.14.3 - python-blosc diff --git a/doc/source/whatsnew/v0.25.0.rst b/doc/source/whatsnew/v0.25.0.rst index 59746b994a98b..8d07211b1fd8f 100644 --- a/doc/source/whatsnew/v0.25.0.rst +++ b/doc/source/whatsnew/v0.25.0.rst @@ -43,13 +43,13 @@ minimum versions. If installed, we now require: +-----------------+-----------------+----------+ | openpyxl | 2.2.6 | | +-----------------+-----------------+----------+ -| pymysql | 0.7.6 | | +| pymysql | ? | | +-----------------+-----------------+----------+ | pytz | 2015.4 | | +-----------------+-----------------+----------+ | sqlalchemy | 1.0.8 | | +-----------------+-----------------+----------+ -| xlsxwriter | 0.8.2 | | +| xlsxwriter | 0.7.7 | | +-----------------+-----------------+----------+ | xlwt | 1.0.0 | | +-----------------+-----------------+----------+ From e41689f3d717bfe961b8471d7506e1cc94d2fd6d Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Sun, 3 Feb 2019 19:47:35 +0100 Subject: [PATCH 11/44] temp fix to ease discussion: xfail failing tests --- ci/deps/azure-35-compat.yaml | 2 +- ci/deps/travis-35.yaml | 2 +- doc/source/whatsnew/v0.25.0.rst | 2 +- pandas/tests/io/test_excel.py | 3 ++- pandas/tests/io/test_sql.py | 5 ++++- 5 files changed, 9 insertions(+), 5 deletions(-) diff --git a/ci/deps/azure-35-compat.yaml b/ci/deps/azure-35-compat.yaml index 1560b859f8ebd..1deeb0a2c2403 100644 --- a/ci/deps/azure-35-compat.yaml +++ b/ci/deps/azure-35-compat.yaml @@ -17,7 +17,7 @@ dependencies: - pytz=2015.4 - scipy=0.18.1 - xlrd=1.0.0 - - xlsxwriter + - xlsxwriter=0.7.7 - xlwt=1.0.0 # universal - pytest diff --git a/ci/deps/travis-35.yaml b/ci/deps/travis-35.yaml index 61c8515b5061d..53067eb83f220 100644 --- a/ci/deps/travis-35.yaml +++ b/ci/deps/travis-35.yaml @@ -22,7 +22,7 @@ dependencies: - py - pyarrow=0.9.0 - PyCrypto - - pymysql + - pymysql=0.6.6 - pytables - blosc=1.14.3 - python-blosc diff --git a/doc/source/whatsnew/v0.25.0.rst b/doc/source/whatsnew/v0.25.0.rst index 8d07211b1fd8f..a63975e450f25 100644 --- a/doc/source/whatsnew/v0.25.0.rst +++ b/doc/source/whatsnew/v0.25.0.rst @@ -43,7 +43,7 @@ minimum versions. If installed, we now require: +-----------------+-----------------+----------+ | openpyxl | 2.2.6 | | +-----------------+-----------------+----------+ -| pymysql | ? | | +| pymysql | 0.6.6 | | +-----------------+-----------------+----------+ | pytz | 2015.4 | | +-----------------+-----------------+----------+ diff --git a/pandas/tests/io/test_excel.py b/pandas/tests/io/test_excel.py index 717e9bc23c6b1..047a3b66e96d7 100644 --- a/pandas/tests/io/test_excel.py +++ b/pandas/tests/io/test_excel.py @@ -11,7 +11,7 @@ from numpy import nan import pytest -from pandas.compat import PY36, BytesIO, iteritems, map, range, u +from pandas.compat import PY35, PY36, BytesIO, iteritems, map, range, u import pandas.util._test_decorators as td import pandas as pd @@ -2183,6 +2183,7 @@ def test_write_cells_merge_styled(self, merge_cells, ext, engine): assert xcell_b1.font == openpyxl_sty_merged assert xcell_a2.font == openpyxl_sty_merged + @pytest.mark.xfail(PY35 and not PY36, reason='only fails on Linux?') @pytest.mark.parametrize("mode,expected", [ ('w', ['baz']), ('a', ['foo', 'bar', 'baz'])]) def test_write_append_mode(self, merge_cells, ext, engine, mode, expected): diff --git a/pandas/tests/io/test_sql.py b/pandas/tests/io/test_sql.py index 75a6d8d009083..f6c19abcedf2a 100644 --- a/pandas/tests/io/test_sql.py +++ b/pandas/tests/io/test_sql.py @@ -28,7 +28,7 @@ import pytest import pandas.compat as compat -from pandas.compat import PY36, lrange, range, string_types +from pandas.compat import PY35, PY36, lrange, range, string_types from pandas.core.dtypes.common import ( is_datetime64_dtype, is_datetime64tz_dtype) @@ -941,6 +941,7 @@ def test_read_sql_delegate(self): iris_frame2 = sql.read_sql('iris', self.conn) tm.assert_frame_equal(iris_frame1, iris_frame2) + @pytest.mark.xfail(PY35 and not PY36, reason='too many warnings?') def test_not_reflect_all_tables(self): # create invalid table qry = """CREATE TABLE invalid (x INTEGER, y UNKNOWN);""" @@ -957,6 +958,7 @@ def test_not_reflect_all_tables(self): # Verify some things assert len(w) == 0 + @pytest.mark.xfail(PY35 and not PY36, reason='too many warnings?') def test_warning_case_insensitive_table_name(self): # see gh-7815 # @@ -1787,6 +1789,7 @@ def test_default_date_load(self): # IMPORTANT - sqlite has no native date type, so shouldn't parse, but assert not issubclass(df.DateCol.dtype.type, np.datetime64) + @pytest.mark.xfail(PY35 and not PY36, reason='too many warnings?') def test_bigint_warning(self): # test no warning for BIGINT (to support int64) is raised (GH7433) df = DataFrame({'a': [1, 2]}, dtype='int64') From 0c509783ce40183c4ee722f6338cfabd406919c8 Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Sun, 3 Feb 2019 22:00:57 +0100 Subject: [PATCH 12/44] One last test & non-strict xfail --- pandas/tests/io/test_excel.py | 3 ++- pandas/tests/io/test_sql.py | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/pandas/tests/io/test_excel.py b/pandas/tests/io/test_excel.py index 047a3b66e96d7..3bcddcb7eb381 100644 --- a/pandas/tests/io/test_excel.py +++ b/pandas/tests/io/test_excel.py @@ -2183,7 +2183,8 @@ def test_write_cells_merge_styled(self, merge_cells, ext, engine): assert xcell_b1.font == openpyxl_sty_merged assert xcell_a2.font == openpyxl_sty_merged - @pytest.mark.xfail(PY35 and not PY36, reason='only fails on Linux?') + @pytest.mark.xfail(PY35 and not PY36, reason='only fails on Linux?', + strict=False) @pytest.mark.parametrize("mode,expected", [ ('w', ['baz']), ('a', ['foo', 'bar', 'baz'])]) def test_write_append_mode(self, merge_cells, ext, engine, mode, expected): diff --git a/pandas/tests/io/test_sql.py b/pandas/tests/io/test_sql.py index f6c19abcedf2a..c85b7450f6cce 100644 --- a/pandas/tests/io/test_sql.py +++ b/pandas/tests/io/test_sql.py @@ -1836,6 +1836,7 @@ def test_default_type_conversion(self): # Bool column with NA = int column with NA values => becomes float assert issubclass(df.BoolColWithNull.dtype.type, np.floating) + @pytest.mark.xfail(PY35 and not PY36, reason='?') def test_read_procedure(self): import pymysql # see GH7324. Although it is more an api test, it is added to the From 4d5c3c8037b8b452e98f27b23a9c5bf29ab4fcd7 Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Sun, 3 Feb 2019 23:54:44 +0100 Subject: [PATCH 13/44] non-strict xfail for flaky test --- pandas/tests/io/test_sql.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pandas/tests/io/test_sql.py b/pandas/tests/io/test_sql.py index c85b7450f6cce..74d978528c2b9 100644 --- a/pandas/tests/io/test_sql.py +++ b/pandas/tests/io/test_sql.py @@ -1836,7 +1836,8 @@ def test_default_type_conversion(self): # Bool column with NA = int column with NA values => becomes float assert issubclass(df.BoolColWithNull.dtype.type, np.floating) - @pytest.mark.xfail(PY35 and not PY36, reason='?') + @pytest.mark.xfail(PY35 and not PY36, reason='unkown; also flaky', + strict=False) def test_read_procedure(self): import pymysql # see GH7324. Although it is more an api test, it is added to the From b32f43433b1c76b9371593b5171f2bef3650ba6d Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Sun, 17 Feb 2019 14:19:31 +0100 Subject: [PATCH 14/44] Unpin moto --- ci/deps/travis-35.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/deps/travis-35.yaml b/ci/deps/travis-35.yaml index 842dbf0e03e57..652d6b1a6d62b 100644 --- a/ci/deps/travis-35.yaml +++ b/ci/deps/travis-35.yaml @@ -44,6 +44,6 @@ dependencies: - pip: - backports.lzma - fastparquet>=0.2.1 - - moto==1.3.4 + - moto - pandas-gbq - pathlib From eae43080d24da3be400354ddea7adb76c2e2b052 Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Sun, 17 Feb 2019 16:18:35 +0100 Subject: [PATCH 15/44] Retrigger after connectivity issues From 6fdfe918162c7ef9000a8eed26fc367b34daf718 Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Tue, 19 Feb 2019 20:49:56 +0100 Subject: [PATCH 16/44] Changes in azure-pipelines.yml and tox.ini inspired by #25217 --- azure-pipelines.yml | 1 - tox.ini | 34 +++------------------------------- 2 files changed, 3 insertions(+), 32 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index f0567d76659b6..6c30ec641f292 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -10,7 +10,6 @@ jobs: name: Linux vmImage: ubuntu-16.04 -# Windows Python 2.7 needs VC 9.0 installed, handled in the template - template: ci/azure/windows.yml parameters: name: Windows diff --git a/tox.ini b/tox.ini index f055251581a93..78118aa6c68f3 100644 --- a/tox.ini +++ b/tox.ini @@ -4,14 +4,14 @@ # and then run "tox" from this directory. [tox] -envlist = py27, py35, py36 +envlist = py35, py36, py37 [testenv] deps = cython nose pytest - pytz>=2011k + pytz>=2015.4 python-dateutil beautifulsoup4 lxml @@ -43,40 +43,12 @@ commands = # tox should provide a preinstall-commands hook. pip uninstall pandas -qy -[testenv:py27] -deps = - numpy==1.8.1 - boto - bigquery - {[testenv]deps} - [testenv:py35] deps = - numpy==1.10.0 + numpy==1.12.0 {[testenv]deps} [testenv:py36] deps = numpy {[testenv]deps} - -[testenv:openpyxl1] -usedevelop = True -deps = - {[testenv]deps} - openpyxl<2.0.0 -commands = {envbindir}/pytest {toxinidir}/pandas/io/tests/test_excel.py - -[testenv:openpyxl20] -usedevelop = True -deps = - {[testenv]deps} - openpyxl<2.2.0 -commands = {envbindir}/pytest {posargs} {toxinidir}/pandas/io/tests/test_excel.py - -[testenv:openpyxl22] -usedevelop = True -deps = - {[testenv]deps} - openpyxl>=2.2.0 -commands = {envbindir}/pytest {posargs} {toxinidir}/pandas/io/tests/test_excel.py From 3052e35e889ce12df9de40881326e8e05196c7f6 Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Tue, 19 Feb 2019 21:21:04 +0100 Subject: [PATCH 17/44] Correct issue reference for other whatsnew --- doc/source/whatsnew/v0.25.0.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/source/whatsnew/v0.25.0.rst b/doc/source/whatsnew/v0.25.0.rst index 528be3f30f72b..107a5b7a29bdd 100644 --- a/doc/source/whatsnew/v0.25.0.rst +++ b/doc/source/whatsnew/v0.25.0.rst @@ -59,7 +59,7 @@ minimum versions. If installed, we now require: Other API Changes ^^^^^^^^^^^^^^^^^ -- :meth:`Timestamp.strptime` will now raise a NotImplementedError (:issue:`21257`) +- :meth:`Timestamp.strptime` will now raise a NotImplementedError (:issue:`25016`) .. _whatsnew_0250.api.other: From eba9941deae03fd19c13593783563c4f56ad4d20 Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Tue, 19 Feb 2019 21:27:26 +0100 Subject: [PATCH 18/44] mixed up sections --- doc/source/whatsnew/v0.25.0.rst | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/doc/source/whatsnew/v0.25.0.rst b/doc/source/whatsnew/v0.25.0.rst index 107a5b7a29bdd..072be900f3d2b 100644 --- a/doc/source/whatsnew/v0.25.0.rst +++ b/doc/source/whatsnew/v0.25.0.rst @@ -28,6 +28,8 @@ Other Enhancements Backwards incompatible API changes ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +- :meth:`Timestamp.strptime` will now raise a NotImplementedError (:issue:`25016`) + .. _whatsnew_0250.api_breaking.deps: Dependencies have increased minimum versions @@ -59,13 +61,6 @@ minimum versions. If installed, we now require: Other API Changes ^^^^^^^^^^^^^^^^^ -- :meth:`Timestamp.strptime` will now raise a NotImplementedError (:issue:`25016`) - -.. _whatsnew_0250.api.other: - -Other API Changes -^^^^^^^^^^^^^^^^^ - - :class:`DatetimeTZDtype` will now standardize pytz timezones to a common timezone instance (:issue:`24713`) - ``Timestamp`` and ``Timedelta`` scalars now implement the :meth:`to_numpy` method as aliases to :meth:`Timestamp.to_datetime64` and :meth:`Timedelta.to_timedelta64`, respectively. (:issue:`24653`) - From 12ccef37dcc5b12728581dd5fd853d7bf4b9b2b8 Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Tue, 19 Feb 2019 23:15:38 +0100 Subject: [PATCH 19/44] Retrigger Azure jobs From 6628284a125e263399e5ae90c26ef71ea938f552 Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Mon, 4 Mar 2019 07:40:58 +0100 Subject: [PATCH 20/44] Merge whatsnew min-ver-sections --- doc/source/whatsnew/v0.25.0.rst | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/doc/source/whatsnew/v0.25.0.rst b/doc/source/whatsnew/v0.25.0.rst index fb7c68c70c76e..d70820ff74770 100644 --- a/doc/source/whatsnew/v0.25.0.rst +++ b/doc/source/whatsnew/v0.25.0.rst @@ -69,23 +69,10 @@ is respected in indexing. (:issue:`24076`, :issue:`16785`) Increased minimum versions for dependencies ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -We have updated our minimum supported versions of dependencies (:issue:`23519`). +Due to dropping support for Python 2.7, a number of optional dependencies have updated minimum versions. +Independently, some minimum supported versions of dependencies were updated (:issue:`23519`). If installed, we now require: -+-----------------+-----------------+----------+ -| Package | Minimum Version | Required | -+=================+=================+==========+ -| pytest (dev) | 4.0.2 | | -+-----------------+-----------------+----------+ - -.. _whatsnew_0250.api_breaking.deps: - -Dependencies have increased minimum versions -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -Due to dropping support for Python 2.7, a number of optional dependencies have updated -minimum versions. If installed, we now require: - +-----------------+-----------------+----------+ | Package | Minimum Version | Required | +=================+=================+==========+ @@ -95,6 +82,8 @@ minimum versions. If installed, we now require: +-----------------+-----------------+----------+ | pymysql | 0.6.6 | | +-----------------+-----------------+----------+ +| pytest (dev) | 4.0.2 | | ++-----------------+-----------------+----------+ | pytz | 2015.4 | | +-----------------+-----------------+----------+ | sqlalchemy | 1.0.8 | | From 6940171fbc9538ce917729a866ac27c5c92832e2 Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Mon, 4 Mar 2019 07:52:16 +0100 Subject: [PATCH 21/44] Shift pytest to pip-section (resolution error) --- ci/deps/azure-35-compat.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/deps/azure-35-compat.yaml b/ci/deps/azure-35-compat.yaml index dd7b7b8b906e7..ce111be56c2d6 100644 --- a/ci/deps/azure-35-compat.yaml +++ b/ci/deps/azure-35-compat.yaml @@ -20,9 +20,9 @@ dependencies: - xlsxwriter=0.7.7 - xlwt=1.0.0 # universal - - pytest>=4.0.2 - pytest-xdist - pytest-mock - isort - pip: + - pytest>=4.0.2 - html5lib==1.0b2 From c600ca3e5065774d67258ed056b69287f42f375d Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Mon, 4 Mar 2019 07:59:50 +0100 Subject: [PATCH 22/44] Add comment --- ci/deps/azure-35-compat.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/ci/deps/azure-35-compat.yaml b/ci/deps/azure-35-compat.yaml index ce111be56c2d6..05436e79910fb 100644 --- a/ci/deps/azure-35-compat.yaml +++ b/ci/deps/azure-35-compat.yaml @@ -24,5 +24,6 @@ dependencies: - pytest-mock - isort - pip: + # for python 3.5, pytest>=4.0.2 is not available in conda - pytest>=4.0.2 - html5lib==1.0b2 From ee045e95cde44d74c4c126640980071f7975c4be Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Mon, 4 Mar 2019 08:50:40 +0100 Subject: [PATCH 23/44] Shift pytest to pip-section also for travis-job --- ci/deps/travis-35.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ci/deps/travis-35.yaml b/ci/deps/travis-35.yaml index 583d3ffede8f4..4d1a7fde5bf33 100644 --- a/ci/deps/travis-35.yaml +++ b/ci/deps/travis-35.yaml @@ -37,7 +37,6 @@ dependencies: - xlsxwriter=0.7.7 - xlwt=1.0.0 # universal - - pytest>=4.0.2 - pytest-xdist - pytest-mock - hypothesis>=3.58.0 @@ -48,3 +47,5 @@ dependencies: - moto - pandas-gbq - pathlib + # for python 3.5, pytest>=4.0.2 is not available in conda + - pytest>=4.0.2 From 9c94cb64340951146289e0f938fe83e55aa2dce0 Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Mon, 4 Mar 2019 19:26:35 +0100 Subject: [PATCH 24/44] Move s3fs (and thus boto) to pip section --- ci/deps/travis-35.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/deps/travis-35.yaml b/ci/deps/travis-35.yaml index 4d1a7fde5bf33..d75ddc3c72d36 100644 --- a/ci/deps/travis-35.yaml +++ b/ci/deps/travis-35.yaml @@ -29,7 +29,6 @@ dependencies: - python-dateutil=2.5.0 - python=3.5* - pytz=2015.4 - - s3fs - scipy - sqlalchemy=1.0.8 - xarray=0.9.6 @@ -49,3 +48,4 @@ dependencies: - pathlib # for python 3.5, pytest>=4.0.2 is not available in conda - pytest>=4.0.2 + - s3fs From 52e40eb9eaf50df96252539b380aac92bce066f1 Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Mon, 4 Mar 2019 21:59:32 +0100 Subject: [PATCH 25/44] Fix two remaining failures --- pandas/tests/test_algos.py | 5 +++-- pandas/tests/test_sorting.py | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/pandas/tests/test_algos.py b/pandas/tests/test_algos.py index 3f75c508d22f9..9f7e84755bf6a 100644 --- a/pandas/tests/test_algos.py +++ b/pandas/tests/test_algos.py @@ -11,7 +11,7 @@ from pandas._libs import ( algos as libalgos, groupby as libgroupby, hashtable as ht) -from pandas.compat import PY2, lrange, range +from pandas.compat import PY2, PY36, lrange, range from pandas.compat.numpy import np_array_datetime64_compat import pandas.util._test_decorators as td @@ -224,7 +224,8 @@ def test_factorize_tuple_list(self, data, expected_label, expected_level): dtype=object) tm.assert_numpy_array_equal(result[1], expected_level_array) - @pytest.mark.skipif(PY2, reason="pytest.raises match regex fails") + @pytest.mark.skipif(PY2 or not PY36, + reason="pytest.raises match regex fails") def test_complex_sorting(self): # gh 12666 - check no segfault x17 = np.array([complex(i) for i in range(17)], dtype=object) diff --git a/pandas/tests/test_sorting.py b/pandas/tests/test_sorting.py index 2a64947042979..84e300f8151bf 100644 --- a/pandas/tests/test_sorting.py +++ b/pandas/tests/test_sorting.py @@ -7,7 +7,7 @@ from numpy import nan import pytest -from pandas.compat import PY2 +from pandas.compat import PY2, PY36 from pandas import DataFrame, MultiIndex, Series, compat, concat, merge from pandas.core import common as com @@ -405,7 +405,8 @@ def test_mixed_integer_from_list(self): expected = np.array([0, 0, 1, 'a', 'b', 'b'], dtype=object) tm.assert_numpy_array_equal(result, expected) - @pytest.mark.skipif(PY2, reason="pytest.raises match regex fails") + @pytest.mark.skipif(PY2 or not PY36, + reason="pytest.raises match regex fails") def test_unsortable(self): # GH 13714 arr = np.array([1, 2, datetime.now(), 0, 3], dtype=object) From 150e45982d54bbc6f182d140c89e9565a89b656f Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Tue, 5 Mar 2019 07:41:04 +0100 Subject: [PATCH 26/44] Retrigger From 5403c2b6c4a4be49519dd03b404725a875670a9f Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Tue, 5 Mar 2019 19:10:23 +0100 Subject: [PATCH 27/44] Move moto/s3fs back to conda --- ci/deps/travis-35.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ci/deps/travis-35.yaml b/ci/deps/travis-35.yaml index d75ddc3c72d36..7e597393f75ba 100644 --- a/ci/deps/travis-35.yaml +++ b/ci/deps/travis-35.yaml @@ -13,6 +13,7 @@ dependencies: - lxml - matplotlib=2.2.2 - mock + - moto - nomkl - numexpr - numpy=1.13* @@ -31,6 +32,7 @@ dependencies: - pytz=2015.4 - scipy - sqlalchemy=1.0.8 + - s3fs - xarray=0.9.6 - xlrd=1.0.0 - xlsxwriter=0.7.7 @@ -43,9 +45,7 @@ dependencies: - pip: - backports.lzma - fastparquet>=0.2.1 - - moto - pandas-gbq - pathlib # for python 3.5, pytest>=4.0.2 is not available in conda - pytest>=4.0.2 - - s3fs From cff789366bb77d3eae9e4ef687b3dec455e6477d Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Wed, 6 Mar 2019 07:53:56 +0100 Subject: [PATCH 28/44] Fix err msg regexes --- pandas/tests/test_algos.py | 5 ++--- pandas/tests/test_sorting.py | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/pandas/tests/test_algos.py b/pandas/tests/test_algos.py index 9f7e84755bf6a..4599411655534 100644 --- a/pandas/tests/test_algos.py +++ b/pandas/tests/test_algos.py @@ -224,15 +224,14 @@ def test_factorize_tuple_list(self, data, expected_label, expected_level): dtype=object) tm.assert_numpy_array_equal(result[1], expected_level_array) - @pytest.mark.skipif(PY2 or not PY36, - reason="pytest.raises match regex fails") + @pytest.mark.skipif(PY2,reason="pytest.raises match regex fails") def test_complex_sorting(self): # gh 12666 - check no segfault x17 = np.array([complex(i) for i in range(17)], dtype=object) msg = (r"'(<|>)' not supported between instances of 'complex' and" r" 'complex'|" - r"unorderable types: complex\(\) > complex\(\)") + r"unorderable types: complex\(\) (<|>) complex\(\)") with pytest.raises(TypeError, match=msg): algos.factorize(x17[::-1], sort=True) diff --git a/pandas/tests/test_sorting.py b/pandas/tests/test_sorting.py index 05a35118346cf..0d4371c8b0833 100644 --- a/pandas/tests/test_sorting.py +++ b/pandas/tests/test_sorting.py @@ -405,15 +405,14 @@ def test_mixed_integer_from_list(self): expected = np.array([0, 0, 1, 'a', 'b', 'b'], dtype=object) tm.assert_numpy_array_equal(result, expected) - @pytest.mark.skipif(PY2 or not PY36, - reason="pytest.raises match regex fails") + @pytest.mark.skipif(PY2, reason="pytest.raises match regex fails") def test_unsortable(self): # GH 13714 arr = np.array([1, 2, datetime.now(), 0, 3], dtype=object) msg = (r"'(<|>)' not supported between instances of ('" r"datetime\.datetime' and 'int'|'int' and 'datetime\.datetime" r"')|" - r"unorderable types: int\(\) > datetime\.datetime\(\)") + r"unorderable types: int\(\) (<|>) datetime\.datetime\(\)") if compat.PY2: # RuntimeWarning: tp_compare didn't return -1 or -2 for exception with warnings.catch_warnings(): From 23641afa89631d005cdf890fcae42d629ef5f300 Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Wed, 6 Mar 2019 07:54:07 +0100 Subject: [PATCH 29/44] Fix install.rst --- doc/source/install.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/source/install.rst b/doc/source/install.rst index 5310667c403e5..c0a142cd5a6cb 100644 --- a/doc/source/install.rst +++ b/doc/source/install.rst @@ -259,7 +259,7 @@ Optional Dependencies * `PyTables `__: necessary for HDF5-based storage, Version 3.4.2 or higher * `pyarrow `__ (>= 0.9.0): necessary for feather-based storage. * `Apache Parquet `__, either `pyarrow `__ (>= 0.7.0) or `fastparquet `__ (>= 0.2.1) for parquet-based storage. The `snappy `__ and `brotli `__ are available for compression support. -* `SQLAlchemy `__: for SQL database support. Version 0.8.1 or higher recommended. Besides SQLAlchemy, you also need a database specific driver. You can find an overview of supported drivers for each SQL dialect in the `SQLAlchemy docs `__. Some common drivers are: +* `SQLAlchemy `__: for SQL database support. Version 1.0.8 or higher recommended. Besides SQLAlchemy, you also need a database specific driver. You can find an overview of supported drivers for each SQL dialect in the `SQLAlchemy docs `__. Some common drivers are: * `psycopg2 `__: for PostgreSQL * `pymysql `__: for MySQL. @@ -298,7 +298,7 @@ Optional Dependencies .. note:: - If using BeautifulSoup4 a minimum version of 4.2.1 is required + If using BeautifulSoup4 a minimum version of 4.4.1 is required * `BeautifulSoup4`_ and `html5lib`_ (Any recent version of `html5lib`_ is okay.) From a6552729905f9b21e94190c3892d9ba0c0b3764a Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Wed, 6 Mar 2019 07:55:35 +0100 Subject: [PATCH 30/44] Lint --- pandas/tests/test_algos.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandas/tests/test_algos.py b/pandas/tests/test_algos.py index 4599411655534..5b00b82ece14f 100644 --- a/pandas/tests/test_algos.py +++ b/pandas/tests/test_algos.py @@ -224,7 +224,7 @@ def test_factorize_tuple_list(self, data, expected_label, expected_level): dtype=object) tm.assert_numpy_array_equal(result[1], expected_level_array) - @pytest.mark.skipif(PY2,reason="pytest.raises match regex fails") + @pytest.mark.skipif(PY2, reason="pytest.raises match regex fails") def test_complex_sorting(self): # gh 12666 - check no segfault x17 = np.array([complex(i) for i in range(17)], dtype=object) From 916c2cfe36aba44772e8435250cfa88225a3af70 Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Wed, 6 Mar 2019 07:57:08 +0100 Subject: [PATCH 31/44] More lint --- pandas/tests/test_algos.py | 2 +- pandas/tests/test_sorting.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pandas/tests/test_algos.py b/pandas/tests/test_algos.py index 5b00b82ece14f..5b2e3fadaeade 100644 --- a/pandas/tests/test_algos.py +++ b/pandas/tests/test_algos.py @@ -11,7 +11,7 @@ from pandas._libs import ( algos as libalgos, groupby as libgroupby, hashtable as ht) -from pandas.compat import PY2, PY36, lrange, range +from pandas.compat import PY2, lrange, range from pandas.compat.numpy import np_array_datetime64_compat import pandas.util._test_decorators as td diff --git a/pandas/tests/test_sorting.py b/pandas/tests/test_sorting.py index 0d4371c8b0833..b9019891c180d 100644 --- a/pandas/tests/test_sorting.py +++ b/pandas/tests/test_sorting.py @@ -7,7 +7,7 @@ from numpy import nan import pytest -from pandas.compat import PY2, PY36 +from pandas.compat import PY2 from pandas import DataFrame, MultiIndex, Series, compat, concat, merge from pandas.core import common as com From 253ed59327eb769d194eba2dc48351650b532bc8 Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Wed, 6 Mar 2019 12:20:13 +0100 Subject: [PATCH 32/44] Fix regex again --- pandas/tests/test_sorting.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pandas/tests/test_sorting.py b/pandas/tests/test_sorting.py index b9019891c180d..c9d70bbbc5757 100644 --- a/pandas/tests/test_sorting.py +++ b/pandas/tests/test_sorting.py @@ -412,7 +412,8 @@ def test_unsortable(self): msg = (r"'(<|>)' not supported between instances of ('" r"datetime\.datetime' and 'int'|'int' and 'datetime\.datetime" r"')|" - r"unorderable types: int\(\) (<|>) datetime\.datetime\(\)") + r"unorderable types: int\(\) < datetime\.datetime\(\)|" + r"unorderable types: datetime\.datetime\(\) < int\(\)") if compat.PY2: # RuntimeWarning: tp_compare didn't return -1 or -2 for exception with warnings.catch_warnings(): From c172aecbedba8f8b58d90ca63aef0b3466b8343c Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Wed, 6 Mar 2019 12:22:30 +0100 Subject: [PATCH 33/44] Fix readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ce22818705865..884ee5c6e9826 100644 --- a/README.md +++ b/README.md @@ -165,7 +165,7 @@ pip install pandas ## Dependencies - [NumPy](https://www.numpy.org): 1.12.0 or higher - [python-dateutil](https://labix.org/python-dateutil): 2.5.0 or higher -- [pytz](https://pythonhosted.org/pytz): 2011k or higher +- [pytz](https://pythonhosted.org/pytz): 2015.4 or higher See the [full installation instructions](https://pandas.pydata.org/pandas-docs/stable/install.html#dependencies) for recommended and optional dependencies. From 09e2f107ef11eaf0cdc1e662995158e7a14e6159 Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Wed, 6 Mar 2019 20:09:32 +0100 Subject: [PATCH 34/44] Better error message regex --- pandas/tests/test_algos.py | 14 ++++++++------ pandas/tests/test_sorting.py | 15 ++++++++------- 2 files changed, 16 insertions(+), 13 deletions(-) diff --git a/pandas/tests/test_algos.py b/pandas/tests/test_algos.py index 5b2e3fadaeade..314f78dda168b 100644 --- a/pandas/tests/test_algos.py +++ b/pandas/tests/test_algos.py @@ -11,8 +11,9 @@ from pandas._libs import ( algos as libalgos, groupby as libgroupby, hashtable as ht) -from pandas.compat import PY2, lrange, range -from pandas.compat.numpy import np_array_datetime64_compat +from pandas.compat import lrange, range +from pandas.compat.numpy import ( + _np_version_under1p14, np_array_datetime64_compat) import pandas.util._test_decorators as td from pandas.core.dtypes.dtypes import CategoricalDtype as CDT @@ -224,14 +225,15 @@ def test_factorize_tuple_list(self, data, expected_label, expected_level): dtype=object) tm.assert_numpy_array_equal(result[1], expected_level_array) - @pytest.mark.skipif(PY2, reason="pytest.raises match regex fails") def test_complex_sorting(self): # gh 12666 - check no segfault x17 = np.array([complex(i) for i in range(17)], dtype=object) - msg = (r"'(<|>)' not supported between instances of 'complex' and" - r" 'complex'|" - r"unorderable types: complex\(\) (<|>) complex\(\)") + msg = (r"unorderable types: {0} [<>] {0}".format(r"complex\(\)") + if _np_version_under1p14 else + r"'[<>]' not supported between instances of {0} and {0}".format( + "'complex'") + ) with pytest.raises(TypeError, match=msg): algos.factorize(x17[::-1], sort=True) diff --git a/pandas/tests/test_sorting.py b/pandas/tests/test_sorting.py index c9d70bbbc5757..e0312a4e26aa1 100644 --- a/pandas/tests/test_sorting.py +++ b/pandas/tests/test_sorting.py @@ -7,7 +7,7 @@ from numpy import nan import pytest -from pandas.compat import PY2 +from pandas.compat.numpy import _np_version_under1p14 from pandas import DataFrame, MultiIndex, Series, compat, concat, merge from pandas.core import common as com @@ -405,15 +405,16 @@ def test_mixed_integer_from_list(self): expected = np.array([0, 0, 1, 'a', 'b', 'b'], dtype=object) tm.assert_numpy_array_equal(result, expected) - @pytest.mark.skipif(PY2, reason="pytest.raises match regex fails") def test_unsortable(self): # GH 13714 arr = np.array([1, 2, datetime.now(), 0, 3], dtype=object) - msg = (r"'(<|>)' not supported between instances of ('" - r"datetime\.datetime' and 'int'|'int' and 'datetime\.datetime" - r"')|" - r"unorderable types: int\(\) < datetime\.datetime\(\)|" - r"unorderable types: datetime\.datetime\(\) < int\(\)") + msg = (r"unorderable types: ({0} [<>] {1}|{1} [<>] {0})".format( + r"int\(\)", r"datetime\.datetime\(\)") # noqa: E126 + if _np_version_under1p14 else + (r"'[<>]' not supported between instances of " + r"({0} and {1}|{1} and {0})").format( + "'int'", r"'datetime\.datetime'") + ) if compat.PY2: # RuntimeWarning: tp_compare didn't return -1 or -2 for exception with warnings.catch_warnings(): From 31dec9841e354b3e175a49a96c6f626391b24f03 Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Wed, 13 Mar 2019 07:57:42 +0100 Subject: [PATCH 35/44] Small fixes --- doc/source/install.rst | 2 +- doc/source/whatsnew/v0.25.0.rst | 6 +++--- setup.py | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/doc/source/install.rst b/doc/source/install.rst index c0a142cd5a6cb..9ecd78c9c19fa 100644 --- a/doc/source/install.rst +++ b/doc/source/install.rst @@ -226,7 +226,7 @@ Dependencies * `setuptools `__: 24.2.0 or higher * `NumPy `__: 1.12.0 or higher * `python-dateutil `__: 2.5.0 or higher -* `pytz `__ +* `pytz `__: 2015.4 or higher .. _install.recommended_dependencies: diff --git a/doc/source/whatsnew/v0.25.0.rst b/doc/source/whatsnew/v0.25.0.rst index 4d49fe1a97595..bfffaceed7ce9 100644 --- a/doc/source/whatsnew/v0.25.0.rst +++ b/doc/source/whatsnew/v0.25.0.rst @@ -70,7 +70,7 @@ Increased minimum versions for dependencies ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Due to dropping support for Python 2.7, a number of optional dependencies have updated minimum versions. -Independently, some minimum supported versions of dependencies were updated (:issue:`23519`). +Independently, some minimum supported versions of dependencies were updated (:issue:`23519`, :issue:`24942`). If installed, we now require: +-----------------+-----------------+----------+ @@ -82,8 +82,6 @@ If installed, we now require: +-----------------+-----------------+----------+ | pymysql | 0.6.6 | | +-----------------+-----------------+----------+ -| pytest (dev) | 4.0.2 | | -+-----------------+-----------------+----------+ | pytz | 2015.4 | | +-----------------+-----------------+----------+ | sqlalchemy | 1.0.8 | | @@ -92,6 +90,8 @@ If installed, we now require: +-----------------+-----------------+----------+ | xlwt | 1.0.0 | | +-----------------+-----------------+----------+ +| pytest (dev) | 4.0.2 | | ++-----------------+-----------------+----------+ .. _whatsnew_0250.api.other: diff --git a/setup.py b/setup.py index a83e07b50ed57..d58d444f9a481 100755 --- a/setup.py +++ b/setup.py @@ -34,7 +34,7 @@ def is_platform_mac(): setuptools_kwargs = { 'install_requires': [ 'python-dateutil >= 2.5.0', - 'pytz >= 2011k', + 'pytz >= 2015.4', 'numpy >= {numpy_ver}'.format(numpy_ver=min_numpy_ver), ], 'setup_requires': ['numpy >= {numpy_ver}'.format(numpy_ver=min_numpy_ver)], From e3ec04e72545434084c7bed5fa596673195d4c21 Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Wed, 13 Mar 2019 07:59:14 +0100 Subject: [PATCH 36/44] Actually commit conflict resolution --- pandas/tests/io/test_sql.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/pandas/tests/io/test_sql.py b/pandas/tests/io/test_sql.py index 202c8efe8c587..7d61454dff02f 100644 --- a/pandas/tests/io/test_sql.py +++ b/pandas/tests/io/test_sql.py @@ -28,11 +28,7 @@ import pytest import pandas.compat as compat -<<<<<<< HEAD -from pandas.compat import PY35, PY36, lrange, range, string_types -======= -from pandas.compat import PY2, PY36, lrange, range, string_types ->>>>>>> upstream/master +from pandas.compat import PY2, PY35, PY36, lrange, range, string_types from pandas.core.dtypes.common import ( is_datetime64_dtype, is_datetime64tz_dtype) From b1e0025d8b096a6fdd290734b94606368f094bcc Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Wed, 13 Mar 2019 19:06:51 +0100 Subject: [PATCH 37/44] Try fix install error --- ci/deps/travis-35.yaml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/ci/deps/travis-35.yaml b/ci/deps/travis-35.yaml index 7e597393f75ba..c67d906b7bb73 100644 --- a/ci/deps/travis-35.yaml +++ b/ci/deps/travis-35.yaml @@ -3,6 +3,7 @@ channels: - defaults - conda-forge dependencies: + - backports.lzma - beautifulsoup4 - bottleneck - cython=0.28.2 @@ -18,6 +19,7 @@ dependencies: - numexpr - numpy=1.13* - openpyxl=2.4.0 + - pathlib - patsy - psycopg2 - py @@ -42,10 +44,14 @@ dependencies: - pytest-mock - hypothesis>=3.58.0 - isort + # satisfy fastparquet deps with conda + - llvmlite + - numba + # satisfy pandas-gbq deps with conda + - protobuf + - thrift - pip: - - backports.lzma + # not available for python 3.5 through conda - fastparquet>=0.2.1 - pandas-gbq - - pathlib - # for python 3.5, pytest>=4.0.2 is not available in conda - pytest>=4.0.2 From aedcdf8069f969464e5837a81f91df082c5a3bab Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Thu, 14 Mar 2019 07:45:18 +0100 Subject: [PATCH 38/44] Update deps of doc-job --- ci/deps/travis-36-doc.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ci/deps/travis-36-doc.yaml b/ci/deps/travis-36-doc.yaml index 6f33bc58a8b21..002d53a270afb 100644 --- a/ci/deps/travis-36-doc.yaml +++ b/ci/deps/travis-36-doc.yaml @@ -15,10 +15,10 @@ dependencies: - ipywidgets - lxml - matplotlib - - nbconvert + - nbconvert>=5.4.1 - nbformat - nbsphinx - - notebook + - notebook>=5.7.5 - numexpr - numpy=1.13* - numpydoc From 93c6be438ad1b13d495459af16066471217ca871 Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Thu, 14 Mar 2019 08:49:27 +0100 Subject: [PATCH 39/44] Trivial diff clean-up to retrigger --- ci/deps/travis-35.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/deps/travis-35.yaml b/ci/deps/travis-35.yaml index c67d906b7bb73..2ce51ec409030 100644 --- a/ci/deps/travis-35.yaml +++ b/ci/deps/travis-35.yaml @@ -14,7 +14,6 @@ dependencies: - lxml - matplotlib=2.2.2 - mock - - moto - nomkl - numexpr - numpy=1.13* @@ -42,6 +41,7 @@ dependencies: # universal - pytest-xdist - pytest-mock + - moto - hypothesis>=3.58.0 - isort # satisfy fastparquet deps with conda From 979341a2d04c3bace47c9dd1f7be21547c32e358 Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Thu, 14 Mar 2019 20:30:40 +0100 Subject: [PATCH 40/44] Review (jreback) --- ci/deps/travis-35.yaml | 9 --------- ci/deps/travis-36-doc.yaml | 2 +- pandas/tests/io/test_excel.py | 4 ++-- pandas/tests/io/test_sql.py | 11 +++++------ 4 files changed, 8 insertions(+), 18 deletions(-) diff --git a/ci/deps/travis-35.yaml b/ci/deps/travis-35.yaml index 2ce51ec409030..8ae0bf6a0449b 100644 --- a/ci/deps/travis-35.yaml +++ b/ci/deps/travis-35.yaml @@ -3,7 +3,6 @@ channels: - defaults - conda-forge dependencies: - - backports.lzma - beautifulsoup4 - bottleneck - cython=0.28.2 @@ -18,7 +17,6 @@ dependencies: - numexpr - numpy=1.13* - openpyxl=2.4.0 - - pathlib - patsy - psycopg2 - py @@ -44,14 +42,7 @@ dependencies: - moto - hypothesis>=3.58.0 - isort - # satisfy fastparquet deps with conda - - llvmlite - - numba - # satisfy pandas-gbq deps with conda - - protobuf - - thrift - pip: # not available for python 3.5 through conda - - fastparquet>=0.2.1 - pandas-gbq - pytest>=4.0.2 diff --git a/ci/deps/travis-36-doc.yaml b/ci/deps/travis-36-doc.yaml index 002d53a270afb..8015f7bdc81c6 100644 --- a/ci/deps/travis-36-doc.yaml +++ b/ci/deps/travis-36-doc.yaml @@ -20,7 +20,7 @@ dependencies: - nbsphinx - notebook>=5.7.5 - numexpr - - numpy=1.13* + - numpy - numpydoc - openpyxl - pandoc diff --git a/pandas/tests/io/test_excel.py b/pandas/tests/io/test_excel.py index f8481fa11a8b4..2de816f41ead5 100644 --- a/pandas/tests/io/test_excel.py +++ b/pandas/tests/io/test_excel.py @@ -10,7 +10,7 @@ from numpy import nan import pytest -from pandas.compat import PY35, PY36, BytesIO, iteritems, map, range, u +from pandas.compat import PY36, BytesIO, iteritems, map, range, u import pandas.util._test_decorators as td import pandas as pd @@ -2182,7 +2182,7 @@ def test_write_cells_merge_styled(self, merge_cells, ext, engine): assert xcell_b1.font == openpyxl_sty_merged assert xcell_a2.font == openpyxl_sty_merged - @pytest.mark.xfail(PY35 and not PY36, reason='only fails on Linux?', + @pytest.mark.xfail(not PY36, reason='only fails on Linux?', strict=False) @pytest.mark.parametrize("mode,expected", [ ('w', ['baz']), ('a', ['foo', 'bar', 'baz'])]) diff --git a/pandas/tests/io/test_sql.py b/pandas/tests/io/test_sql.py index 7d61454dff02f..40a9aa465a32b 100644 --- a/pandas/tests/io/test_sql.py +++ b/pandas/tests/io/test_sql.py @@ -28,7 +28,7 @@ import pytest import pandas.compat as compat -from pandas.compat import PY2, PY35, PY36, lrange, range, string_types +from pandas.compat import PY2, PY36, lrange, range, string_types from pandas.core.dtypes.common import ( is_datetime64_dtype, is_datetime64tz_dtype) @@ -924,7 +924,7 @@ def test_read_sql_delegate(self): iris_frame2 = sql.read_sql('iris', self.conn) tm.assert_frame_equal(iris_frame1, iris_frame2) - @pytest.mark.xfail(PY35 and not PY36, reason='too many warnings?') + @pytest.mark.xfail(not PY36, reason='too many warnings?') def test_not_reflect_all_tables(self): # create invalid table qry = """CREATE TABLE invalid (x INTEGER, y UNKNOWN);""" @@ -941,7 +941,7 @@ def test_not_reflect_all_tables(self): # Verify some things assert len(w) == 0 - @pytest.mark.xfail(PY35 and not PY36, reason='too many warnings?') + @pytest.mark.xfail(not PY36, reason='too many warnings?') def test_warning_case_insensitive_table_name(self): # see gh-7815 # @@ -1775,7 +1775,7 @@ def test_default_date_load(self): # IMPORTANT - sqlite has no native date type, so shouldn't parse, but assert not issubclass(df.DateCol.dtype.type, np.datetime64) - @pytest.mark.xfail(PY35 and not PY36, reason='too many warnings?') + @pytest.mark.xfail(not PY36, reason='too many warnings?') def test_bigint_warning(self): # test no warning for BIGINT (to support int64) is raised (GH7433) df = DataFrame({'a': [1, 2]}, dtype='int64') @@ -1822,8 +1822,7 @@ def test_default_type_conversion(self): # Bool column with NA = int column with NA values => becomes float assert issubclass(df.BoolColWithNull.dtype.type, np.floating) - @pytest.mark.xfail(PY35 and not PY36, reason='unkown; also flaky', - strict=False) + @pytest.mark.xfail(not PY36, reason='unkown; also flaky', strict=False) def test_read_procedure(self): import pymysql # see GH7324. Although it is more an api test, it is added to the From d3a50e0cb25ce98148cfd2e3246c9951aa192aec Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Fri, 15 Mar 2019 00:15:02 +0100 Subject: [PATCH 41/44] Tentatively remove xfails --- pandas/tests/io/test_excel.py | 2 -- pandas/tests/io/test_sql.py | 4 ---- 2 files changed, 6 deletions(-) diff --git a/pandas/tests/io/test_excel.py b/pandas/tests/io/test_excel.py index 2de816f41ead5..04c9c58a326a4 100644 --- a/pandas/tests/io/test_excel.py +++ b/pandas/tests/io/test_excel.py @@ -2182,8 +2182,6 @@ def test_write_cells_merge_styled(self, merge_cells, ext, engine): assert xcell_b1.font == openpyxl_sty_merged assert xcell_a2.font == openpyxl_sty_merged - @pytest.mark.xfail(not PY36, reason='only fails on Linux?', - strict=False) @pytest.mark.parametrize("mode,expected", [ ('w', ['baz']), ('a', ['foo', 'bar', 'baz'])]) def test_write_append_mode(self, merge_cells, ext, engine, mode, expected): diff --git a/pandas/tests/io/test_sql.py b/pandas/tests/io/test_sql.py index 40a9aa465a32b..d51d9418a370b 100644 --- a/pandas/tests/io/test_sql.py +++ b/pandas/tests/io/test_sql.py @@ -924,7 +924,6 @@ def test_read_sql_delegate(self): iris_frame2 = sql.read_sql('iris', self.conn) tm.assert_frame_equal(iris_frame1, iris_frame2) - @pytest.mark.xfail(not PY36, reason='too many warnings?') def test_not_reflect_all_tables(self): # create invalid table qry = """CREATE TABLE invalid (x INTEGER, y UNKNOWN);""" @@ -941,7 +940,6 @@ def test_not_reflect_all_tables(self): # Verify some things assert len(w) == 0 - @pytest.mark.xfail(not PY36, reason='too many warnings?') def test_warning_case_insensitive_table_name(self): # see gh-7815 # @@ -1775,7 +1773,6 @@ def test_default_date_load(self): # IMPORTANT - sqlite has no native date type, so shouldn't parse, but assert not issubclass(df.DateCol.dtype.type, np.datetime64) - @pytest.mark.xfail(not PY36, reason='too many warnings?') def test_bigint_warning(self): # test no warning for BIGINT (to support int64) is raised (GH7433) df = DataFrame({'a': [1, 2]}, dtype='int64') @@ -1822,7 +1819,6 @@ def test_default_type_conversion(self): # Bool column with NA = int column with NA values => becomes float assert issubclass(df.BoolColWithNull.dtype.type, np.floating) - @pytest.mark.xfail(not PY36, reason='unkown; also flaky', strict=False) def test_read_procedure(self): import pymysql # see GH7324. Although it is more an api test, it is added to the From f7492d49da144154e095ae822640a9b22cf86c53 Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Fri, 15 Mar 2019 00:17:46 +0100 Subject: [PATCH 42/44] Tentatively revert regex fixes --- pandas/tests/test_algos.py | 14 ++++++-------- pandas/tests/test_sorting.py | 14 ++++++-------- 2 files changed, 12 insertions(+), 16 deletions(-) diff --git a/pandas/tests/test_algos.py b/pandas/tests/test_algos.py index 44d3d716f21e4..083307371b699 100644 --- a/pandas/tests/test_algos.py +++ b/pandas/tests/test_algos.py @@ -11,9 +11,8 @@ from pandas._libs import ( algos as libalgos, groupby as libgroupby, hashtable as ht) -from pandas.compat import lrange, range -from pandas.compat.numpy import ( - _np_version_under1p14, np_array_datetime64_compat) +from pandas.compat import PY2, lrange, range +from pandas.compat.numpy import np_array_datetime64_compat import pandas.util._test_decorators as td from pandas.core.dtypes.dtypes import CategoricalDtype as CDT @@ -225,15 +224,14 @@ def test_factorize_tuple_list(self, data, expected_label, expected_level): dtype=object) tm.assert_numpy_array_equal(result[1], expected_level_array) + @pytest.mark.skipif(PY2, reason="pytest.raises match regex fails") def test_complex_sorting(self): # gh 12666 - check no segfault x17 = np.array([complex(i) for i in range(17)], dtype=object) - msg = (r"unorderable types: {0} [<>] {0}".format(r"complex\(\)") - if _np_version_under1p14 else - r"'[<>]' not supported between instances of {0} and {0}".format( - "'complex'") - ) + msg = (r"'(<|>)' not supported between instances of 'complex' and" + r" 'complex'|" + r"unorderable types: complex\(\) > complex\(\)") with pytest.raises(TypeError, match=msg): algos.factorize(x17[::-1], sort=True) diff --git a/pandas/tests/test_sorting.py b/pandas/tests/test_sorting.py index 2ee9b065f144f..fa8fbddd59118 100644 --- a/pandas/tests/test_sorting.py +++ b/pandas/tests/test_sorting.py @@ -7,7 +7,7 @@ from numpy import nan import pytest -from pandas.compat.numpy import _np_version_under1p14 +from pandas.compat import PY2 from pandas import ( DataFrame, MultiIndex, Series, compat, concat, merge, to_datetime) @@ -413,16 +413,14 @@ def test_mixed_integer_from_list(self): expected = np.array([0, 0, 1, 'a', 'b', 'b'], dtype=object) tm.assert_numpy_array_equal(result, expected) + @pytest.mark.skipif(PY2, reason="pytest.raises match regex fails") def test_unsortable(self): # GH 13714 arr = np.array([1, 2, datetime.now(), 0, 3], dtype=object) - msg = (r"unorderable types: ({0} [<>] {1}|{1} [<>] {0})".format( - r"int\(\)", r"datetime\.datetime\(\)") # noqa: E126 - if _np_version_under1p14 else - (r"'[<>]' not supported between instances of " - r"({0} and {1}|{1} and {0})").format( - "'int'", r"'datetime\.datetime'") - ) + msg = (r"'(<|>)' not supported between instances of ('" + r"datetime\.datetime' and 'int'|'int' and 'datetime\.datetime" + r"')|" + r"unorderable types: int\(\) > datetime\.datetime\(\)") if compat.PY2: # RuntimeWarning: tp_compare didn't return -1 or -2 for exception with warnings.catch_warnings(): From 2632664b5a0e4e776340ba27e3b35f5036e3a281 Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Fri, 15 Mar 2019 16:16:31 +0100 Subject: [PATCH 43/44] Remove all former PY2 jobs (review jreback) --- .travis.yml | 8 ------ ci/azure/posix.yml | 12 --------- ci/azure/windows.yml | 4 --- ci/deps/azure-35-compat.yaml | 29 --------------------- ci/deps/azure-36-locale.yaml | 29 --------------------- ci/deps/azure-windows-37.yaml | 33 ------------------------ ci/deps/travis-35.yaml | 48 ----------------------------------- 7 files changed, 163 deletions(-) delete mode 100644 ci/deps/azure-35-compat.yaml delete mode 100644 ci/deps/azure-36-locale.yaml delete mode 100644 ci/deps/azure-windows-37.yaml delete mode 100644 ci/deps/travis-35.yaml diff --git a/.travis.yml b/.travis.yml index bb14c941d2bce..f8302f4718ef2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -35,14 +35,6 @@ matrix: env: - JOB="3.7" ENV_FILE="ci/deps/travis-37.yaml" PATTERN="(not slow and not network)" - - dist: trusty - env: - - JOB="3.5" ENV_FILE="ci/deps/travis-35.yaml" PATTERN="(not slow or (single and db))" - addons: - apt: - packages: - - python-gtk2 - - dist: trusty env: - JOB="3.6, locale" ENV_FILE="ci/deps/travis-36-locale.yaml" PATTERN="((not slow and not network) or (single and db))" LOCALE_OVERRIDE="zh_CN.UTF-8" diff --git a/ci/azure/posix.yml b/ci/azure/posix.yml index 7119054cf2f53..65f78c2786927 100644 --- a/ci/azure/posix.yml +++ b/ci/azure/posix.yml @@ -15,18 +15,6 @@ jobs: PATTERN: "not slow and not network" ${{ if eq(parameters.name, 'Linux') }}: - py35_compat: - ENV_FILE: ci/deps/azure-35-compat.yaml - CONDA_PY: "35" - PATTERN: "not slow and not network" - - py36_locale_slow_old_np: - ENV_FILE: ci/deps/azure-36-locale.yaml - CONDA_PY: "36" - PATTERN: "slow" - LOCALE_OVERRIDE: "zh_CN.UTF-8" - EXTRA_APT: "language-pack-zh-hans" - py36_locale_slow: ENV_FILE: ci/deps/azure-36-locale_slow.yaml CONDA_PY: "36" diff --git a/ci/azure/windows.yml b/ci/azure/windows.yml index cd5879bf55e4b..13f2442806422 100644 --- a/ci/azure/windows.yml +++ b/ci/azure/windows.yml @@ -12,10 +12,6 @@ jobs: ENV_FILE: ci/deps/azure-windows-36.yaml CONDA_PY: "36" - py37_np141: - ENV_FILE: ci/deps/azure-windows-37.yaml - CONDA_PY: "37" - steps: - task: CondaEnvironment@1 inputs: diff --git a/ci/deps/azure-35-compat.yaml b/ci/deps/azure-35-compat.yaml deleted file mode 100644 index 05436e79910fb..0000000000000 --- a/ci/deps/azure-35-compat.yaml +++ /dev/null @@ -1,29 +0,0 @@ -name: pandas-dev -channels: - - defaults - - conda-forge -dependencies: - - beautifulsoup4==4.4.1 - - bottleneck=1.2.0 - - cython=0.28.2 - - hypothesis>=3.58.0 - - jinja2=2.8 - - numexpr=2.6.1 - - numpy=1.12.0 - - openpyxl=2.2.6 - - pytables=3.4.2 - - python-dateutil=2.5.0 - - python=3.5* - - pytz=2015.4 - - scipy=0.18.1 - - xlrd=1.0.0 - - xlsxwriter=0.7.7 - - xlwt=1.0.0 - # universal - - pytest-xdist - - pytest-mock - - isort - - pip: - # for python 3.5, pytest>=4.0.2 is not available in conda - - pytest>=4.0.2 - - html5lib==1.0b2 diff --git a/ci/deps/azure-36-locale.yaml b/ci/deps/azure-36-locale.yaml deleted file mode 100644 index c74d56443be5d..0000000000000 --- a/ci/deps/azure-36-locale.yaml +++ /dev/null @@ -1,29 +0,0 @@ -name: pandas-dev -channels: - - defaults - - conda-forge -dependencies: - - beautifulsoup4==4.5.1 - - bottleneck=1.2.0 - - cython=0.28.2 - - lxml - - matplotlib=2.0.0 - - numpy=1.12.0 - - openpyxl=2.4.0 - - python-dateutil - - python-blosc - - python=3.6 - - pytz=2016.10 - - scipy - - sqlalchemy=1.1.4 - - xlrd=1.0.0 - - xlsxwriter=0.9.4 - - xlwt=1.2.0 - # universal - - pytest>=4.0.2 - - pytest-xdist - - pytest-mock - - hypothesis>=3.58.0 - - isort - - pip: - - html5lib==1.0b2 diff --git a/ci/deps/azure-windows-37.yaml b/ci/deps/azure-windows-37.yaml deleted file mode 100644 index 96ddc1d6293d8..0000000000000 --- a/ci/deps/azure-windows-37.yaml +++ /dev/null @@ -1,33 +0,0 @@ -name: pandas-dev -channels: - - defaults - - conda-forge -dependencies: - - beautifulsoup4 - - bottleneck - - gcsfs - - html5lib - - jinja2 - - lxml - - matplotlib=3.0.1 - - numexpr - - numpy=1.14.* - - openpyxl - - pytables - - python=3.7.* - - python-dateutil - - pytz - - s3fs - - scipy - - sqlalchemy - - xlrd - - xlsxwriter - - xlwt - # universal - - cython>=0.28.2 - - pytest>=4.0.2 - - pytest-xdist - - pytest-mock - - moto - - hypothesis>=3.58.0 - - isort diff --git a/ci/deps/travis-35.yaml b/ci/deps/travis-35.yaml deleted file mode 100644 index 8ae0bf6a0449b..0000000000000 --- a/ci/deps/travis-35.yaml +++ /dev/null @@ -1,48 +0,0 @@ -name: pandas-dev -channels: - - defaults - - conda-forge -dependencies: - - beautifulsoup4 - - bottleneck - - cython=0.28.2 - - gcsfs - - html5lib - - ipython - - jinja2=2.8 - - lxml - - matplotlib=2.2.2 - - mock - - nomkl - - numexpr - - numpy=1.13* - - openpyxl=2.4.0 - - patsy - - psycopg2 - - py - - pyarrow=0.9.0 - - PyCrypto - - pymysql=0.6.6 - - pytables - - blosc=1.14.3 - - python-blosc - - python-dateutil=2.5.0 - - python=3.5* - - pytz=2015.4 - - scipy - - sqlalchemy=1.0.8 - - s3fs - - xarray=0.9.6 - - xlrd=1.0.0 - - xlsxwriter=0.7.7 - - xlwt=1.0.0 - # universal - - pytest-xdist - - pytest-mock - - moto - - hypothesis>=3.58.0 - - isort - - pip: - # not available for python 3.5 through conda - - pandas-gbq - - pytest>=4.0.2 From fe83f86b8155764fd041d92fc2585daf323c74a6 Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Fri, 15 Mar 2019 16:17:11 +0100 Subject: [PATCH 44/44] Remove tox.ini --- tox.ini | 54 ------------------------------------------------------ 1 file changed, 54 deletions(-) delete mode 100644 tox.ini diff --git a/tox.ini b/tox.ini deleted file mode 100644 index 78118aa6c68f3..0000000000000 --- a/tox.ini +++ /dev/null @@ -1,54 +0,0 @@ -# Tox (http://tox.testrun.org/) is a tool for running tests -# in multiple virtualenvs. This configuration file will run the -# test suite on all supported python versions. To use it, "pip install tox" -# and then run "tox" from this directory. - -[tox] -envlist = py35, py36, py37 - -[testenv] -deps = - cython - nose - pytest - pytz>=2015.4 - python-dateutil - beautifulsoup4 - lxml - xlsxwriter - xlrd - six - sqlalchemy - moto - -# cd to anything but the default {toxinidir} which -# contains the pandas subdirectory and confuses -# nose away from the fresh install in site-packages -changedir = {envdir} - -commands = - # TODO: --exe because of GH #761 - {envbindir}/pytest pandas {posargs:-A "not network and not disabled"} - # cleanup the temp. build dir created by the tox build -# /bin/rm -rf {toxinidir}/build - - # quietly rollback the install. - # Note this line will only be reached if the - # previous lines succeed (in particular, the tests), - # but an uninstall is really only required when - # files are removed from the source tree, in which case, - # stale versions of files will will remain in the venv - # until the next time uninstall is run. - # - # tox should provide a preinstall-commands hook. - pip uninstall pandas -qy - -[testenv:py35] -deps = - numpy==1.12.0 - {[testenv]deps} - -[testenv:py36] -deps = - numpy - {[testenv]deps}