Skip to content

Commit 7ba867f

Browse files
committed
add back in py2.6
1 parent 730e6b7 commit 7ba867f

File tree

4 files changed

+13
-2
lines changed

4 files changed

+13
-2
lines changed

.travis.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ cache: pip
55

66
matrix:
77
include:
8+
- python: 2.6
9+
env: TOXENV=py26
10+
dist: trusty
811
- python: 2.7
912
env: TOXENV=py27
1013
- python: 3.3

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@
174174
packages=PACKAGES,
175175
package_data=PACKAGE_DATA,
176176
include_package_data=True,
177-
python_requires=">=2.7, !=3.0.*, !=3.1.*, !=3.2.*",
177+
python_requires=">=2.6, !=3.0.*, !=3.1.*, !=3.2.*",
178178
classifiers=CLASSIFIERS,
179179
**setup_kwds
180180
)

src/future/tests/base.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -342,6 +342,10 @@ def _futurize_test_script(self, filename='mytestscript.py', stages=(1, 2),
342342
'----\n%s\n----' % f.read(),
343343
)
344344
ErrorClass = (FuturizeError if 'futurize' in script else PasteurizeError)
345+
346+
if not hasattr(e, 'output'):
347+
# The attribute CalledProcessError.output doesn't exist on Py2.6
348+
e.output = None
345349
raise ErrorClass(msg, e.returncode, e.cmd, output=e.output)
346350
return output
347351

@@ -365,6 +369,9 @@ def _run_test_script(self, filename='mytestscript.py',
365369
fn,
366370
'----\n%s\n----' % f.read(),
367371
)
372+
if not hasattr(e, 'output'):
373+
# The attribute CalledProcessError.output doesn't exist on Py2.6
374+
e.output = None
368375
raise VerboseCalledProcessError(msg, e.returncode, e.cmd, output=e.output)
369376
return output
370377

tox.ini

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
[tox]
2-
envlist = py27,py33,py34,py35,py36,py37
2+
envlist = py26,py27,py33,py34,py35,py36,py37
33

44
[testenv]
55
deps =
66
pytest
77
unittest2
8+
py26: importlib
89
commands = pytest {posargs}

0 commit comments

Comments
 (0)