diff --git a/.github/workflows/archery.yml b/.github/workflows/archery.yml index b230bce82e1ec..7dd75b5bfe482 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 6b84ed2cdb8a7..02829ebb39112 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 8823ace45cadc..27d7d4db43666 100755 --- a/dev/archery/setup.py +++ b/dev/archery/setup.py @@ -21,8 +21,8 @@ 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 daf8487605674..2b57113a1bf78 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 c5a6948bb1a41..b9559483256bb 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 7508ba1bf079f..c5a508d6fd0fe 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 989074ae361ef..aee83b7784e39 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 e577825415837..b449d6a88cb04 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 ab67fced5730d..8e9d3002a3144 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 23a7ffee46546..a8063b9c01d18 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 3913b46b68023..1f546b73c7999 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 97e3cffee2fd6..02c43316332cf 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 62bb1e708a59c..ef4b1d422a7a7 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 1b75892e0b759..953a567a262d8 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 456f42c92fa69..17d693227d14f 100644 --- a/python/pyarrow/tests/test_serialization.py +++ b/python/pyarrow/tests/test_serialization.py @@ -21,6 +21,7 @@ import collections import datetime import os +import pathlib import pickle import subprocess import string @@ -1142,10 +1143,8 @@ def loads2(serialized_obj): 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 e5c11415c05a4..875789b999891 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 d3e96de458e94..e969604ee0178 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 c48390e0ca57c..734db65122c61 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 07a494654cfed..f6626c13082a8 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 d803f7684d5a2..e0a216a7f8668 100755 --- a/python/setup.py +++ b/python/setup.py @@ -618,13 +618,12 @@ def has_ext_modules(foo): 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',