Skip to content

Commit

Permalink
ARROW-5679: [Python][CI] Remove Python 3.5 support
Browse files Browse the repository at this point in the history
Closes #8776 from pitrou/ARROW-5679-drop-py-35

Authored-by: Antoine Pitrou <antoine@python.org>
Signed-off-by: Uwe L. Korn <uwe.korn@quantco.com>
  • Loading branch information
pitrou authored and xhochy committed Dec 2, 2020
1 parent c080548 commit fd8843d
Show file tree
Hide file tree
Showing 20 changed files with 18 additions and 112 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/archery.yml
Expand Up @@ -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]
Expand Down
7 changes: 0 additions & 7 deletions .github/workflows/python.yml
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions dev/archery/setup.py
Expand Up @@ -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'],
Expand Down
8 changes: 0 additions & 8 deletions dev/release/verify-release-candidate-wheels.bat
Expand Up @@ -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

Expand Down Expand Up @@ -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

Expand Down
62 changes: 0 additions & 62 deletions dev/tasks/tasks.yml
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion docs/source/developers/archery.rst
Expand Up @@ -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.

Expand Down
3 changes: 1 addition & 2 deletions docs/source/python/benchmarks.rst
Expand Up @@ -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/
2 changes: 1 addition & 1 deletion docs/source/python/install.rst
Expand Up @@ -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
-----------
Expand Down
2 changes: 1 addition & 1 deletion python/manylinux1/build_arrow.sh
Expand Up @@ -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})"
Expand Down
2 changes: 1 addition & 1 deletion python/manylinux1/scripts/build_python.sh
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion python/manylinux201x/build_arrow.sh
Expand Up @@ -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})"
Expand Down
4 changes: 0 additions & 4 deletions python/pyarrow/tests/test_fs.py
Expand Up @@ -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__]
Expand Down
6 changes: 1 addition & 5 deletions python/pyarrow/tests/test_ipc.py
Expand Up @@ -17,9 +17,9 @@

from collections import UserList
import io
import pathlib
import pytest
import socket
import sys
import threading
import weakref

Expand Down Expand Up @@ -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()

Expand Down
3 changes: 1 addition & 2 deletions python/pyarrow/tests/test_pandas.py
Expand Up @@ -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():
Expand Down
3 changes: 1 addition & 2 deletions python/pyarrow/tests/test_serialization.py
Expand Up @@ -21,6 +21,7 @@
import collections
import datetime
import os
import pathlib
import pickle
import subprocess
import string
Expand Down Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion python/pyarrow/tests/test_types.py
Expand Up @@ -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):
Expand Down
1 change: 0 additions & 1 deletion 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
6 changes: 2 additions & 4 deletions 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
Expand Down
6 changes: 2 additions & 4 deletions 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
Expand Down
3 changes: 1 addition & 2 deletions python/setup.py
Expand Up @@ -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',
Expand Down

0 comments on commit fd8843d

Please sign in to comment.