| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -83,10 +83,6 @@ In short, I want to make a new release of 0.3 with all contributions and fixes i | |||
| 83 | 83 | ||
| 84 | 84 | The goals I have set for myself, in order, are as follows, all on branch 0.3. | |
| 85 | 85 | ||
| 86 | - * bring the test suite back online to work with the most commonly used git version | ||
| 87 | - * merge all open pull requests, may there be a test-case or not, back. If something breaks, fix it if possible or let the contributor know | ||
| 88 | - * conform git-python's structure and toolchain to the one used in my [other OSS projects](https://github.com/Byron/bcore) | ||
| 89 | - * evaluate all open issues and close them if possible | ||
| 90 | 86 | * evaluate python 3.3 compatibility and establish it if possible | |
| 91 | 87 | ||
| 92 | 88 | While that is happening, I will try hard to foster community around the project. This means being more responsive on the mailing list and in issues, as well as setting up clear guide lines about the [contribution](http://rfc.zeromq.org/spec:22) and maintenance workflow. | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -6,6 +6,7 @@ Changelog | |||
| 6 | 6 | ===== | |
| 7 | 7 | * When fetching, pulling or pushing, and an error occours, it will not be reported on stdout anymore. However, if there is a fatal error, it will still result in a GitCommandError to be thrown. This goes hand in hand with improved fetch result parsing. | |
| 8 | 8 | * Code Cleanup (in preparation for python 3 support) | |
| 9 | + | ||
| 9 | 10 | * Applied autopep8 and cleaned up code | |
| 10 | 11 | * Using python logging module instead of print statments to signal certain kinds of errors | |
| 11 | 12 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -7,18 +7,20 @@ | |||
| 7 | 7 | import os | |
| 8 | 8 | import sys | |
| 9 | 9 | import logging | |
| 10 | - from util import ( | ||
| 11 | - LazyMixin, | ||
| 12 | - stream_copy | ||
| 13 | - ) | ||
| 14 | - from exc import GitCommandError | ||
| 15 | - | ||
| 16 | 10 | from subprocess import ( | |
| 17 | 11 | call, | |
| 18 | 12 | Popen, | |
| 19 | 13 | PIPE | |
| 20 | 14 | ) | |
| 21 | 15 | ||
| 16 | + | ||
| 17 | + from .util import ( | ||
| 18 | + LazyMixin, | ||
| 19 | + stream_copy | ||
| 20 | + ) | ||
| 21 | + from .exc import GitCommandError | ||
| 22 | + | ||
| 23 | + | ||
| 22 | 24 | execute_kwargs = ('istream', 'with_keep_cwd', 'with_extended_output', | |
| 23 | 25 | 'with_exceptions', 'as_process', | |
| 24 | 26 | 'output_stream') | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,19 @@ | |||
| 1 | + #-*-coding:utf-8-*- | ||
| 2 | + # config.py | ||
| 3 | + # Copyright (C) 2008, 2009 Michael Trier (mtrier@gmail.com) and contributors | ||
| 4 | + # | ||
| 5 | + # This module is part of GitPython and is released under | ||
| 6 | + # the BSD License: http://www.opensource.org/licenses/bsd-license.php | ||
| 7 | + """utilities to help provide compatibility with python 3""" | ||
| 8 | + | ||
| 9 | + from gitdb.utils.compat import ( # noqa | ||
| 10 | + PY3, | ||
| 11 | + xrange, | ||
| 12 | + MAXSIZE, | ||
| 13 | + izip, | ||
| 14 | + ) | ||
| 15 | + | ||
| 16 | + from gitdb.utils.encoding import ( # noqa | ||
| 17 | + string_types, | ||
| 18 | + text_type | ||
| 19 | + ) | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -7,7 +7,11 @@ | |||
| 7 | 7 | configuration files""" | |
| 8 | 8 | ||
| 9 | 9 | import re | |
| 10 | - import ConfigParser as cp | ||
| 10 | + try: | ||
| 11 | + import ConfigParser as cp | ||
| 12 | + except ImportError: | ||
| 13 | + # PY3 | ||
| 14 | + import configparser as cp | ||
| 11 | 15 | import inspect | |
| 12 | 16 | import logging | |
| 13 | 17 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,21 +1,20 @@ | |||
| 1 | 1 | """Module with our own gitdb implementation - it uses the git command""" | |
| 2 | - from exc import ( | ||
| 3 | - GitCommandError, | ||
| 4 | - BadObject | ||
| 5 | - ) | ||
| 6 | - | ||
| 7 | 2 | from gitdb.base import ( | |
| 8 | 3 | OInfo, | |
| 9 | 4 | OStream | |
| 10 | 5 | ) | |
| 11 | - | ||
| 12 | 6 | from gitdb.util import ( | |
| 13 | 7 | bin_to_hex, | |
| 14 | 8 | hex_to_bin | |
| 15 | 9 | ) | |
| 16 | 10 | from gitdb.db import GitDB | |
| 17 | 11 | from gitdb.db import LooseObjectDB | |
| 18 | 12 | ||
| 13 | + from .exc import ( | ||
| 14 | + GitCommandError, | ||
| 15 | + BadObject | ||
| 16 | + ) | ||
| 17 | + | ||
| 19 | 18 | ||
| 20 | 19 | __all__ = ('GitCmdObjectDB', 'GitDB') | |
| 21 | 20 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -3,13 +3,13 @@ | |||
| 3 | 3 | # | |
| 4 | 4 | # This module is part of GitPython and is released under | |
| 5 | 5 | # the BSD License: http://www.opensource.org/licenses/bsd-license.php | |
| 6 | - | ||
| 7 | 6 | import re | |
| 8 | - from objects.blob import Blob | ||
| 9 | - from objects.util import mode_str_to_int | ||
| 10 | 7 | ||
| 11 | 8 | from gitdb.util import hex_to_bin | |
| 12 | 9 | ||
| 10 | + from .objects.blob import Blob | ||
| 11 | + from .objects.util import mode_str_to_int | ||
| 12 | + | ||
| 13 | 13 | ||
| 14 | 14 | __all__ = ('Diffable', 'DiffIndex', 'Diff') | |
| 15 | 15 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -8,24 +8,23 @@ | |||
| 8 | 8 | import sys | |
| 9 | 9 | import subprocess | |
| 10 | 10 | import glob | |
| 11 | - from cStringIO import StringIO | ||
| 11 | + from io import StringIO | ||
| 12 | 12 | ||
| 13 | 13 | from stat import S_ISLNK | |
| 14 | 14 | ||
| 15 | - from typ import ( | ||
| 15 | + from .typ import ( | ||
| 16 | 16 | BaseIndexEntry, | |
| 17 | 17 | IndexEntry, | |
| 18 | 18 | ) | |
| 19 | 19 | ||
| 20 | - from util import ( | ||
| 20 | + from .util import ( | ||
| 21 | 21 | TemporaryFileSwap, | |
| 22 | 22 | post_clear_cache, | |
| 23 | 23 | default_index, | |
| 24 | 24 | git_working_dir | |
| 25 | 25 | ) | |
| 26 | 26 | ||
| 27 | 27 | import git.diff as diff | |
| 28 | - | ||
| 29 | 28 | from git.exc import ( | |
| 30 | 29 | GitCommandError, | |
| 31 | 30 | CheckoutError | |
@@ -40,6 +39,7 @@ | |||
| 40 | 39 | ) | |
| 41 | 40 | ||
| 42 | 41 | from git.objects.util import Serializable | |
| 42 | + from git.compat import izip | ||
| 43 | 43 | ||
| 44 | 44 | from git.util import ( | |
| 45 | 45 | LazyMixin, | |
@@ -49,7 +49,7 @@ | |||
| 49 | 49 | to_native_path_linux, | |
| 50 | 50 | ) | |
| 51 | 51 | ||
| 52 | - from fun import ( | ||
| 52 | + from .fun import ( | ||
| 53 | 53 | entry_key, | |
| 54 | 54 | write_cache, | |
| 55 | 55 | read_cache, | |
@@ -62,7 +62,6 @@ | |||
| 62 | 62 | from gitdb.base import IStream | |
| 63 | 63 | from gitdb.db import MemoryDB | |
| 64 | 64 | from gitdb.util import to_bin_sha | |
| 65 | - from itertools import izip | ||
| 66 | 65 | ||
| 67 | 66 | __all__ = ('IndexFile', 'CheckoutError') | |
| 68 | 67 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -12,7 +12,7 @@ | |||
| 12 | 12 | ||
| 13 | 13 | S_IFGITLINK = S_IFLNK | S_IFDIR # a submodule | |
| 14 | 14 | ||
| 15 | - from cStringIO import StringIO | ||
| 15 | + from io import StringIO | ||
| 16 | 16 | ||
| 17 | 17 | from git.util import IndexFileSHA1Writer | |
| 18 | 18 | from git.exc import UnmergedEntriesError | |
@@ -22,15 +22,15 @@ | |||
| 22 | 22 | traverse_trees_recursive | |
| 23 | 23 | ) | |
| 24 | 24 | ||
| 25 | - from typ import ( | ||
| 25 | + from .typ import ( | ||
| 26 | 26 | BaseIndexEntry, | |
| 27 | 27 | IndexEntry, | |
| 28 | 28 | CE_NAMEMASK, | |
| 29 | 29 | CE_STAGESHIFT | |
| 30 | 30 | ) | |
| 31 | 31 | CE_NAMEMASK_INV = ~CE_NAMEMASK | |
| 32 | 32 | ||
| 33 | - from util import ( | ||
| 33 | + from .util import ( | ||
| 34 | 34 | pack, | |
| 35 | 35 | unpack | |
| 36 | 36 | ) | |
@@ -49,7 +49,7 @@ def stat_mode_to_index_mode(mode): | |||
| 49 | 49 | return S_IFLNK | |
| 50 | 50 | if S_ISDIR(mode) or S_IFMT(mode) == S_IFGITLINK: # submodules | |
| 51 | 51 | return S_IFGITLINK | |
| 52 | - return S_IFREG | 0644 | (mode & 0100) # blobs with or without executable bit | ||
| 52 | + return S_IFREG | 0o644 | (mode & 0o100) # blobs with or without executable bit | ||
| 53 | 53 | ||
| 54 | 54 | ||
| 55 | 55 | def write_cache(entries, stream, extension_data=None, ShaStreamCls=IndexFileSHA1Writer): | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,15 +1,14 @@ | |||
| 1 | 1 | """Module with additional types used by the index""" | |
| 2 | 2 | ||
| 3 | - from util import ( | ||
| 3 | + from binascii import b2a_hex | ||
| 4 | + | ||
| 5 | + from .util import ( | ||
| 4 | 6 | pack, | |
| 5 | 7 | unpack | |
| 6 | 8 | ) | |
| 9 | + from git.objects import Blob | ||
| 7 | 10 | ||
| 8 | - from binascii import ( | ||
| 9 | - b2a_hex, | ||
| 10 | - ) | ||
| 11 | 11 | ||
| 12 | - from git.objects import Blob | ||
| 13 | 12 | __all__ = ('BlobFilter', 'BaseIndexEntry', 'IndexEntry') | |
| 14 | 13 | ||
| 15 | 14 | #{ Invariants | |
| Back | FazBrowse Home | New Git URL |
0 commit comments