You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by uw...@apache.org on 2020/12/02 13:47:06 UTC

[arrow] branch master updated: ARROW-5679: [Python][CI] Remove Python 3.5 support

This is an automated email from the ASF dual-hosted git repository.

uwe pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow.git


The following commit(s) were added to refs/heads/master by this push:
     new fd8843d  ARROW-5679: [Python][CI] Remove Python 3.5 support
fd8843d is described below

commit fd8843dd6573fafc7babb84c53e9ee7accbb2724
Author: Antoine Pitrou <an...@python.org>
AuthorDate: Wed Dec 2 14:45:49 2020 +0100

    ARROW-5679: [Python][CI] Remove Python 3.5 support
    
    Closes #8776 from pitrou/ARROW-5679-drop-py-35
    
    Authored-by: Antoine Pitrou <an...@python.org>
    Signed-off-by: Uwe L. Korn <uw...@quantco.com>
---
 .github/workflows/archery.yml                   |  2 +-
 .github/workflows/python.yml                    |  7 ---
 dev/archery/setup.py                            |  4 +-
 dev/release/verify-release-candidate-wheels.bat |  8 ----
 dev/tasks/tasks.yml                             | 62 -------------------------
 docs/source/developers/archery.rst              |  2 +-
 docs/source/python/benchmarks.rst               |  3 +-
 docs/source/python/install.rst                  |  2 +-
 python/manylinux1/build_arrow.sh                |  2 +-
 python/manylinux1/scripts/build_python.sh       |  2 +-
 python/manylinux201x/build_arrow.sh             |  2 +-
 python/pyarrow/tests/test_fs.py                 |  4 --
 python/pyarrow/tests/test_ipc.py                |  6 +--
 python/pyarrow/tests/test_pandas.py             |  3 +-
 python/pyarrow/tests/test_serialization.py      |  3 +-
 python/pyarrow/tests/test_types.py              |  2 +-
 python/requirements-build.txt                   |  1 -
 python/requirements-test.txt                    |  6 +--
 python/requirements-wheel-test.txt              |  6 +--
 python/setup.py                                 |  3 +-
 20 files changed, 18 insertions(+), 112 deletions(-)

diff --git a/.github/workflows/archery.yml b/.github/workflows/archery.yml
index b230bce..7dd75b5 100644
--- a/.github/workflows/archery.yml
+++ b/.github/workflows/archery.yml
@@ -51,7 +51,7 @@ jobs:
       - name: Setup Python
         uses: actions/setup-python@v1
         with:
-          python-version: '3.5'
+          python-version: '3.6'
       - name: Install Archery, Crossbow- and Test Dependencies
         working-directory: dev/archery
         run: pip install pytest responses toolz jinja2 -e .[all]
diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml
index 6b84ed2..02829eb 100644
--- a/.github/workflows/python.yml
+++ b/.github/workflows/python.yml
@@ -47,18 +47,11 @@ jobs:
       fail-fast: false
       matrix:
         name:
-          - ubuntu-16.04-python-3
           - conda-python-3.8-nopandas
           - conda-python-3.6-pandas-0.23
           - conda-python-3.7-pandas-latest
           - centos-python-3.6-manylinux1
         include:
-          - name: ubuntu-16.04-python-3
-            cache: ubuntu-16.04-python-3
-            image: ubuntu-python
-            # this image always builds with python 3.5
-            title: AMD64 Ubuntu 16.04 Python 3.5
-            ubuntu: 16.04
           - name: conda-python-3.8-nopandas
             cache: conda-python-3.8
             image: conda-python
diff --git a/dev/archery/setup.py b/dev/archery/setup.py
index 8823ace..27d7d4d 100755
--- a/dev/archery/setup.py
+++ b/dev/archery/setup.py
@@ -21,8 +21,8 @@ import operator
 import sys
 from setuptools import setup
 
