Skip to content

Commit 929f3e1

Browse files
committed
Drop support for EOL Python 2.6
1 parent 190c045 commit 929f3e1

22 files changed

+20
-120
lines changed

.appveyor.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@ environment:
77
matrix:
88
## MINGW
99
#
10-
- PYTHON: "C:\\Python26"
11-
PYTHON_VERSION: "2.6"
12-
GIT_PATH: "%GIT_DAEMON_PATH%"
1310
- PYTHON: "C:\\Python27"
1411
PYTHON_VERSION: "2.7"
1512
GIT_PATH: "%GIT_DAEMON_PATH%"

.travis.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
language: python
22
python:
3-
- "2.6"
43
- "2.7"
54
- "3.3"
65
- "3.4"
@@ -12,7 +11,6 @@ python:
1211
# - "pypy" - won't work as smmap doesn't work (see gitdb/.travis.yml for details)
1312
matrix:
1413
allow_failures:
15-
- python: "2.6"
1614
- python: "3.6-dev"
1715
- python: "3.7-dev"
1816
- python: "nightly"
@@ -26,7 +24,6 @@ install:
2624
- git fetch --tags
2725
- pip install -r test-requirements.txt
2826
- pip install codecov sphinx
29-
- if [ "$TRAVIS_PYTHON_VERSION" == '2.6' ]; then pip install unittest2; fi
3027

3128
# generate some reflog as git-python tests need it (in master)
3229
- ./init-tests-after-clone.sh

README.md

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

2121
* Git (1.7.x or newer)
22-
* Python 2.7 to 3.6, while python 2.6 is supported on a *best-effort basis*.
22+
* Python 2.7 to 3.6.
2323

2424
The list of dependencies are listed in `./requirements.txt` and `./test-requirements.txt`.
2525
The installer takes care of installing them for you.
@@ -68,10 +68,6 @@ For *Windows*, we do regularly test it on [Appveyor CI](https://www.appveyor.com
6868
but not all test-cases pass - you may help improve them by exploring
6969
[Issue #525](https://github.com/gitpython-developers/GitPython/issues/525).
7070

71-
#### Python 2.6
72-
73-
Python 2.6 is supported on best-effort basis; which means that it is likely to deteriorate over time.
74-
7571
### RUNNING TESTS
7672

7773
*Important*: Right after cloning this repository, please be sure to have executed

doc/source/intro.rst

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ Requirements
1414
============
1515

1616
* `Python`_ 2.7 or newer
17-
Since GitPython 2.0.0. Please note that python 2.6 is still reasonably well supported, but might
18-
deteriorate over time. Support is provided on a best-effort basis only.
1917
* `Git`_ 1.7.0 or newer
2018
It should also work with older versions, but it may be that some operations
2119
involving remotes will not work as expected.
@@ -75,12 +73,6 @@ codebase for `__del__` implementations and call these yourself when you see fit.
7573
Another way assure proper cleanup of resources is to factor out GitPython into a
7674
separate process which can be dropped periodically.
7775

78-
Best-effort for Python 2.6 and Windows support
79-
----------------------------------------------
80-
81-
This means that support for these platforms is likely to worsen over time
82-
as they are kept alive solely by their users, or not.
83-
8476
Getting Started
8577
===============
8678

@@ -124,7 +116,7 @@ http://stackoverflow.com/questions/tagged/gitpython
124116

125117
Issue Tracker
126118
=============
127-
The issue tracker is hosted by github:
119+
The issue tracker is hosted by GitHub:
128120

129121
https://github.com/gitpython-developers/GitPython/issues
130122

git/cmd.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
import subprocess
1818
import sys
1919
import threading
20+
from collections import OrderedDict
2021
from textwrap import dedent
2122

2223
from git.compat import (
@@ -31,7 +32,6 @@
3132
is_win,
3233
)
3334
from git.exc import CommandError
34-
from git.odict import OrderedDict
3535
from git.util import is_cygwin_git, cygpath, expand_path
3636

3737
from .exc import (
@@ -143,8 +143,7 @@ def dict_to_slots_and__excluded_are_none(self, d, excluded=()):
143143
## CREATE_NEW_PROCESS_GROUP is needed to allow killing it afterwards,
144144
# see https://docs.python.org/3/library/subprocess.html#subprocess.Popen.send_signal
145145
PROC_CREATIONFLAGS = (CREATE_NO_WINDOW | subprocess.CREATE_NEW_PROCESS_GROUP
146-
if is_win and sys.version_info >= (2, 7)
147-
else 0)
146+
if is_win else 0)
148147

149148

150149
class Git(LazyMixin):

git/config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
import logging
1313
import os
1414
import re
15+
from collections import OrderedDict
1516

1617
from git.compat import (
1718
string_types,
@@ -21,7 +22,6 @@
2122
with_metaclass,
2223
PY3
2324
)
24-
from git.odict import OrderedDict
2525
from git.util import LockFile
2626

2727
import os.path as osp

git/objects/submodule/base.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,7 @@
33
import logging
44
import os
55
import stat
6-
try:
7-
from unittest import SkipTest
8-
except ImportError:
9-
from unittest2 import SkipTest
6+
from unittest import SkipTest
107
import uuid
118

129
import git

git/odict.py

Lines changed: 0 additions & 10 deletions
This file was deleted.

git/test/lib/helper.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
import tempfile
1616
import textwrap
1717
import time
18+
import unittest
1819

1920
from git.compat import string_types, is_win
2021
from git.util import rmtree, cwd
@@ -23,11 +24,6 @@
2324
import os.path as osp
2425

2526

26-
if sys.version_info[0:2] == (2, 6):
27-
import unittest2 as unittest
28-
else:
29-
import unittest
30-
3127
TestCase = unittest.TestCase
3228
SkipTest = unittest.SkipTest
3329
skipIf = unittest.skipIf
@@ -348,7 +344,6 @@ class TestBase(TestCase):
348344
of the project history ( to assure tests don't fail for others ).
349345
"""
350346

351-
# On py26, unittest2 has assertRaisesRegex
352347
# On py3, unittest has assertRaisesRegex
353348
# On py27, we use unittest, which names it differently:
354349
if sys.version_info[0:2] == (2, 7):

git/test/test_base.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,7 @@
77
import os
88
import sys
99
import tempfile
10-
try:
11-
from unittest import SkipTest, skipIf
12-
except ImportError:
13-
from unittest2 import SkipTest, skipIf
10+
from unittest import SkipTest, skipIf
1411

1512
from git import (
1613
Blob,

0 commit comments

Comments
 (0)