Skip to content

Commit

Permalink
deps, PY2: retract backports.tempfile dep
Browse files Browse the repository at this point in the history
  • Loading branch information
ankostis committed Oct 12, 2016
1 parent adc35f2 commit b202ec7
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ install:
)
- pip install nose ddt wheel codecov
- IF "%PYTHON_VERSION%"=="2.7" (
pip install mock contextlib2 backports.tempfile
pip install mock contextlib2
)

## Copied from `init-tests-after-clone.sh`.
Expand Down
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ install:
- git submodule update --init --recursive
- git fetch --tags
- pip install codecov flake8 ddt sphinx
- if [ "$TRAVIS_PYTHON_VERSION" == '2.7' ]; then pip install mock contextlib2 backports.tempfile; fi
- if [ "$TRAVIS_PYTHON_VERSION" == '2.7' ]; then pip install mock contextlib2; fi

# generate some reflog as git-python tests need it (in master)
- ./init-tests-after-clone.sh
Expand Down
6 changes: 3 additions & 3 deletions git/test/lib/helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,9 @@
try:
from unittest import mock
from contextlib import ExitStack
from tempfile import TemporaryDirectory
except ImportError: # PY2
import mock
from contextlib2 import ExitStack # @UnusedImport
from backports.tempfile import TemporaryDirectory # @UnusedImport


ospd = osp.dirname
Expand Down Expand Up @@ -244,7 +242,9 @@ def cleanup_clone(repo):
gc.collect()

with ExitStack() as stack:
clone_dir = stack.enter_context(TemporaryDirectory(prefix=clone_prefix))
clone_dir = tempfile.mkdtemp(prefix=clone_prefix)
stack.callback(rmtree, clone_dir)

clone = repo.clone(clone_dir, **clone_kwargs)
stack.callback(cleanup_clone, clone)

Expand Down
1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
gitdb>=0.6.4
mock # PY2 only
contextlib2 # PY2 only
backports.tempfile # PY2 only

0 comments on commit b202ec7

Please sign in to comment.