File tree 3 files changed +9
-2
lines changed 3 files changed +9
-2
lines changed Original file line number Diff line number Diff line change 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
6
import contextlib
7
- from functools import wraps , lru_cache
7
+ from functools import wraps
8
8
import getpass
9
9
import logging
10
10
import os
18
18
from unittest import SkipTest
19
19
except ImportError :
20
20
from unittest2 import SkipTest
21
+ try :
22
+ from functools import lru_cache
23
+ except ImportError :
24
+ from repoze .lru import lru_cache
21
25
22
26
from gitdb .util import (# NOQA @IgnorePep8
23
27
make_sha ,
@@ -286,7 +290,7 @@ def _cyg_regex_path(drive, path):
286
290
)
287
291
288
292
289
- @lru_cache ()
293
+ @lru_cache (500 ) # Sice arg required only for py3.2 backport `repoze.lru` lib.
290
294
def cygpath (path ):
291
295
"""Use :meth:`git.cmd.Git.polish_url()` instead, that works on any environment."""
292
296
for regex , parser , recurse in _cygpath_parsers :
Original file line number Diff line number Diff line change 1
1
gitdb >= 0.6.4
2
2
ddt >= 1.1.1
3
+ ordereddict ; python_version < '2.7'
4
+ repoze.lru ; python_version < '3.2'
3
5
unittest2 ; python_version < '2.7'
Original file line number Diff line number Diff line change @@ -68,6 +68,7 @@ def _stamp_version(filename):
68
68
install_requires = ['gitdb2 >= 2.0.0' ]
69
69
extras_require = {
70
70
':python_version == "2.6"' : ['ordereddict' ],
71
+ ':python_version < "3.2"' : ['repoze.lru' ],
71
72
}
72
73
test_requires = ['ddt>=1.1.1' ]
73
74
if sys .version_info [:2 ] < (2 , 7 ):
You can’t perform that action at this time.
0 commit comments