-if sys.version_info < (3, 5):
-    sys.exit('Python < 3.5 is not supported')
+if sys.version_info < (3, 6):
+    sys.exit('Python < 3.6 is not supported')
 
 extras = {
     'benchmark': ['pandas'],
diff --git a/dev/release/verify-release-candidate-wheels.bat b/dev/release/verify-release-candidate-wheels.bat
index daf8487..2b57113 100644
--- a/dev/release/verify-release-candidate-wheels.bat
+++ b/dev/release/verify-release-candidate-wheels.bat
@@ -49,9 +49,6 @@ call deactivate
 
 set ARROW_TEST_DATA=%cd%\arrow\testing\data
 
-CALL :verify_wheel 3.5 %1 %2 m
-if errorlevel 1 GOTO error
-
 CALL :verify_wheel 3.6 %1 %2 m
 if errorlevel 1 GOTO error
 
@@ -100,11 +97,6 @@ py.test %CONDA_ENV_PATH%\Lib\site-packages\pyarrow --pdb -v || EXIT /B 1
 
 python -c "import pyarrow" || EXIT /B 1
 python -c "import pyarrow.parquet" || EXIT /B 1
-
-if "%PY_VERSION%"=="3.5" GOTO done
-
-:python36_and_higher_checks
-
 python -c "import pyarrow.flight" || EXIT /B 1
 python -c "import pyarrow.dataset" || EXIT /B 1
 
diff --git a/dev/tasks/tasks.yml b/dev/tasks/tasks.yml
index c5a6948..b955948 100644
--- a/dev/tasks/tasks.yml
+++ b/dev/tasks/tasks.yml
@@ -296,20 +296,6 @@ tasks:
 
   ############################## Wheel Linux ##################################
 
-  wheel-manylinux1-cp35m:
-    ci: azure
-    template: python-wheels/azure.linux.yml
-    params:
-      python_version: 3.5
-      unicode_width: 16
-      wheel_tag: manylinux1
-      wheel_dir: manylinux1
-      test_docker_images:
-        - python:3.5
-      test_remove_system_libs: true
-    artifacts:
-      - pyarrow-{no_rc_version}-cp35-cp35m-manylinux1_x86_64.whl
-
   wheel-manylinux1-cp36m:
     ci: azure
     template: python-wheels/azure.linux.yml
@@ -352,20 +338,6 @@ tasks:
     artifacts:
       - pyarrow-{no_rc_version}-cp38-cp38-manylinux1_x86_64.whl
 
-  wheel-manylinux2010-cp35m:
-    ci: azure
-    template: python-wheels/azure.linux.yml
-    params:
-      python_version: 3.5
-      unicode_width: 16
-      wheel_tag: manylinux2010
-      wheel_dir: manylinux201x
-      test_docker_images:
-        - python:3.5
-      test_remove_system_libs: true
-    artifacts:
-      - pyarrow-{no_rc_version}-cp35-cp35m-manylinux2010_x86_64.whl
-
   wheel-manylinux2010-cp36m:
     ci: azure
     template: python-wheels/azure.linux.yml
@@ -408,20 +380,6 @@ tasks:
     artifacts:
       - pyarrow-{no_rc_version}-cp38-cp38-manylinux2010_x86_64.whl
 
-  wheel-manylinux2014-cp35m:
-    ci: azure
-    template: python-wheels/azure.linux.yml
-    params:
-      python_version: 3.5
-      unicode_width: 16
-      wheel_tag: manylinux2014
-      wheel_dir: manylinux201x
-      test_docker_images:
-        - python:3.5
-      test_remove_system_libs: true
-    artifacts:
-      - pyarrow-{no_rc_version}-cp35-cp35m-manylinux2014_x86_64.whl
-
   wheel-manylinux2014-cp36m:
     ci: azure
     template: python-wheels/azure.linux.yml
@@ -466,16 +424,6 @@ tasks:
 
   ############################## Wheel OSX ####################################
 
-  wheel-osx-mavericks-cp35m:
-    ci: travis
-    template: python-wheels/travis.osx.yml
-    params:
-      python_version: 3.5
-      macos_deployment_target: 10.9
-      arrow_s3: "OFF"
-    artifacts:
-      - pyarrow-{no_rc_version}-cp35-cp35m-macosx_10_9_intel.whl
-
   wheel-osx-mavericks-cp36m:
     ci: travis
     template: python-wheels/travis.osx.yml
@@ -508,16 +456,6 @@ tasks:
 
   # enable S3 support from macOS 10.13 so we don't need to bundle curl, crypt and ssl
 
-  wheel-osx-high-sierra-cp35m:
-    ci: travis
-    template: python-wheels/travis.osx.yml
-    params:
-      python_version: 3.5
-      macos_deployment_target: 10.13
-      arrow_s3: "ON"
-    artifacts:
-      - pyarrow-{no_rc_version}-cp35-cp35m-macosx_10_13_intel.whl
-
   wheel-osx-high-sierra-cp36m:
     ci: travis
     template: python-wheels/travis.osx.yml
diff --git a/docs/source/developers/archery.rst b/docs/source/developers/archery.rst
index 7508ba1..c5a508d 100644
--- a/docs/source/developers/archery.rst
+++ b/docs/source/developers/archery.rst
@@ -26,7 +26,7 @@ utility called Archery.
 Installation
 ------------
 
-Archery requires Python 3.5 or later. It is recommended to install archery in
+Archery requires Python 3.6 or later. It is recommended to install archery in
 *editable* mode with the ``-e`` flag to automatically update the installation
 when pulling the Arrow repository.
 
diff --git a/docs/source/python/benchmarks.rst b/docs/source/python/benchmarks.rst
index 989074a..aee83b7 100644
--- a/docs/source/python/benchmarks.rst
+++ b/docs/source/python/benchmarks.rst
@@ -51,7 +51,6 @@ to be rebuilt for each Git revision you're running the benchmarks for.
 Compatibility
 -------------
 
-We only expect the benchmarking setup to work with Python 3.6 or later,
-on a Unix-like system with bash.
+We only expect the benchmarking setup to work on a Unix-like system with bash.
 
 .. _asv: https://asv.readthedocs.org/
diff --git a/docs/source/python/install.rst b/docs/source/python/install.rst
index e577825..b449d6a 100644
--- a/docs/source/python/install.rst
+++ b/docs/source/python/install.rst
@@ -28,7 +28,7 @@ using a 64-bit system.
 Python Compatibility
 --------------------
 
-PyArrow is currently compatible with Python 3.5, 3.6, 3.7 and 3.8.
+PyArrow is currently compatible with Python 3.6, 3.7 and 3.8.
 
 Using Conda
 -----------
diff --git a/python/manylinux1/build_arrow.sh b/python/manylinux1/build_arrow.sh
index ab67fce..8e9d300 100755
--- a/python/manylinux1/build_arrow.sh
+++ b/python/manylinux1/build_arrow.sh
@@ -62,7 +62,7 @@ export PYARROW_CMAKE_OPTIONS='-DTHRIFT_HOME=/usr -DBoost_NAMESPACE=arrow_boost -
 mkdir -p /io/dist
 
 # Must pass PYTHON_VERSION env variable
-# possible values are: 3.5 3.6 3.7 3.8
+# possible values are: 3.6 3.7 3.8
 
 UNICODE_WIDTH=32  # Dummy value, irrelevant for Python 3
 CPYTHON_PATH="$(cpython_path ${PYTHON_VERSION} ${UNICODE_WIDTH})"
diff --git a/python/manylinux1/scripts/build_python.sh b/python/manylinux1/scripts/build_python.sh
index 23a7ffe..a8063b9 100755
--- a/python/manylinux1/scripts/build_python.sh
+++ b/python/manylinux1/scripts/build_python.sh
@@ -25,7 +25,7 @@
 # (https://github.com/pypa/manylinux/).
 
 PYTHON_DOWNLOAD_URL=https://www.python.org/ftp/python
-CPYTHON_VERSIONS="3.5.6 3.6.8 3.7.2"
+CPYTHON_VERSIONS="3.6.8 3.7.2"
 
 # openssl version to build, with expected sha256 hash of .tar.gz
 # archive.
diff --git a/python/manylinux201x/build_arrow.sh b/python/manylinux201x/build_arrow.sh
index 3913b46..1f546b7 100755
--- a/python/manylinux201x/build_arrow.sh
+++ b/python/manylinux201x/build_arrow.sh
@@ -62,7 +62,7 @@ export PKG_CONFIG_PATH=/usr/lib/pkgconfig:/arrow-dist/lib/pkgconfig
 mkdir -p /io/dist
 
 # Must pass PYTHON_VERSION env variable
-# possible values are: 3.5 3.6 3.7 3.8
+# possible values are: 3.6 3.7 3.8
 
 UNICODE_WIDTH=32  # Dummy value, irrelevant for Python 3
 CPYTHON_PATH="$(cpython_path ${PYTHON_VERSION} ${UNICODE_WIDTH})"
diff --git a/python/pyarrow/tests/test_fs.py b/python/pyarrow/tests/test_fs.py
index 97e3cff..02c4331 100644
--- a/python/pyarrow/tests/test_fs.py
+++ b/python/pyarrow/tests/test_fs.py
@@ -1125,10 +1125,6 @@ def test_filesystem_from_uri(uri, expected_klass, expected_path):
     assert path == expected_path
 
 
-@pytest.mark.skipif(
-    sys.version_info < (3, 6),
-    reason="python 3.5 Path.resolve() checks that the path exists"
-)
 @pytest.mark.parametrize(
     'path',
     ['', '/', 'foo/bar', '/foo/bar', __file__]
diff --git a/python/pyarrow/tests/test_ipc.py b/python/pyarrow/tests/test_ipc.py
index 62bb1e7..ef4b1d4 100644
--- a/python/pyarrow/tests/test_ipc.py
+++ b/python/pyarrow/tests/test_ipc.py
@@ -17,9 +17,9 @@
 
 from collections import UserList
 import io
+import pathlib
 import pytest
 import socket
-import sys
 import threading
 import weakref
 
@@ -198,11 +198,7 @@ def test_file_read_pandas(file_fixture):
     assert_frame_equal(result, expected)
 
 
-@pytest.mark.skipif(sys.version_info < (3, 6),
-                    reason="need Python 3.6")
 def test_file_pathlib(file_fixture, tmpdir):
-    import pathlib
-
     _, batches = file_fixture.write_batches()
     source = file_fixture.get_source()
 
diff --git a/python/pyarrow/tests/test_pandas.py b/python/pyarrow/tests/test_pandas.py
index 1b75892..953a567 100644
--- a/python/pyarrow/tests/test_pandas.py
+++ b/python/pyarrow/tests/test_pandas.py
@@ -4220,8 +4220,7 @@ def test_metadata_compat_missing_field_name():
 
         )})
     result = table.to_pandas()
