diff options
| author | Sebastian Thiel <byronimo@gmail.com> | 2014-11-13 09:00:44 +0100 |
|---|---|---|
| committer | Sebastian Thiel <byronimo@gmail.com> | 2014-11-13 09:00:44 +0100 |
| commit | 85dde34bc724570617f3df1cdc40ba1b0942c77e (patch) | |
| tree | 4d60b1dd22a5c78688c437dabe68381bb11c4b1f /gitdb | |
| parent | 81707c606b88e971cc359e3e9f3abeeea2204860 (diff) | |
| download | gitdb-85dde34bc724570617f3df1cdc40ba1b0942c77e.tar.gz | |
Minor adjustments to adapt to changes in async (due to be removed anyway)
Diffstat (limited to 'gitdb')
| -rw-r--r-- | gitdb/__init__.py | 2 | ||||
| -rw-r--r-- | gitdb/base.py | 6 | ||||
| m--------- | gitdb/ext/async | 0 | ||||
| m--------- | gitdb/ext/smmap | 0 | ||||
| -rw-r--r-- | gitdb/fun.py | 2 | ||||
| -rw-r--r-- | gitdb/pack.py | 3 | ||||
| -rw-r--r-- | gitdb/stream.py | 3 | ||||
| -rw-r--r-- | gitdb/test/lib.py | 2 | ||||
| -rw-r--r-- | gitdb/test/test_stream.py | 3 | ||||
| -rw-r--r-- | gitdb/util.py | 23 |
10 files changed, 16 insertions, 28 deletions
diff --git a/gitdb/__init__.py b/gitdb/__init__.py index ff750d1..bb1d13b 100644 --- a/gitdb/__init__.py +++ b/gitdb/__init__.py @@ -27,7 +27,7 @@ _init_externals() __author__ = "Sebastian Thiel" __contact__ = "byronimo@gmail.com" __homepage__ = "https://github.com/gitpython-developers/gitdb" -version_info = (0, 5, 4) +version_info = (0, 5, 5) __version__ = '.'.join(str(i) for i in version_info) diff --git a/gitdb/base.py b/gitdb/base.py index bad5f74..3476d0d 100644 --- a/gitdb/base.py +++ b/gitdb/base.py @@ -3,11 +3,7 @@ # This module is part of GitDB and is released under # the New BSD License: http://www.opensource.org/licenses/bsd-license.php """Module with basic data structures - they are designed to be lightweight and fast""" -from util import ( - bin_to_hex, - zlib - ) - +from util import bin_to_hex from fun import ( type_id_to_type_map, type_to_type_id_map diff --git a/gitdb/ext/async b/gitdb/ext/async -Subproject 90326fb867f94b193c277b07b23e364047e1ed2 +Subproject b930ee15c029860285db60aab4913dc8a9af2cd diff --git a/gitdb/ext/smmap b/gitdb/ext/smmap -Subproject 616e9ceaf917e4d8f3cf2c145401b8069ce307d +Subproject f53ddc686c0d226b2c69cc3732406dd3796932c diff --git a/gitdb/fun.py b/gitdb/fun.py index c1e73e8..177a2fb 100644 --- a/gitdb/fun.py +++ b/gitdb/fun.py @@ -10,7 +10,7 @@ from exc import ( BadObjectType ) -from util import zlib +import zlib decompressobj = zlib.decompressobj import mmap diff --git a/gitdb/pack.py b/gitdb/pack.py index 48121f0..e2673ee 100644 --- a/gitdb/pack.py +++ b/gitdb/pack.py @@ -3,13 +3,14 @@ # This module is part of GitDB and is released under # the New BSD License: http://www.opensource.org/licenses/bsd-license.php """Contains PackIndexFile and PackFile implementations""" +import zlib + from gitdb.exc import ( BadObject, UnsupportedOperation, ParseError ) from util import ( - zlib, mman, LazyMixin, unpack_from, diff --git a/gitdb/stream.py b/gitdb/stream.py index 6441b1e..cbb10c1 100644 --- a/gitdb/stream.py +++ b/gitdb/stream.py @@ -4,7 +4,7 @@ # the New BSD License: http://www.opensource.org/licenses/bsd-license.php from cStringIO import StringIO -import errno +import zlib import mmap import os @@ -23,7 +23,6 @@ from util import ( make_sha, write, close, - zlib ) has_perf_mod = False diff --git a/gitdb/test/lib.py b/gitdb/test/lib.py index ac8473a..af57e46 100644 --- a/gitdb/test/lib.py +++ b/gitdb/test/lib.py @@ -11,8 +11,6 @@ from gitdb.stream import ( ZippedStoreShaWriter ) -from gitdb.util import zlib - import sys import random from array import array diff --git a/gitdb/test/test_stream.py b/gitdb/test/test_stream.py index 6dc2746..d2487f6 100644 --- a/gitdb/test/test_stream.py +++ b/gitdb/test/test_stream.py @@ -18,12 +18,11 @@ from gitdb.util import ( hex_to_bin ) -from gitdb.util import zlib +import zlib from gitdb.typ import ( str_blob_type ) -import time import tempfile import os diff --git a/gitdb/util.py b/gitdb/util.py index 1662b66..75f6bb9 100644 --- a/gitdb/util.py +++ b/gitdb/util.py @@ -7,27 +7,22 @@ import os import mmap import sys import errno - -from cStringIO import StringIO +import stat # in py 2.4, StringIO is only StringI, without write support. # Hence we must use the python implementation for this if sys.version_info[1] < 5: from StringIO import StringIO +else: + from cStringIO import StringIO # END handle python 2.4 -try: - import async.mod.zlib as zlib -except ImportError: - import zlib -# END try async zlib - from async import ThreadPool from smmap import ( - StaticWindowMapManager, - SlidingWindowMapManager, - SlidingWindowMapBuffer - ) + StaticWindowMapManager, + SlidingWindowMapManager, + SlidingWindowMapBuffer + ) # initialize our global memory manager instance # Use it to free cached (and unused) resources. @@ -304,7 +299,7 @@ class LockedFD(object): binary = getattr(os, 'O_BINARY', 0) lockmode = os.O_WRONLY | os.O_CREAT | os.O_EXCL | binary try: - fd = os.open(self._lockfilepath(), lockmode, 0600) + fd = os.open(self._lockfilepath(), lockmode, stat.S_IREAD|stat.S_IWRITE) if not write: os.close(fd) else: @@ -373,7 +368,7 @@ class LockedFD(object): # assure others can at least read the file - the tmpfile left it at rw-- # We may also write that file, on windows that boils down to a remove- # protection as well - chmod(self._filepath, 0644) + chmod(self._filepath, stat.S_IREAD|stat.S_IWRITE|stat.S_IRGRP|stat.S_IROTH) else: # just delete the file so far, we failed os.remove(lockfile) |
