From fc1c9cfb3507b38159b9b7809d80e606e4aa9153 Mon Sep 17 00:00:00 2001 From: Thorsten Lockert Date: Thu, 23 Apr 2020 11:52:10 -0700 Subject: [PATCH] Make this properly build, and test on Python 3.8 from_parent() will only take 2 arguments, so make the rest optional when setting them manually. Also add Python 3.8 to platforms we run tests on. Bump version. --- .travis.yml | 2 ++ CHANGELOG | 5 +++++ pytest_flake8.py | 6 +++--- setup.py | 2 +- tox.ini | 3 ++- 5 files changed, 13 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index d93f1e4..125fb76 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,6 +17,8 @@ matrix: env: TOXENV=py36-xdist - python: 3.7 env: TOXENV=py37 + - python: 3.8 + env: TOXENV=py38 - python: pypy2.7-6.0 env: TOXENV=pypy - python: pypy3.5-6.0 diff --git a/CHANGELOG b/CHANGELOG index 892c4e7..51dfe6a 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,8 @@ +1.0.5 +----- + +- Fix deprecation warning; from @jonasundderwolf + 1.0.4 ----- diff --git a/pytest_flake8.py b/pytest_flake8.py index 3a54de1..fd1b352 100644 --- a/pytest_flake8.py +++ b/pytest_flake8.py @@ -93,9 +93,9 @@ class Flake8Error(Exception): class Flake8Item(pytest.Item, pytest.File): - def __init__(self, path, parent, flake8ignore, maxlength, - maxcomplexity, showshource, statistics): - super(Flake8Item, self).__init__(path, parent) + def __init__(self, fspath, parent, flake8ignore=None, maxlength=None, + maxcomplexity=None, showshource=None, statistics=None): + super(Flake8Item, self).__init__(fspath, parent) self._nodeid += "::FLAKE8" self.add_marker("flake8") self.flake8ignore = flake8ignore diff --git a/setup.py b/setup.py index 28669bb..91132c1 100644 --- a/setup.py +++ b/setup.py @@ -6,7 +6,7 @@ setup( name='pytest-flake8', - version='1.0.4', + version='1.0.5', description='pytest plugin to check FLAKE8 requirements', long_description=open("README.rst").read(), classifiers=[ diff --git a/tox.ini b/tox.ini index 582c928..12da49e 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist=py27,py36-pytesttrunk,py36-xdist,py34,py35,py36,py37,pypy,pypy3 +envlist=py27,py36-pytesttrunk,py36-xdist,py34,py35,py36,py37,py38,pypy,pypy3 [testenv] deps=pytest @@ -18,6 +18,7 @@ commands= [pytest] addopts=--flake8 +junit_family=xunit1 [flake8] ignore=E128