Skip to content

Commit a598f30

Browse files
authored
Merge pull request #88 from hroncok/py38
2 parents a076378 + 1b492f5 commit a598f30

3 files changed

Lines changed: 13 additions & 5 deletions

File tree

.travis.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,13 @@ language: python
22
matrix:
33
include:
44
- python: 3.5
5-
env: TOXENV=py27,py34,py35
5+
env: TOXENV=py27,py35
66
- python: 3.6
77
env: TOXENV=py36
8+
- python: 3.7
9+
env: TOXENV=py37
10+
- python: 3.8-dev
11+
env: TOXENV=py38
812

913
branches:
1014
only:
@@ -35,4 +39,4 @@ notifications:
3539
email: false
3640

3741
sudo: required
38-
dist: trusty
42+
dist: xenial

tests/__init__.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@
66
from os.path import abspath, dirname, join
77
from stat import S_ISREG
88
import tarfile
9+
try:
10+
from stat import filemode
11+
except ImportError: # Python 2
12+
filemode = tarfile.filemode
913

1014
from libarchive import file_reader
1115

@@ -83,7 +87,7 @@ def get_tarinfos(location):
8387
path += '/'
8488
# libarchive introduces prefixes such as h prefix for
8589
# hardlinks: tarfile does not, so we ignore the first char
86-
mode = tarfile.filemode(entry.mode)[1:]
90+
mode = filemode(entry.mode)[1:]
8791
yield {
8892
'path': path,
8993
'mtime': entry.mtime,

tox.ini

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
[tox]
2-
envlist=py27,py34,py35,py36
2+
envlist=py27,py35,py36,py37,py38
33
skipsdist=True
44

55
[testenv]
66
passenv = LIBARCHIVE
77
commands=
8-
python -m pytest -vv --boxed --cov libarchive --cov-report term-missing {toxinidir}/tests {posargs}
8+
python -m pytest -Wd -vv --boxed --cov libarchive --cov-report term-missing {toxinidir}/tests {posargs}
99
flake8 {toxinidir}
1010
deps=
1111
flake8

0 commit comments

Comments
 (0)