Skip to content

Commit f3265bd

Browse files
authored
Merge pull request gitpython-developers#737 from hugovk/rm-2.6
Drop support for EOL Python 2.6 and 3.3
2 parents 9f12b26 + 80b038f commit f3265bd

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+127
-229
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 & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
language: python
22
python:
3-
- "2.6"
43
- "2.7"
5-
- "3.3"
64
- "3.4"
75
- "3.5"
86
- "3.6"
@@ -12,7 +10,6 @@ python:
1210
# - "pypy" - won't work as smmap doesn't work (see gitdb/.travis.yml for details)
1311
matrix:
1412
allow_failures:
15-
- python: "2.6"
1613
- python: "3.6-dev"
1714
- python: "3.7-dev"
1815
- python: "nightly"
@@ -26,7 +23,6 @@ install:
2623
- git fetch --tags
2724
- pip install -r test-requirements.txt
2825
- pip install codecov sphinx
29-
- if [ "$TRAVIS_PYTHON_VERSION" == '2.6' ]; then pip install unittest2; fi
3026

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

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
### How to contribute
22

3-
* [fork this project](https://github.com/gitpython-developers/GitPython/fork) on github
3+
* [fork this project](https://github.com/gitpython-developers/GitPython/fork) on GitHub
44
* For setting up the environment to run the self tests, look at `.travis.yml`.
55
* Add yourself to AUTHORS.md and write your patch. **Write a test that fails unless your patch is present.**
66
* Initiate a pull request

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/changes.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -161,13 +161,13 @@ Please note that due to breaking changes, we have to increase the major version.
161161
with large repositories.
162162
* CRITICAL: fixed incorrect `Commit` object serialization when authored or commit date had timezones which were not
163163
divisiblej by 3600 seconds. This would happen if the timezone was something like `+0530` for instance.
164-
* A list of all additional fixes can be found `on github <https://github.com/gitpython-developers/GitPython/issues?q=milestone%3A%22v1.0.2+-+Fixes%22+is%3Aclosed>`_
164+
* A list of all additional fixes can be found `on GitHub <https://github.com/gitpython-developers/GitPython/issues?q=milestone%3A%22v1.0.2+-+Fixes%22+is%3Aclosed>`_
165165
* CRITICAL: `Tree.cache` was removed without replacement. It is technically impossible to change individual trees and expect their serialization results to be consistent with what *git* expects. Instead, use the `IndexFile` facilities to adjust the content of the staging area, and write it out to the respective tree objects using `IndexFile.write_tree()` instead.
166166

167167
1.0.1 - Fixes
168168
=============
169169

170-
* A list of all issues can be found `on github <https://github.com/gitpython-developers/GitPython/issues?q=milestone%3A%22v1.0.1+-+Fixes%22+is%3Aclosed>`_
170+
* A list of all issues can be found `on GitHub <https://github.com/gitpython-developers/GitPython/issues?q=milestone%3A%22v1.0.1+-+Fixes%22+is%3Aclosed>`_
171171

172172
1.0.0 - Notes
173173
=============
@@ -191,7 +191,7 @@ It follows the `semantic version scheme <http://semver.org>`_, and thus will not
191191

192192
- Those who support **GUI on windows** will now have to set `git.Git.USE_SHELL = True` to get the previous behaviour.
193193

194-
* A list of all issues can be found `on github <https://github.com/gitpython-developers/GitPython/issues?q=milestone%3A%22v0.3.7+-+Fixes%22+is%3Aclosed>`_
194+
* A list of all issues can be found `on GitHub <https://github.com/gitpython-developers/GitPython/issues?q=milestone%3A%22v0.3.7+-+Fixes%22+is%3Aclosed>`_
195195

196196

197197
0.3.6 - Features
@@ -207,11 +207,11 @@ It follows the `semantic version scheme <http://semver.org>`_, and thus will not
207207
* Repo.working_tree_dir now returns None if it is bare. Previously it raised AssertionError.
208208
* IndexFile.add() previously raised AssertionError when paths where used with bare repository, now it raises InvalidGitRepositoryError
209209

210-
* Added `Repo.merge_base()` implementation. See the `respective issue on github <https://github.com/gitpython-developers/GitPython/issues/169>`_
210+
* Added `Repo.merge_base()` implementation. See the `respective issue on GitHub <https://github.com/gitpython-developers/GitPython/issues/169>`_
211211
* `[include]` sections in git configuration files are now respected
212212
* Added `GitConfigParser.rename_section()`
213213
* Added `Submodule.rename()`
214-
* A list of all issues can be found `on github <https://github.com/gitpython-developers/GitPython/issues?q=milestone%3A%22v0.3.6+-+Features%22+>`_
214+
* A list of all issues can be found `on GitHub <https://github.com/gitpython-developers/GitPython/issues?q=milestone%3A%22v0.3.6+-+Features%22+>`_
215215

216216
0.3.5 - Bugfixes
217217
================

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

doc/source/roadmap.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#######
33
Roadmap
44
#######
5-
The full list of milestones including associated tasks can be found on github:
5+
The full list of milestones including associated tasks can be found on GitHub:
66
https://github.com/gitpython-developers/GitPython/issues
77

88
Select the respective milestone to filter the list of issues accordingly.

git/cmd.py

Lines changed: 13 additions & 14 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 (
@@ -44,10 +44,10 @@
4444
)
4545

4646

47-
execute_kwargs = set(('istream', 'with_extended_output',
48-
'with_exceptions', 'as_process', 'stdout_as_string',
49-
'output_stream', 'with_stdout', 'kill_after_timeout',
50-
'universal_newlines', 'shell', 'env'))
47+
execute_kwargs = {'istream', 'with_extended_output', 'with_exceptions',
48+
'as_process', 'stdout_as_string', 'output_stream',
49+
'with_stdout', 'kill_after_timeout', 'universal_newlines',
50+
'shell', 'env'}
5151

5252
log = logging.getLogger(__name__)
5353
log.addHandler(logging.NullHandler())
@@ -125,7 +125,7 @@ def dashify(string):
125125

126126

127127
def slots_to_dict(self, exclude=()):
128-
return dict((s, getattr(self, s)) for s in self.__slots__ if s not in exclude)
128+
return {s: getattr(self, s) for s in self.__slots__ if s not in exclude}
129129

130130

131131
def dict_to_slots_and__excluded_are_none(self, d, excluded=()):
@@ -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):
@@ -486,10 +485,10 @@ def readline(self, size=-1):
486485

487486
def readlines(self, size=-1):
488487
if self._nbr == self._size:
489-
return list()
488+
return []
490489

491490
# leave all additional logic to our readline method, we just check the size
492-
out = list()
491+
out = []
493492
nbr = 0
494493
while True:
495494
line = self.readline()
@@ -895,7 +894,7 @@ def transform_kwarg(self, name, value, split_single_char_options):
895894

896895
def transform_kwargs(self, split_single_char_options=True, **kwargs):
897896
"""Transforms Python style kwargs into git command line options."""
898-
args = list()
897+
args = []
899898
kwargs = OrderedDict(sorted(kwargs.items(), key=lambda x: x[0]))
900899
for k, v in kwargs.items():
901900
if isinstance(v, (list, tuple)):
@@ -914,7 +913,7 @@ def __unpack_args(cls, arg_list):
914913
return [arg_list.encode(defenc)]
915914
return [str(arg_list)]
916915

917-
outlist = list()
916+
outlist = []
918917
for arg in arg_list:
919918
if isinstance(arg_list, (list, tuple)):
920919
outlist.extend(cls.__unpack_args(arg))
@@ -973,8 +972,8 @@ def _call_process(self, method, *args, **kwargs):
973972
:return: Same as ``execute``"""
974973
# Handle optional arguments prior to calling transform_kwargs
975974
# otherwise these'll end up in args, which is bad.
976-
exec_kwargs = dict((k, v) for k, v in kwargs.items() if k in execute_kwargs)
977-
opts_kwargs = dict((k, v) for k, v in kwargs.items() if k not in execute_kwargs)
975+
exec_kwargs = {k: v for k, v in kwargs.items() if k in execute_kwargs}
976+
opts_kwargs = {k: v for k, v in kwargs.items() if k not in execute_kwargs}
978977

979978
insert_after_this_arg = opts_kwargs.pop('insert_kwargs_after', None)
980979

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/diff.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ class Diffable(object):
6161
:note:
6262
Subclasses require a repo member as it is the case for Object instances, for practical
6363
reasons we do not derive from Object."""
64-
__slots__ = tuple()
64+
__slots__ = ()
6565

6666
# standin indicating you want to diff against the index
6767
class Index(object):
@@ -106,7 +106,7 @@ def diff(self, other=Index, paths=None, create_patch=False, **kwargs):
106106
:note:
107107
On a bare repository, 'other' needs to be provided as Index or as
108108
as Tree/Commit, or a git command error will occur"""
109-
args = list()
109+
args = []
110110
args.append("--abbrev=40") # we need full shas
111111
args.append("--full-index") # get full index paths, not only filenames
112112

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy