We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6259873 commit 8d27f0aCopy full SHA for 8d27f0a
setuptools_scm/git.py
@@ -1,9 +1,6 @@
1
from .utils import do_ex, trace, has_command, _normalized
2
from .version import meta
3
-try:
4
- from io import BytesIO
5
-except ImportError:
6
- from cStringIO import StringIO as BytesIO
+import io
7
8
from os.path import isfile, join
9
import subprocess
@@ -124,7 +121,7 @@ def _list_files_in_archive():
124
121
"""List the files that 'git archive' generates.
125
122
"""
126
123
# TarFile wants a seekable stream.
127
- stream = BytesIO(subprocess.check_output(['git', 'archive', 'HEAD']))
+ stream = io.BytesIO(subprocess.check_output(['git', 'archive', 'HEAD']))
128
for name in TarFile(fileobj=stream).getnames():
129
print(name)
130
0 commit comments