From 45d1cd59d39227ee6841042eab85116a59a26d22 Mon Sep 17 00:00:00 2001 From: Bert Wesarg Date: Thu, 11 Mar 2021 16:35:24 +0100 Subject: [PATCH] Remove support for Python 3.5 --- .appveyor.yml | 29 ++--------------------------- .github/workflows/pythonpackage.yml | 4 ++-- .travis.yml | 4 +--- README.md | 2 +- doc/source/intro.rst | 2 +- git/cmd.py | 9 --------- setup.py | 4 ++-- 7 files changed, 9 insertions(+), 45 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index 0a86c1a75..833f5c7b9 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -6,29 +6,12 @@ environment: CYGWIN64_GIT_PATH: "C:\\cygwin64\\bin;%GIT_DAEMON_PATH%" matrix: - - PYTHON: "C:\\Python34-x64" - PYTHON_VERSION: "3.4" - GIT_PATH: "%GIT_DAEMON_PATH%" - - PYTHON: "C:\\Python35-x64" - PYTHON_VERSION: "3.5" - GIT_PATH: "%GIT_DAEMON_PATH%" - PYTHON: "C:\\Python36-x64" PYTHON_VERSION: "3.6" GIT_PATH: "%GIT_DAEMON_PATH%" - PYTHON: "C:\\Python37-x64" PYTHON_VERSION: "3.7" GIT_PATH: "%GIT_DAEMON_PATH%" - - PYTHON: "C:\\Miniconda35-x64" - PYTHON_VERSION: "3.5" - IS_CONDA: "yes" - MAYFAIL: "yes" - GIT_PATH: "%GIT_DAEMON_PATH%" - ## Cygwin - - PYTHON: "C:\\Python35-x64" - PYTHON_VERSION: "3.5" - IS_CYGWIN: "yes" - MAYFAIL: "yes" - GIT_PATH: "%CYGWIN64_GIT_PATH%" matrix: allow_failures: @@ -76,18 +59,10 @@ install: build: false test_script: - - IF "%IS_CYGWIN%" == "yes" ( - nosetests -v - ) ELSE ( - IF "%PYTHON_VERSION%" == "3.5" ( - nosetests -v --with-coverage - ) ELSE ( - nosetests -v - ) - ) + - nosetests -v on_success: - - IF "%PYTHON_VERSION%" == "3.5" IF NOT "%IS_CYGWIN%" == "yes" (codecov) + - IF "%PYTHON_VERSION%" == "3.6" IF NOT "%IS_CYGWIN%" == "yes" (codecov) # Enable this to be able to login to the build worker. You can use the # `remmina` program in Ubuntu, use the login information that the line below diff --git a/.github/workflows/pythonpackage.yml b/.github/workflows/pythonpackage.yml index 5e94cd05e..618d6b97a 100644 --- a/.github/workflows/pythonpackage.yml +++ b/.github/workflows/pythonpackage.yml @@ -15,7 +15,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: [3.5, 3.6, 3.7, 3.8, 3.9] + python-version: [3.6, 3.7, 3.8, 3.9] steps: - uses: actions/checkout@v2 @@ -56,4 +56,4 @@ jobs: run: | set -x pip install -r doc/requirements.txt - make -C doc html \ No newline at end of file + make -C doc html diff --git a/.travis.yml b/.travis.yml index 1fbb1ddb8..570beaad6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,8 +1,6 @@ # UNUSED, only for reference. If adjustments are needed, please see github actions language: python python: - - "3.4" - - "3.5" - "3.6" - "3.7" - "3.8" @@ -38,7 +36,7 @@ script: - ulimit -n - coverage run --omit="test/*" -m unittest --buffer - coverage report - - if [ "$TRAVIS_PYTHON_VERSION" == '3.5' ]; then cd doc && make html; fi + - if [ "$TRAVIS_PYTHON_VERSION" == '3.6' ]; then cd doc && make html; fi - if [ "$TRAVIS_PYTHON_VERSION" == '3.6' ]; then flake8 --ignore=W293,E265,E266,W503,W504,E731; fi after_success: - codecov diff --git a/README.md b/README.md index 0d0edeb43..4725d3aeb 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ If it is not in your `PATH`, you can help GitPython find it by setting the `GIT_PYTHON_GIT_EXECUTABLE=` environment variable. * Git (1.7.x or newer) -* Python >= 3.5 +* Python >= 3.6 The list of dependencies are listed in `./requirements.txt` and `./test-requirements.txt`. The installer takes care of installing them for you. diff --git a/doc/source/intro.rst b/doc/source/intro.rst index 7168c91b1..956a36073 100644 --- a/doc/source/intro.rst +++ b/doc/source/intro.rst @@ -13,7 +13,7 @@ The object database implementation is optimized for handling large quantities of Requirements ============ -* `Python`_ >= 3.5 +* `Python`_ >= 3.6 * `Git`_ 1.7.0 or newer It should also work with older versions, but it may be that some operations involving remotes will not work as expected. diff --git a/git/cmd.py b/git/cmd.py index ec630d93c..72ec0381a 100644 --- a/git/cmd.py +++ b/git/cmd.py @@ -17,9 +17,7 @@ import subprocess import sys import threading -from collections import OrderedDict from textwrap import dedent -import warnings from git.compat import ( defenc, @@ -903,13 +901,6 @@ def transform_kwarg(self, name, value, split_single_char_options): def transform_kwargs(self, split_single_char_options=True, **kwargs): """Transforms Python style kwargs into git command line options.""" - # Python 3.6 preserves the order of kwargs and thus has a stable - # order. For older versions sort the kwargs by the key to get a stable - # order. - if sys.version_info[:2] < (3, 6): - kwargs = OrderedDict(sorted(kwargs.items(), key=lambda x: x[0])) - warnings.warn("Python 3.5 support is deprecated and will be removed 2021-09-05.\n" + - "It does not preserve the order for key-word arguments and enforce lexical sorting instead.") args = [] for k, v in kwargs.items(): if isinstance(v, (list, tuple)): diff --git a/setup.py b/setup.py index f8829c386..850d680d4 100755 --- a/setup.py +++ b/setup.py @@ -99,7 +99,7 @@ def build_py_modules(basedir, excludes=[]): include_package_data=True, py_modules=build_py_modules("./git", excludes=["git.ext.*"]), package_dir={'git': 'git'}, - python_requires='>=3.5', + python_requires='>=3.6', install_requires=requirements, tests_require=requirements + test_requirements, zip_safe=False, @@ -127,6 +127,6 @@ def build_py_modules(basedir, excludes=[]): "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9" + "Programming Language :: Python :: 3.9" ] )