diff options
author | Joris Roovers <jroovers@cisco.com> | 2019-03-13 13:33:13 +0100 |
---|---|---|
committer | Joris Roovers <jroovers@cisco.com> | 2019-03-13 13:33:13 +0100 |
commit | 948fc65453b5655a0d8ebb6cf5aeaaf0308654ec (patch) | |
tree | 95fac24661416a857f84dfd78fe639650d42c288 | |
parent | ea79d9ed52cee03205d27e151b6ea4fbfc210879 (diff) |
Officially drop support for Python 2.6
Python 2.6 specific dependencies and code workarounds will be removed in
the future. For now we're just going to stop testing against Python 2.6 and no
longer advertising we're supporting it.
-rw-r--r-- | .travis.yml | 2 | ||||
-rw-r--r-- | Vagrantfile | 2 | ||||
-rw-r--r-- | docs/contributing.md | 4 | ||||
-rw-r--r-- | docs/index.md | 2 | ||||
-rwxr-xr-x | run_tests.sh | 19 | ||||
-rw-r--r-- | setup.py | 5 |
6 files changed, 9 insertions, 25 deletions
diff --git a/.travis.yml b/.travis.yml index 261bda0..772c31a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,8 +3,6 @@ matrix: allow_failures: - os: osx include: - - python: "2.6" - os: linux - python: "2.7" os: linux - python: "3.3" diff --git a/Vagrantfile b/Vagrantfile index 08913d5..649567f 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -7,7 +7,7 @@ INSTALL_DEPS=<<EOF cd /vagrant sudo add-apt-repository -y ppa:deadsnakes/ppa sudo apt-get update -sudo apt-get install -y --allow-unauthenticated python2.6-dev python2.7-dev python3.3-dev python3.4-dev python3.5-dev python3.6-dev python3.7-dev +sudo apt-get install -y --allow-unauthenticated python2.7-dev python3.3-dev python3.4-dev python3.5-dev python3.6-dev python3.7-dev sudo apt-get install -y python-virtualenv git ipython python-pip python3-pip silversearcher-ag sudo apt-get purge -y python3-virtualenv sudo pip3 install virtualenv diff --git a/docs/contributing.md b/docs/contributing.md index 973092a..a412ac0 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -51,10 +51,10 @@ To run tests: ./run_tests.sh --all # Run unit, integration, pep8 and gitlint checks ``` -The ```Vagrantfile``` comes with ```virtualenv```s for python 2.6, 2.7, 3.3, 3.4, 3.5, 3.6 and pypy2. +The ```Vagrantfile``` comes with ```virtualenv```s for python 2.7, 3.3, 3.4, 3.5, 3.6, 3.7 and pypy2. You can easily run tests against specific python environments by using the following commands *inside* of the Vagrant VM: ``` -./run_tests.sh --envs 26 # Run the unit tests against Python 2.6 +./run_tests.sh --envs 27 # Run the unit tests against Python 2.7 ./run_tests.sh --envs 27,33,pypy2 # Run the unit tests against Python 2.7, Python 3.3 and Pypy2 ./run_tests.sh --envs 27,33 --pep8 # Run pep8 checks against Python 2.7 and Python 3.3 (also works for ```--git```, ```--integration```, ```--pep8```, ```--stats``` and ```--lint```). ./run_tests.sh --envs all --all # Run all tests against all environments diff --git a/docs/index.md b/docs/index.md index 65a73dc..36f39e0 100644 --- a/docs/index.md +++ b/docs/index.md @@ -24,7 +24,7 @@ Great for use as a [commit-msg git hook](#using-gitlint-as-a-commit-msg-hook) or useful throughout the years. - **Easily configurable:** Gitlint has sane defaults, but [you can also easily customize it to your own liking](configuration.md). - **User-defined Rules:** Want to do more then what gitlint offers out of the box? Write your own [user defined rules](user_defined_rules.md). - - **Broad python version support:** Gitlint supports python versions 2.6, 2.7, 3.3+ and PyPy2. + - **Broad python version support:** Gitlint supports python versions 2.7, 3.3+ and PyPy2. - **Full unicode support:** Lint your Russian, Chinese or Emoji commit messages with ease! - **Production-ready:** Gitlint checks a lot of the boxes you're looking for: high unit test coverage, integration tests, python code standards (pep8, pylint), good documentation, proven track record. diff --git a/run_tests.sh b/run_tests.sh index 0c52a09..f8bb6b1 100755 --- a/run_tests.sh +++ b/run_tests.sh @@ -13,7 +13,7 @@ help(){ echo " -b, --build Run build tests" echo " -a, --all Run all tests and checks (unit, integration, pep8, git)" echo " -e, --envs [ENV1],[ENV2] Run tests against specified python environments" - echo " (envs: 26,27,33,34,35,36,37,pypy2)." + echo " (envs: 27,33,34,35,36,37,pypy2)." echo " Also works for integration, pep8 and lint tests." echo " --all-env Run all tests against all python environments" echo " --install Install virtualenvs for the --envs specified" @@ -173,18 +173,6 @@ run_build_test(){ # Cleanup :-) rm -rf "$temp_dir" - # Check for deprecation message in python 2.6 - if [[ $(python --version 2>&1) == 'Python 2.6'* ]]; then - echo -n "[Python 2.6] Checking for deprecation warning..." - echo "$output" | grep "A future version of gitlint will drop support for Python 2.6" > /dev/null - exit_code=$((exit_code + $?)) - if [ $exit_code -gt 0 ]; then - echo -e "${RED}FAIL${NO_COLOR}" - else - echo -e "${GREEN}SUCCESS${NO_COLOR}" - fi - fi - # Print success/no success if [ $exit_code -gt 0 ]; then echo -e "Building package...${RED}FAIL${NO_COLOR}" @@ -279,7 +267,6 @@ install_virtualenv(){ deactivate 2> /dev/null # deactivate any active environment virtualenv -p "$python_binary" "$venv_name" source "${venv_name}/bin/activate" - # easy_install -U pip # Commenting out for now, since this gives issues with python 2.6 pip install --ignore-requires-python -r requirements.txt pip install --ignore-requires-python -r test-requirements.txt deactivate 2> /dev/null @@ -287,7 +274,7 @@ install_virtualenv(){ assert_specific_env(){ if [ -z "$1" ] || [ "$1" == "default" ]; then - fatal "ERROR: Please specify one or more valid python environments using --envs: 26,27,33,34,35,36,37,pypy2" + fatal "ERROR: Please specify one or more valid python environments using --envs: 27,33,34,35,36,37,pypy2" exit 1 fi } @@ -355,7 +342,7 @@ exit_code=0 # If the users specified 'all', then just replace $envs with the list of all envs if [ "$envs" == "all" ]; then - envs="26,27,33,34,35,36,37,pypy2" + envs="27,33,34,35,36,37,pypy2" fi envs=$(echo "$envs" | tr ',' '\n') # Split the env list on comma so we can loop through it @@ -50,7 +50,6 @@ setup( "Development Status :: 5 - Production/Stable", "Operating System :: OS Independent", "Programming Language :: Python", - "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", @@ -95,6 +94,6 @@ setup( # Print a red deprecation warning for python 2.6 users if sys.version_info[0] == 2 and sys.version_info[1] <= 6: - msg = "\033[31mDEPRECATION: Python 2.6 is no longer supported by the Python core team, please upgrade your Python. " + \ - "A future version of gitlint will drop support for Python 2.6\033[0m" + msg = "\033[31mDEPRECATION: Python 2.6 or below are no longer supported by gitlint or the Python core team." + \ + "Please upgrade your Python to a later version.\033[0m" print(msg) |