Skip to content

Commit b202ec7

Browse files
committed
deps, PY2: retract backports.tempfile dep
1 parent adc35f2 commit b202ec7

File tree

4 files changed

+5
-6
lines changed

4 files changed

+5
-6
lines changed

Diff for: .appveyor.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ install:
5454
)
5555
- pip install nose ddt wheel codecov
5656
- IF "%PYTHON_VERSION%"=="2.7" (
57-
pip install mock contextlib2 backports.tempfile
57+
pip install mock contextlib2
5858
)
5959

6060
## Copied from `init-tests-after-clone.sh`.

Diff for: .travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ install:
1818
- git submodule update --init --recursive
1919
- git fetch --tags
2020
- 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
2222

2323
# generate some reflog as git-python tests need it (in master)
2424
- ./init-tests-after-clone.sh

Diff for: git/test/lib/helper.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,9 @@
2323
try:
2424
from unittest import mock
2525
from contextlib import ExitStack
26-
from tempfile import TemporaryDirectory
2726
except ImportError: # PY2
2827
import mock
2928
from contextlib2 import ExitStack # @UnusedImport
30-
from backports.tempfile import TemporaryDirectory # @UnusedImport
3129

3230

3331
ospd = osp.dirname
@@ -244,7 +242,9 @@ def cleanup_clone(repo):
244242
gc.collect()
245243

246244
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+
248248
clone = repo.clone(clone_dir, **clone_kwargs)
249249
stack.callback(cleanup_clone, clone)
250250

Diff for: requirements.txt

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
gitdb>=0.6.4
22
mock # PY2 only
33
contextlib2 # PY2 only
4-
backports.tempfile # PY2 only

0 commit comments

Comments
 (0)