| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
47 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -7,9 +7,6 @@ environment: | |||
| 7 | 7 | matrix: | |
| 8 | 8 | ## MINGW | |
| 9 | 9 | # | |
| 10 | - - PYTHON: "C:\\Python26" | ||
| 11 | - PYTHON_VERSION: "2.6" | ||
| 12 | - GIT_PATH: "%GIT_DAEMON_PATH%" | ||
| 13 | 10 | - PYTHON: "C:\\Python27" | |
| 14 | 11 | PYTHON_VERSION: "2.7" | |
| 15 | 12 | GIT_PATH: "%GIT_DAEMON_PATH%" | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,8 +1,6 @@ | |||
| 1 | 1 | language: python | |
| 2 | 2 | python: | |
| 3 | - - "2.6" | ||
| 4 | 3 | - "2.7" | |
| 5 | - - "3.3" | ||
| 6 | 4 | - "3.4" | |
| 7 | 5 | - "3.5" | |
| 8 | 6 | - "3.6" | |
@@ -12,7 +10,6 @@ python: | |||
| 12 | 10 | # - "pypy" - won't work as smmap doesn't work (see gitdb/.travis.yml for details) | |
| 13 | 11 | matrix: | |
| 14 | 12 | allow_failures: | |
| 15 | - - python: "2.6" | ||
| 16 | 13 | - python: "3.6-dev" | |
| 17 | 14 | - python: "3.7-dev" | |
| 18 | 15 | - python: "nightly" | |
@@ -26,7 +23,6 @@ install: | |||
| 26 | 23 | - git fetch --tags | |
| 27 | 24 | - pip install -r test-requirements.txt | |
| 28 | 25 | - pip install codecov sphinx | |
| 29 | - - if [ "$TRAVIS_PYTHON_VERSION" == '2.6' ]; then pip install unittest2; fi | ||
| 30 | 26 | ||
| 31 | 27 | # generate some reflog as git-python tests need it (in master) | |
| 32 | 28 | - ./init-tests-after-clone.sh | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,6 +1,6 @@ | |||
| 1 | 1 | ### How to contribute | |
| 2 | 2 | ||
| 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 | ||
| 4 | 4 | * For setting up the environment to run the self tests, look at `.travis.yml`. | |
| 5 | 5 | * Add yourself to AUTHORS.md and write your patch. **Write a test that fails unless your patch is present.** | |
| 6 | 6 | * Initiate a pull request | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -19,7 +19,7 @@ If it is not in your `PATH`, you can help GitPython find it by setting | |||
| 19 | 19 | the `GIT_PYTHON_GIT_EXECUTABLE=<path/to/git>` environment variable. | |
| 20 | 20 | ||
| 21 | 21 | * 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. | ||
| 23 | 23 | ||
| 24 | 24 | The list of dependencies are listed in `./requirements.txt` and `./test-requirements.txt`. | |
| 25 | 25 | 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 | |||
| 68 | 68 | but not all test-cases pass - you may help improve them by exploring | |
| 69 | 69 | [Issue #525](https://github.com/gitpython-developers/GitPython/issues/525). | |
| 70 | 70 | ||
| 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 | - | ||
| 75 | 71 | ### RUNNING TESTS | |
| 76 | 72 | ||
| 77 | 73 | *Important*: Right after cloning this repository, please be sure to have executed | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -161,13 +161,13 @@ Please note that due to breaking changes, we have to increase the major version. | |||
| 161 | 161 | with large repositories. | |
| 162 | 162 | * CRITICAL: fixed incorrect `Commit` object serialization when authored or commit date had timezones which were not | |
| 163 | 163 | 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>`_ | ||
| 165 | 165 | * 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. | |
| 166 | 166 | ||
| 167 | 167 | 1.0.1 - Fixes | |
| 168 | 168 | ============= | |
| 169 | 169 | ||
| 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>`_ | ||
| 171 | 171 | ||
| 172 | 172 | 1.0.0 - Notes | |
| 173 | 173 | ============= | |
@@ -191,7 +191,7 @@ It follows the `semantic version scheme <http://semver.org>`_, and thus will not | |||
| 191 | 191 | ||
| 192 | 192 | - Those who support **GUI on windows** will now have to set `git.Git.USE_SHELL = True` to get the previous behaviour. | |
| 193 | 193 | ||
| 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>`_ | ||
| 195 | 195 | ||
| 196 | 196 | ||
| 197 | 197 | 0.3.6 - Features | |
@@ -207,11 +207,11 @@ It follows the `semantic version scheme <http://semver.org>`_, and thus will not | |||
| 207 | 207 | * Repo.working_tree_dir now returns None if it is bare. Previously it raised AssertionError. | |
| 208 | 208 | * IndexFile.add() previously raised AssertionError when paths where used with bare repository, now it raises InvalidGitRepositoryError | |
| 209 | 209 | ||
| 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>`_ | ||
| 211 | 211 | * `[include]` sections in git configuration files are now respected | |
| 212 | 212 | * Added `GitConfigParser.rename_section()` | |
| 213 | 213 | * 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+>`_ | ||
| 215 | 215 | ||
| 216 | 216 | 0.3.5 - Bugfixes | |
| 217 | 217 | ================ | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -14,8 +14,6 @@ Requirements | |||
| 14 | 14 | ============ | |
| 15 | 15 | ||
| 16 | 16 | * `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. | ||
| 19 | 17 | * `Git`_ 1.7.0 or newer | |
| 20 | 18 | It should also work with older versions, but it may be that some operations | |
| 21 | 19 | involving remotes will not work as expected. | |
@@ -75,12 +73,6 @@ codebase for `__del__` implementations and call these yourself when you see fit. | |||
| 75 | 73 | Another way assure proper cleanup of resources is to factor out GitPython into a | |
| 76 | 74 | separate process which can be dropped periodically. | |
| 77 | 75 | ||
| 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 | - | ||
| 84 | 76 | Getting Started | |
| 85 | 77 | =============== | |
| 86 | 78 | ||
@@ -124,7 +116,7 @@ http://stackoverflow.com/questions/tagged/gitpython | |||
| 124 | 116 | ||
| 125 | 117 | Issue Tracker | |
| 126 | 118 | ============= | |
| 127 | - The issue tracker is hosted by github: | ||
| 119 | + The issue tracker is hosted by GitHub: | ||
| 128 | 120 | ||
| 129 | 121 | https://github.com/gitpython-developers/GitPython/issues | |
| 130 | 122 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -2,7 +2,7 @@ | |||
| 2 | 2 | ####### | |
| 3 | 3 | Roadmap | |
| 4 | 4 | ####### | |
| 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: | ||
| 6 | 6 | https://github.com/gitpython-developers/GitPython/issues | |
| 7 | 7 | ||
| 8 | 8 | Select the respective milestone to filter the list of issues accordingly. | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -17,6 +17,7 @@ | |||
| 17 | 17 | import subprocess | |
| 18 | 18 | import sys | |
| 19 | 19 | import threading | |
| 20 | + from collections import OrderedDict | ||
| 20 | 21 | from textwrap import dedent | |
| 21 | 22 | ||
| 22 | 23 | from git.compat import ( | |
@@ -31,7 +32,6 @@ | |||
| 31 | 32 | is_win, | |
| 32 | 33 | ) | |
| 33 | 34 | from git.exc import CommandError | |
| 34 | - from git.odict import OrderedDict | ||
| 35 | 35 | from git.util import is_cygwin_git, cygpath, expand_path | |
| 36 | 36 | ||
| 37 | 37 | from .exc import ( | |
@@ -44,10 +44,10 @@ | |||
| 44 | 44 | ) | |
| 45 | 45 | ||
| 46 | 46 | ||
| 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'} | ||
| 51 | 51 | ||
| 52 | 52 | log = logging.getLogger(__name__) | |
| 53 | 53 | log.addHandler(logging.NullHandler()) | |
@@ -125,7 +125,7 @@ def dashify(string): | |||
| 125 | 125 | ||
| 126 | 126 | ||
| 127 | 127 | 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} | ||
| 129 | 129 | ||
| 130 | 130 | ||
| 131 | 131 | 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=()): | |||
| 143 | 143 | ## CREATE_NEW_PROCESS_GROUP is needed to allow killing it afterwards, | |
| 144 | 144 | # see https://docs.python.org/3/library/subprocess.html#subprocess.Popen.send_signal | |
| 145 | 145 | 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) | ||
| 148 | 147 | ||
| 149 | 148 | ||
| 150 | 149 | class Git(LazyMixin): | |
@@ -486,10 +485,10 @@ def readline(self, size=-1): | |||
| 486 | 485 | ||
| 487 | 486 | def readlines(self, size=-1): | |
| 488 | 487 | if self._nbr == self._size: | |
| 489 | - return list() | ||
| 488 | + return [] | ||
| 490 | 489 | ||
| 491 | 490 | # leave all additional logic to our readline method, we just check the size | |
| 492 | - out = list() | ||
| 491 | + out = [] | ||
| 493 | 492 | nbr = 0 | |
| 494 | 493 | while True: | |
| 495 | 494 | line = self.readline() | |
@@ -895,7 +894,7 @@ def transform_kwarg(self, name, value, split_single_char_options): | |||
| 895 | 894 | ||
| 896 | 895 | def transform_kwargs(self, split_single_char_options=True, **kwargs): | |
| 897 | 896 | """Transforms Python style kwargs into git command line options.""" | |
| 898 | - args = list() | ||
| 897 | + args = [] | ||
| 899 | 898 | kwargs = OrderedDict(sorted(kwargs.items(), key=lambda x: x[0])) | |
| 900 | 899 | for k, v in kwargs.items(): | |
| 901 | 900 | if isinstance(v, (list, tuple)): | |
@@ -914,7 +913,7 @@ def __unpack_args(cls, arg_list): | |||
| 914 | 913 | return [arg_list.encode(defenc)] | |
| 915 | 914 | return [str(arg_list)] | |
| 916 | 915 | ||
| 917 | - outlist = list() | ||
| 916 | + outlist = [] | ||
| 918 | 917 | for arg in arg_list: | |
| 919 | 918 | if isinstance(arg_list, (list, tuple)): | |
| 920 | 919 | outlist.extend(cls.__unpack_args(arg)) | |
@@ -973,8 +972,8 @@ def _call_process(self, method, *args, **kwargs): | |||
| 973 | 972 | :return: Same as ``execute``""" | |
| 974 | 973 | # Handle optional arguments prior to calling transform_kwargs | |
| 975 | 974 | # 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} | ||
| 978 | 977 | ||
| 979 | 978 | insert_after_this_arg = opts_kwargs.pop('insert_kwargs_after', None) | |
| 980 | 979 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -12,6 +12,7 @@ | |||
| 12 | 12 | import logging | |
| 13 | 13 | import os | |
| 14 | 14 | import re | |
| 15 | + from collections import OrderedDict | ||
| 15 | 16 | ||
| 16 | 17 | from git.compat import ( | |
| 17 | 18 | string_types, | |
@@ -21,7 +22,6 @@ | |||
| 21 | 22 | with_metaclass, | |
| 22 | 23 | PY3 | |
| 23 | 24 | ) | |
| 24 | - from git.odict import OrderedDict | ||
| 25 | 25 | from git.util import LockFile | |
| 26 | 26 | ||
| 27 | 27 | import os.path as osp | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -61,7 +61,7 @@ class Diffable(object): | |||
| 61 | 61 | :note: | |
| 62 | 62 | Subclasses require a repo member as it is the case for Object instances, for practical | |
| 63 | 63 | reasons we do not derive from Object.""" | |
| 64 | - __slots__ = tuple() | ||
| 64 | + __slots__ = () | ||
| 65 | 65 | ||
| 66 | 66 | # standin indicating you want to diff against the index | |
| 67 | 67 | class Index(object): | |
@@ -106,7 +106,7 @@ def diff(self, other=Index, paths=None, create_patch=False, **kwargs): | |||
| 106 | 106 | :note: | |
| 107 | 107 | On a bare repository, 'other' needs to be provided as Index or as | |
| 108 | 108 | as Tree/Commit, or a git command error will occur""" | |
| 109 | - args = list() | ||
| 109 | + args = [] | ||
| 110 | 110 | args.append("--abbrev=40") # we need full shas | |
| 111 | 111 | args.append("--full-index") # get full index paths, not only filenames | |
| 112 | 112 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments