Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit929f3e1

Browse files
committed
Drop support for EOL Python 2.6
1 parent190c045 commit929f3e1

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 bygithub:
119+
The issue tracker is hosted byGitHub:
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
importsubprocess
1818
importsys
1919
importthreading
20+
fromcollectionsimportOrderedDict
2021
fromtextwrapimportdedent
2122

2223
fromgit.compatimport (
@@ -31,7 +32,6 @@
3132
is_win,
3233
)
3334
fromgit.excimportCommandError
34-
fromgit.odictimportOrderedDict
3535
fromgit.utilimportis_cygwin_git,cygpath,expand_path
3636

3737
from .excimport (
@@ -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-
ifis_winandsys.version_info>= (2,7)
147-
else0)
146+
ifis_winelse0)
148147

149148

150149
classGit(LazyMixin):

‎git/config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
importlogging
1313
importos
1414
importre
15+
fromcollectionsimportOrderedDict
1516

1617
fromgit.compatimport (
1718
string_types,
@@ -21,7 +22,6 @@
2122
with_metaclass,
2223
PY3
2324
)
24-
fromgit.odictimportOrderedDict
2525
fromgit.utilimportLockFile
2626

2727
importos.pathasosp

‎git/objects/submodule/base.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,7 @@
33
importlogging
44
importos
55
importstat
6-
try:
7-
fromunittestimportSkipTest
8-
exceptImportError:
9-
fromunittest2importSkipTest
6+
fromunittestimportSkipTest
107
importuuid
118

129
importgit

‎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
importtempfile
1616
importtextwrap
1717
importtime
18+
importunittest
1819

1920
fromgit.compatimportstring_types,is_win
2021
fromgit.utilimportrmtree,cwd
@@ -23,11 +24,6 @@
2324
importos.pathasosp
2425

2526

26-
ifsys.version_info[0:2]== (2,6):
27-
importunittest2asunittest
28-
else:
29-
importunittest
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
ifsys.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
importos
88
importsys
99
importtempfile
10-
try:
11-
fromunittestimportSkipTest,skipIf
12-
exceptImportError:
13-
fromunittest2importSkipTest,skipIf
10+
fromunittestimportSkipTest,skipIf
1411

1512
fromgitimport (
1613
Blob,

‎git/test/test_fun.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,7 @@
22
fromstatimportS_IFDIR,S_IFREG,S_IFLNK
33
fromosimportstat
44
importos.pathasosp
5-
6-
try:
7-
fromunittestimportskipIf,SkipTest
8-
exceptImportError:
9-
fromunittest2importskipIf,SkipTest
5+
fromunittestimportskipIf,SkipTest
106

117
fromgitimportGit
128
fromgit.compatimportPY3

‎git/test/test_index.py

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,8 @@
1111
S_ISLNK,
1212
ST_MODE
1313
)
14-
importsys
1514
importtempfile
16-
try:
17-
fromunittestimportskipIf
18-
exceptImportError:
19-
fromunittest2importskipIf
15+
fromunittestimportskipIf
2016