-    # on python 3.5 the column order can differ -> adding check_like=True
-    tm.assert_frame_equal(result, expected, check_like=True)
+    tm.assert_frame_equal(result, expected)
 
 
 def test_metadata_index_name_not_json_serializable():
diff --git a/python/pyarrow/tests/test_serialization.py b/python/pyarrow/tests/test_serialization.py
index 456f42c..17d6932 100644
--- a/python/pyarrow/tests/test_serialization.py
+++ b/python/pyarrow/tests/test_serialization.py
@@ -21,6 +21,7 @@ import pytest
 import collections
 import datetime
 import os
+import pathlib
 import pickle
 import subprocess
 import string
@@ -1142,10 +1143,8 @@ def test_set_pickle():
     assert deserialized == b'custom serialization 2'
 
 
-@pytest.mark.skipif(sys.version_info < (3, 6), reason="need Python 3.6")
 def test_path_objects(tmpdir):
     # Test compatibility with PEP 519 path-like objects
-    import pathlib
     p = pathlib.Path(tmpdir) / 'zzz.bin'
     obj = 1234
     pa.serialize_to(obj, p)
diff --git a/python/pyarrow/tests/test_types.py b/python/pyarrow/tests/test_types.py
index e5c1141..875789b 100644
--- a/python/pyarrow/tests/test_types.py
+++ b/python/pyarrow/tests/test_types.py
@@ -277,7 +277,7 @@ def test_is_primitive():
     # name from the tzinfo.zone attribute
     (pytz.timezone('Etc/GMT-9'), 'Etc/GMT-9'),
     (pytz.FixedOffset(180), '+03:00'),
