File tree Expand file tree Collapse file tree 3 files changed +9
-2
lines changed
Expand file tree Collapse file tree 3 files changed +9
-2
lines changed Original file line number Diff line number Diff line change 44# This module is part of GitPython and is released under
55# the BSD License: http://www.opensource.org/licenses/bsd-license.php
66import contextlib
7- from functools import wraps , lru_cache
7+ from functools import wraps
88import getpass
99import logging
1010import os
1818 from unittest import SkipTest
1919except ImportError :
2020 from unittest2 import SkipTest
21+ try :
22+ from functools import lru_cache
23+ except ImportError :
24+ from repoze .lru import lru_cache
2125
2226from gitdb .util import (# NOQA @IgnorePep8
2327 make_sha ,
@@ -286,7 +290,7 @@ def _cyg_regex_path(drive, path):
286290)
287291
288292
289- @lru_cache ()
293+ @lru_cache (500 ) # Sice arg required only for py3.2 backport `repoze.lru` lib.
290294def cygpath (path ):
291295 """Use :meth:`git.cmd.Git.polish_url()` instead, that works on any environment."""
292296 for regex , parser , recurse in _cygpath_parsers :
Original file line number Diff line number Diff line change 11gitdb >= 0.6.4
22ddt >= 1.1.1
3+ ordereddict ; python_version < '2.7'
4+ repoze.lru ; python_version < '3.2'
35unittest2 ; python_version < '2.7'
Original file line number Diff line number Diff line change @@ -68,6 +68,7 @@ def _stamp_version(filename):
6868install_requires = ['gitdb2 >= 2.0.0' ]
6969extras_require = {
7070 ':python_version == "2.6"' : ['ordereddict' ],
71+ ':python_version < "3.2"' : ['repoze.lru' ],
7172}
7273test_requires = ['ddt>=1.1.1' ]
7374if sys .version_info [:2 ] < (2 , 7 ):
You can’t perform that action at this time.
0 commit comments