2117
fromgitimport (
2218
IndexFile,
@@ -168,9 +164,7 @@ def add_bad_blob():
168164
exceptExceptionasex:
169165
msg_py3="required argument is not an integer"
170166
msg_py2="cannot convert argument to integer"
171-
msg_py26="unsupported operand type(s) for &: 'str' and 'long'"
172-
assertmsg_py2instr(ex)ormsg_py3instr(ex)or \
173-
msg_py26instr(ex),str(ex)
167+
assertmsg_py2instr(ex)ormsg_py3instr(ex)
174168

175169
## 2nd time should not fail due to stray lock file
176170
try:
@@ -180,9 +174,6 @@ def add_bad_blob():
180174

181175
@with_rw_repo('0.1.6')
182176
deftest_index_file_from_tree(self,rw_repo):
183-
ifsys.version_info< (2,7):
184-
## Skipped, not `assertRaisesRegexp` in py2.6
185-
return
186177
common_ancestor_sha="5117c9c8a4d3af19a9958677e45cda9269de1541"
187178
cur_sha="4b43ca7ff72d5f535134241e7c797ddc9c7a3573"
188179
other_sha="39f85c4358b7346fee22169da9cad93901ea9eb9"

‎git/test/test_remote.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,7 @@
66

77
importrandom
88
importtempfile
9-
try:
10-
fromunittestimportskipIf
11-
exceptImportError:
12-
fromunittest2importskipIf
9+
fromunittestimportskipIf
1310

1411
fromgitimport (
1512
RemoteProgress,

‎git/test/test_repo.py

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,8 @@
99
importitertools
1010
importos
1111
importpickle
12-
importsys
1312
importtempfile
14-
try:
15-
fromunittestimportskipIf,SkipTest
16-
exceptImportError:
17-
fromunittest2importskipIf,SkipTest
13+
fromunittestimportskipIf,SkipTest
1814

1915
try:
2016
importpathlib
@@ -364,9 +360,6 @@ def test_archive(self):
364360

365361
@patch.object(Git,'_call_process')
366362
deftest_should_display_blame_information(self,git):
367-
ifsys.version_info< (2,7):
368-
## Skipped, not `assertRaisesRegexp` in py2.6
369-
return
370363
git.return_value=fixture('blame')
371364
b=self.rorepo.blame('master','lib/git.py')
372365
assert_equal(13,len(b))
@@ -792,8 +785,6 @@ def test_rev_parse(self):
792785

793786
deftest_repo_odbtype(self):
794787
target_type=GitCmdObjectDB
795-
ifsys.version_info[:2]< (2,5):
796-
target_type=GitCmdObjectDB
797788
self.assertIsInstance(self.rorepo.odb,target_type)
798789

799790
deftest_submodules(self):

‎git/test/test_submodule.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,7 @@
33
# the BSD License: http://www.opensource.org/licenses/bsd-license.php
44
importos
55
importsys
6-
try:
7-
fromunittestimportskipIf
8-
exceptImportError:
9-
fromunittest2importskipIf
6+
fromunittestimportskipIf
107

118
importgit
129
fromgit.cmdimportGit

‎git/test/test_tree.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,7 @@
66

77
fromioimportBytesIO
88
importsys
9-
try:
10-
fromunittestimportskipIf
11-
exceptImportError:
12-
fromunittest2importskipIf
9+
fromunittestimportskipIf
1310

1411
fromgitimport (
1512
Tree,

‎git/test/test_util.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,7 @@
66

77
importtempfile
88
importtime
9-
try:
10-
fromunittestimportskipIf
11-
exceptImportError:
12-
fromunittest2importskipIf
9+
fromunittestimportskipIf
1310

1411

1512
importddt

‎git/util.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,7 @@
1414
importshutil
1515
importstat
1616
importtime
17-
try:
18-
fromunittestimportSkipTest
19-
exceptImportError:
20-
fromunittest2importSkipTest
17+
fromunittestimportSkipTest
2118

2219
fromgitdb.utilimport (# NOQA @IgnorePep8
2320
make_sha,

‎requirements.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
gitdb>=0.6.4
22
ddt>=1.1.1
3-
unittest2;python_version<'2.7'

‎setup.py

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@
99

1010
fromdistutils.command.build_pyimportbuild_pyas_build_py
1111
fromsetuptools.command.sdistimportsdistas_sdist
12-
importpkg_resources
13-
importlogging
1412
importos
1513
importsys
1614
fromosimportpath
@@ -66,26 +64,7 @@ def _stamp_version(filename):
6664

6765

6866
install_requires= ['gitdb2 >= 2.0.0']
69-
extras_require= {
70-
':python_version == "2.6"': ['ordereddict'],
71-
}
7267
test_requires= ['ddt>=1.1.1']
73-
ifsys.version_info[:2]< (2,7):
74-
test_requires.append('mock')
75-
76-
try:
77-
if'bdist_wheel'notinsys.argv:
78-
forkey,valueinextras_require.items():
79-
ifkey.startswith(':')andpkg_resources.evaluate_marker(key[1:]):
80-
install_requires.extend(value)
81-
exceptException:
82-
logging.getLogger(__name__).exception(
83-
'Something went wrong calculating platform specific dependencies, so '
84-
"you're getting them all!"
85-
)
86-
forkey,valueinextras_require.items():
87-
ifkey.startswith(':'):
88-
install_requires.extend(value)
8968
# end
9069

9170
setup(
@@ -101,7 +80,7 @@ def _stamp_version(filename):
10180
package_data={'git.test': ['fixtures/*']},
10281
package_dir={'git':'git'},
10382
license="BSD License",
104-
python_requires='>=2.6, !=3.0.*, !=3.1.*, !=3.2.*',
83+
python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*',
10584
requires=['gitdb2 (>=2.0.0)'],
10685
install_requires=install_requires,
10786
test_requirements=test_requires+install_requires,
@@ -126,7 +105,6 @@ def _stamp_version(filename):
126105
"Operating System :: MacOS :: MacOS X",
127106
"Programming Language :: Python",
128107
"Programming Language :: Python :: 2",
129-
"Programming Language :: Python :: 2.6",
130108
"Programming Language :: Python :: 2.7",
131109
"Programming Language :: Python :: 3",
132110
"Programming Language :: Python :: 3.3",

‎test-requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
coverage
44
flake8
55
nose
6-
mock; python_version<='2.7'
6+
mock; python_version=='2.7'

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp