Skip to content

Commit

Permalink
BREAKING: Drop official support for Python 2.7 (#383)
Browse files Browse the repository at this point in the history
Retain backwards compatibility using the python_requires flag.
  • Loading branch information
william-silversmith authored Aug 13, 2020
1 parent 7458787 commit 5888518
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 22 deletions.
25 changes: 9 additions & 16 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,24 @@
language: python
python:
- '2.7'
- '3.5'
- '3.6'
- '3.7-dev'
- '3.8-dev'
- '3.7'
- '3.8'
before_install:
- PYTHON_MAJOR_VERSION=`echo $TRAVIS_PYTHON_VERSION | head -c 1`
- if [[ $PYTHON_MAJOR_VERSION == 3 ]]; then sudo apt-get install python3-pip; fi
- sudo apt-get install python3-pip
- mkdir -p ~/.cloudvolume/secrets/
- echo $AWS_SECRET > ~/.cloudvolume/secrets/aws-secret.json
- echo $GOOGLE_SECRET > ~/.cloudvolume/secrets/google-secret.json
- echo $BOSS_SECRET > ~/.cloudvolume/secrets/boss-secret.json
install:
- if [[ $PYTHON_MAJOR_VERSION == 2 ]]; then virtualenv venv; fi
- if [[ $PYTHON_MAJOR_VERSION == 3 ]]; then virtualenv -p python3 venv; fi
- virtualenv -p python3 venv
- source venv/bin/activate
- if [[ $PYTHON_MAJOR_VERSION == 2 ]]; then pip install numpy; fi
- if [[ $PYTHON_MAJOR_VERSION == 3 ]]; then pip3 install numpy; fi
- if [[ $PYTHON_MAJOR_VERSION == 2 ]]; then pip install fpzip; fi
- if [[ $PYTHON_MAJOR_VERSION == 3 ]]; then pip3 install fpzip; fi
- if [[ $PYTHON_MAJOR_VERSION == 2 ]]; then pip install -e .[test,dask]; fi
- if [[ $PYTHON_MAJOR_VERSION == 3 ]]; then pip3 install -e .[test,dask]; fi
- if [[ $PYTHON_MAJOR_VERSION == 2 ]]; then python setup.py sdist; fi
- if [[ $PYTHON_MAJOR_VERSION == 3 ]]; then python3 setup.py sdist bdist_wheel --universal; fi
- pip3 install numpy
- pip3 install fpzip
- pip3 install -e .[test,dask]
- python3 setup.py sdist bdist_wheel --universal
script:
- if [[ $PYTHON_MAJOR_VERSION == 2 ]]; then python -m pytest -v -x test --cov=./; fi
- if [[ $PYTHON_MAJOR_VERSION == 3 ]]; then python3 -m pytest -v -x test --cov=./; fi
- python3 -m pytest -v -x test --cov=./
after_success:
- codecov --token=$CODECOV_TOKEN
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,7 @@ You can find a collection of CloudVolume accessible and Neuroglancer viewable da

## Setup

Cloud-volume is regularly tested on Ubuntu with Python 2.7, 3.5, 3.6, 3.7, and 3.8 (we've noticed it's faster on Python 3). We officially support Linux and Mac OS. Windows is community supported. After installation, you'll also need to set up your cloud credentials if you're planning on writing files or reading from a private dataset. Once you're finished setting up, you can try [reading from a public dataset](https://github.com/seung-lab/cloud-volume/wiki/Reading-Public-Data-Examples).

Note that Python 2.7 does not currently support the DracoPy library, and therefore does not support the `graphene://` format.
Cloud-volume is regularly tested on Ubuntu with 3.5, 3.6, 3.7, and 3.8. We officially support Linux and Mac OS. Windows is community supported. After installation, you'll also need to set up your cloud credentials if you're planning on writing files or reading from a private dataset. Once you're finished setting up, you can try [reading from a public dataset](https://github.com/seung-lab/cloud-volume/wiki/Reading-Public-Data-Examples).

#### `pip` Binary Installation

Expand Down Expand Up @@ -532,7 +530,7 @@ pip install vtk matplotlib

## Python 2.7 End of Life

Python 2.7's [End of Life date](https://pythonclock.org/) is January, 1 2020. CloudVolume will support Python 2.7 up to that point and possibly a few months after. Numpy will be dropping support on January 1. We may accelerate the deprecation schedule if substantial technical problems arise with supporting Python 2.7, but so far the impact has been mostly limited.
Python 2.7 is no longer supported by CloudVolume. Updated versions of `pip` will download the last supported release 1.21.1. You can read more on the policy page: https://github.com/seung-lab/cloud-volume/wiki/Policy#python-27-end-of-life

## Related Projects

Expand Down
3 changes: 1 addition & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ def requirements():
'numpy<1.17; python_version<"3.5"',
'numpy; python_version>="3.5"',
],
python_requires="~=3.4", # >= 3.4 < 4.0
install_requires=requirements(),
# Environment Marker Examples:
# https://www.python.org/dev/peps/pep-0496/
Expand Down Expand Up @@ -58,8 +59,6 @@ def requirements():
"Development Status :: 5 - Production/Stable",
"License :: OSI Approved :: BSD License",
"Programming Language :: Python",
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
Expand Down

0 comments on commit 5888518

Please sign in to comment.