Revert "Remove support for Python 3.5" - fix CI for now. · gitpython-developers/GitPython@820d3cc · GitHub
Skip to content

Commit 820d3cc

Browse files
committed
Revert "Remove support for Python 3.5" - fix CI for now.
This reverts commit 45d1cd5. See #1201 which will hopefully help to get a proper fix soon.
1 parent 4d86d88 commit 820d3cc

7 files changed

Lines changed: 45 additions & 9 deletions

File tree

.appveyor.yml

Lines changed: 27 additions & 2 deletions

.github/workflows/pythonpackage.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
runs-on: ubuntu-latest
1616
strategy:
1717
matrix:
18-
python-version: [3.6, 3.7, 3.8, 3.9]
18+
python-version: [3.5, 3.6, 3.7, 3.8, 3.9]
1919

2020
steps:
2121
- uses: actions/checkout@v2
@@ -61,4 +61,4 @@ jobs:
6161
run: |
6262
set -x
6363
pip install -r doc/requirements.txt
64-
make -C doc html
64+
make -C doc html

.travis.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# UNUSED, only for reference. If adjustments are needed, please see github actions
22
language: python
33
python:
4+
- "3.4"
5+
- "3.5"
46
- "3.6"
57
- "3.7"
68
- "3.8"
@@ -36,7 +38,7 @@ script:
3638
- ulimit -n
3739
- coverage run --omit="test/*" -m unittest --buffer
3840
- coverage report
39-
- if [ "$TRAVIS_PYTHON_VERSION" == '3.6' ]; then cd doc && make html; fi
41+
- if [ "$TRAVIS_PYTHON_VERSION" == '3.5' ]; then cd doc && make html; fi
4042
- if [ "$TRAVIS_PYTHON_VERSION" == '3.6' ]; then flake8 --ignore=W293,E265,E266,W503,W504,E731; fi
4143
after_success:
4244
- codecov

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ If it is not in your `PATH`, you can help GitPython find it by setting
3434
the `GIT_PYTHON_GIT_EXECUTABLE=<path/to/git>` environment variable.
3535

3636
* Git (1.7.x or newer)
37-
* Python >= 3.6
37+
* Python >= 3.5
3838

3939
The list of dependencies are listed in `./requirements.txt` and `./test-requirements.txt`.
4040
The installer takes care of installing them for you.

doc/source/intro.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ The object database implementation is optimized for handling large quantities of
1313
Requirements
1414
============
1515

16-
* `Python`_ >= 3.6
16+
* `Python`_ >= 3.5
1717
* `Git`_ 1.7.0 or newer
1818
It should also work with older versions, but it may be that some operations
1919
involving remotes will not work as expected.

git/cmd.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@
1717
import subprocess
1818
import sys
1919
import threading
20+
from collections import OrderedDict
2021
from textwrap import dedent
22+
import warnings
2123

2224
from git.compat import (
2325
defenc,
@@ -1003,6 +1005,13 @@ def transform_kwarg(self, name: str, value: Any, split_single_char_options: bool
10031005

10041006
def transform_kwargs(self, split_single_char_options: bool = True, **kwargs: Any) -> List[str]:
10051007
"""Transforms Python style kwargs into git command line options."""
1008+
# Python 3.6 preserves the order of kwargs and thus has a stable
1009+
# order. For older versions sort the kwargs by the key to get a stable
1010+
# order.
1011+
if sys.version_info[:2] < (3, 6):
1012+
kwargs = OrderedDict(sorted(kwargs.items(), key=lambda x: x[0]))
1013+
warnings.warn("Python 3.5 support is deprecated and will be removed 2021-09-05.\n" +
1014+
"It does not preserve the order for key-word arguments and enforce lexical sorting instead.")
10061015
args = []
10071016
for k, v in kwargs.items():
10081017
if isinstance(v, (list, tuple)):

setup.py

Lines changed: 2 additions & 2 deletions

0 commit comments

Comments
 (0)