-    (datetime.timezone.utc, 'UTC' if sys.version_info >= (3, 6) else '+00:00'),
+    (datetime.timezone.utc, 'UTC'),
     (datetime.timezone(datetime.timedelta(hours=1, minutes=30)), '+01:30')
 ])
 def test_tzinfo_to_string(tz, expected):
diff --git a/python/requirements-build.txt b/python/requirements-build.txt
index d3e96de..e969604 100644
--- a/python/requirements-build.txt
+++ b/python/requirements-build.txt
@@ -1,5 +1,4 @@
 cython>=0.29
-numpy>=1.14,<1.19; python_version < "3.6"
 numpy>=1.14; python_version >= "3.6"
 setuptools; python_version >= "3.6"
 setuptools_scm
diff --git a/python/requirements-test.txt b/python/requirements-test.txt
index c48390e..734db65 100644
--- a/python/requirements-test.txt
+++ b/python/requirements-test.txt
@@ -1,8 +1,6 @@
 cffi
-hypothesis==5.0; python_version <= "3.5.2"
-hypothesis; python_version > "3.5.2"
-pandas==0.24; python_version <= "3.5.2"
-pandas; python_version > "3.5.2"
+hypothesis
+pandas
 pickle5; python_version == "3.6" or python_version == "3.7"
 pytest
 pytest-lazy-fixture
