File tree 4 files changed +5
-6
lines changed
4 files changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ install:
54
54
)
55
55
- pip install nose ddt wheel codecov
56
56
- IF "%PYTHON_VERSION%"=="2.7" (
57
- pip install mock contextlib2 backports.tempfile
57
+ pip install mock contextlib2
58
58
)
59
59
60
60
# # Copied from `init-tests-after-clone.sh`.
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ install:
18
18
- git submodule update --init --recursive
19
19
- git fetch --tags
20
20
- pip install codecov flake8 ddt sphinx
21
- - if [ "$TRAVIS_PYTHON_VERSION" == '2.7' ]; then pip install mock contextlib2 backports.tempfile ; fi
21
+ - if [ "$TRAVIS_PYTHON_VERSION" == '2.7' ]; then pip install mock contextlib2; fi
22
22
23
23
# generate some reflog as git-python tests need it (in master)
24
24
- ./init-tests-after-clone.sh
Original file line number Diff line number Diff line change 23
23
try :
24
24
from unittest import mock
25
25
from contextlib import ExitStack
26
- from tempfile import TemporaryDirectory
27
26
except ImportError : # PY2
28
27
import mock
29
28
from contextlib2 import ExitStack # @UnusedImport
30
- from backports .tempfile import TemporaryDirectory # @UnusedImport
31
29
32
30
33
31
ospd = osp .dirname
@@ -244,7 +242,9 @@ def cleanup_clone(repo):
244
242
gc .collect ()
245
243
246
244
with ExitStack () as stack :
247
- clone_dir = stack .enter_context (TemporaryDirectory (prefix = clone_prefix ))
245
+ clone_dir = tempfile .mkdtemp (prefix = clone_prefix )
246
+ stack .callback (rmtree , clone_dir )
247
+
248
248
clone = repo .clone (clone_dir , ** clone_kwargs )
249
249
stack .callback (cleanup_clone , clone )
250
250
Original file line number Diff line number Diff line change 1
1
gitdb >= 0.6.4
2
2
mock # PY2 only
3
3
contextlib2 # PY2 only
4
- backports.tempfile # PY2 only
You can’t perform that action at this time.
0 commit comments