summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.appveyor.yml29
-rw-r--r--.github/workflows/pythonpackage.yml4
-rw-r--r--.travis.yml4
-rw-r--r--README.md2
-rw-r--r--doc/source/intro.rst2
-rw-r--r--git/cmd.py9
-rwxr-xr-xsetup.py4
7 files changed, 45 insertions, 9 deletions
diff --git a/.appveyor.yml b/.appveyor.yml
index 833f5c7b..0a86c1a7 100644
--- a/.appveyor.yml
+++ b/.appveyor.yml
@@ -6,12 +6,29 @@ 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:
@@ -59,10 +76,18 @@ install:
build: false
test_script:
- - nosetests -v
+ - IF "%IS_CYGWIN%" == "yes" (
+ nosetests -v
+ ) ELSE (
+ IF "%PYTHON_VERSION%" == "3.5" (
+ nosetests -v --with-coverage
+ ) ELSE (
+ nosetests -v
+ )
+ )
on_success:
- - IF "%PYTHON_VERSION%" == "3.6" IF NOT "%IS_CYGWIN%" == "yes" (codecov)
+ - IF "%PYTHON_VERSION%" == "3.5" 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 53da7614..65d5e6cd 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.6, 3.7, 3.8, 3.9]
+ python-version: [3.5, 3.6, 3.7, 3.8, 3.9]
steps:
- uses: actions/checkout@v2
@@ -61,4 +61,4 @@ jobs:
run: |
set -x
pip install -r doc/requirements.txt
- make -C doc html
+ make -C doc html \ No newline at end of file
diff --git a/.travis.yml b/.travis.yml
index 570beaad..1fbb1ddb 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,6 +1,8 @@
# 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"
@@ -36,7 +38,7 @@ script:
- ulimit -n
- coverage run --omit="test/*" -m unittest --buffer
- coverage report
- - if [ "$TRAVIS_PYTHON_VERSION" == '3.6' ]; then cd doc && make html; fi
+ - if [ "$TRAVIS_PYTHON_VERSION" == '3.5' ]; 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 4725d3ae..0d0edeb4 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=<path/to/git>` environment variable.
* Git (1.7.x or newer)
-* Python >= 3.6
+* Python >= 3.5
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 956a3607..7168c91b 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.6
+* `Python`_ >= 3.5
* `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 4f58b314..d8b82352 100644
--- a/git/cmd.py
+++ b/git/cmd.py
@@ -17,7 +17,9 @@ from subprocess import (
import subprocess
import sys
import threading
+from collections import OrderedDict
from textwrap import dedent
+import warnings
from git.compat import (
defenc,
@@ -1003,6 +1005,13 @@ class Git(LazyMixin):
def transform_kwargs(self, split_single_char_options: bool = True, **kwargs: Any) -> List[str]:
"""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 850d680d..f8829c38 100755
--- a/setup.py
+++ b/setup.py
@@ -99,7 +99,7 @@ setup(
include_package_data=True,
py_modules=build_py_modules("./git", excludes=["git.ext.*"]),
package_dir={'git': 'git'},
- python_requires='>=3.6',
+ python_requires='>=3.5',
install_requires=requirements,
tests_require=requirements + test_requirements,
zip_safe=False,
@@ -127,6 +127,6 @@ setup(
"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"
]
)