diff --git a/python/requirements-wheel-test.txt b/python/requirements-wheel-test.txt
index 07a4946..f6626c1 100644
--- a/python/requirements-wheel-test.txt
+++ b/python/requirements-wheel-test.txt
@@ -1,11 +1,9 @@
 cffi
 cython
-hypothesis==5.0; python_version <= "3.5.2"
-hypothesis; python_version > "3.5.2"
+hypothesis
 numpy==1.14.5; python_version < "3.8"
 numpy==1.17.3; python_version >= "3.8"
-pandas==0.24; python_version <= "3.5.2"
-pandas<1.1.0; python_version > "3.5.2" and python_version < "3.8"
+pandas<1.1.0; python_version < "3.8"
 pandas; python_version >= "3.8"
 pickle5; python_version == "3.6" or python_version == "3.7"
 pytest
diff --git a/python/setup.py b/python/setup.py
index d803f76..e0a216a 100755
--- a/python/setup.py
+++ b/python/setup.py
@@ -618,13 +618,12 @@ setup(
     setup_requires=['setuptools_scm', 'cython >= 0.29'] + setup_requires,
     install_requires=install_requires,
     tests_require=['pytest', 'pandas', 'hypothesis'],
-    python_requires='>=3.5',
+    python_requires='>=3.6',
     description='Python library for Apache Arrow',
     long_description=long_description,
     long_description_content_type='text/markdown',
     classifiers=[
         'License :: OSI Approved :: Apache Software License',
-        'Programming Language :: Python :: 3.5',
         'Programming Language :: Python :: 3.6',
         'Programming Language :: Python :: 3.7',
         'Programming Language :: Python :: 3.8',