From 9647dee4ea7be8b632a6578c819de2a4d8b2e6b6 Mon Sep 17 00:00:00 2001 From: Carson Gee Date: Thu, 5 Oct 2023 18:05:22 -0600 Subject: [PATCH 1/5] Corrected invocation for tests --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 9fbb084..56d0560 100644 --- a/tox.ini +++ b/tox.ini @@ -23,7 +23,7 @@ deps = pytestmain: git+https://github.com/pytest-dev/pytest.git@main#egg=pytest coverage commands = - coverage run -m py.test {posargs} + coverage run -m pytest {posargs} [testenv:coverage] depends = py3{7, 8, 9, 10, 11}-pylint{215, latest, main}-pytest{71, latest, main} From c123f5d9b9ac4483325203b3217799860bb5ee5d Mon Sep 17 00:00:00 2001 From: Carson Gee Date: Thu, 5 Oct 2023 18:42:26 -0600 Subject: [PATCH 2/5] Maintenance updates --- .github/workflows/tests.yml | 4 ++-- pytest_pylint/plugin.py | 1 + pytest_pylint/pylint_util.py | 2 -- setup.py | 2 +- tox.ini | 7 ++++--- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 6c99f08..97b182b 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -9,11 +9,11 @@ jobs: fail-fast: false matrix: python-version: - - "3.7" - "3.8" - "3.9" - "3.10" - - "3.11.0-rc - 3.11" + - "3.11" + - "3.12.0-rc - 3.12" steps: - uses: actions/checkout@v3 diff --git a/pytest_pylint/plugin.py b/pytest_pylint/plugin.py index 7cc751d..b193cd9 100644 --- a/pytest_pylint/plugin.py +++ b/pytest_pylint/plugin.py @@ -391,4 +391,5 @@ def repr_failure(self, excinfo, style=None): def reportinfo(self): """Generate our test report""" + # pylint: disable=no-member return self.fspath, None, f"[pylint] {self.parent.rel_path}" diff --git a/pytest_pylint/pylint_util.py b/pytest_pylint/pylint_util.py index d78f2c9..954acda 100644 --- a/pytest_pylint/pylint_util.py +++ b/pytest_pylint/pylint_util.py @@ -2,14 +2,12 @@ """Pylint reporter classes.""" import sys -from pylint.interfaces import IReporter from pylint.reporters import BaseReporter class ProgrammaticReporter(BaseReporter): """Reporter that replaces output with storage in list of dictionaries""" - __implements__ = IReporter extension = "prog" def __init__(self, output=None): diff --git a/setup.py b/setup.py index 748a511..873f065 100644 --- a/setup.py +++ b/setup.py @@ -30,10 +30,10 @@ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", - "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", ], ) diff --git a/tox.ini b/tox.ini index 56d0560..f21af41 100644 --- a/tox.ini +++ b/tox.ini @@ -1,8 +1,8 @@ [tox] envlist = - py3{7, 8, 9}-pylint{23}-pytest{54} - py3{7, 8, 9, 10}-pylint{213, 214}-pytest{71} - py3{7, 8, 9, 10, 11}-pylint{215, latest, main}-pytest{71, latest, main} + py3{8, 9}-pylint{23, 30}-pytest{54} + py3{8, 9, 10}-pylint{213, 214, 30}-pytest{71} + py3{8, 9, 10, 11, 12}-pylint{215, latest, main}-pytest{71, latest, main} coverage qa skip_missing_interpreters = true @@ -10,6 +10,7 @@ skip_missing_interpreters = true [testenv] usedevelop = true deps = + pylint30: pylint~=3.0 pylint23: pylint~=2.3.1 pylint213: pylint~=2.13.9 pylint214: pylint~=2.14.5 From c00b71dcca9fa5fe06cba2a4e3f194d3f428df0d Mon Sep 17 00:00:00 2001 From: Carson Gee Date: Thu, 5 Oct 2023 19:32:06 -0600 Subject: [PATCH 3/5] Temporarily dropping pytest main as I know it breaks this, will upgrade in next release --- pytest_pylint/plugin.py | 1 + setup.py | 2 +- tox.ini | 9 ++++----- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pytest_pylint/plugin.py b/pytest_pylint/plugin.py index b193cd9..a5c1b0a 100644 --- a/pytest_pylint/plugin.py +++ b/pytest_pylint/plugin.py @@ -111,6 +111,7 @@ def pytest_configure(self, config): try: pylintrc_file = next(pylint_config.find_default_config_files(), None) except AttributeError: + # pylint: disable=no-member pylintrc_file = pylint_config.PYLINTRC if pylintrc_file and not exists(pylintrc_file): diff --git a/setup.py b/setup.py index 873f065..208e3de 100644 --- a/setup.py +++ b/setup.py @@ -23,7 +23,7 @@ packages=["pytest_pylint"], entry_points={"pytest11": ["pylint = pytest_pylint.plugin"]}, python_requires=">=3.7", - install_requires=["pytest>=5.4", "pylint>=2.3.0", "toml>=0.7.1"], + install_requires=["pytest>=5.4,<8.0", "pylint>=2.3.0", "toml>=0.7.1"], setup_requires=["pytest-runner"], tests_require=["coverage", "flake8", "black", "isort"], classifiers=[ diff --git a/tox.ini b/tox.ini index f21af41..a42e66e 100644 --- a/tox.ini +++ b/tox.ini @@ -1,8 +1,8 @@ [tox] envlist = - py3{8, 9}-pylint{23, 30}-pytest{54} + py3{8, 9}-pylint{26, 30}-pytest{54} py3{8, 9, 10}-pylint{213, 214, 30}-pytest{71} - py3{8, 9, 10, 11, 12}-pylint{215, latest, main}-pytest{71, latest, main} + py3{8, 9, 10, 11, 12}-pylint{215, latest, main}-pytest{71, latest} coverage qa skip_missing_interpreters = true @@ -11,15 +11,14 @@ skip_missing_interpreters = true usedevelop = true deps = pylint30: pylint~=3.0 - pylint23: pylint~=2.3.1 + pylint26: pylint~=2.6.0 pylint213: pylint~=2.13.9 pylint214: pylint~=2.14.5 pylint215: pylint~=2.15.0 pylintlatest: pylint pylintmain: git+https://github.com/PyCQA/pylint.git@main#egg=pylint pylintmain: git+https://github.com/PyCQA/astroid.git@main#egg=astroid - pytest54: pytest~=5.4.3 - pytest71: pytest~=7.1.2 + pytest7: pytest~=7.1.2 pytestlatest: pytest pytestmain: git+https://github.com/pytest-dev/pytest.git@main#egg=pytest coverage From 84fd4c4ca9e2b90f0deb15292b78bb2e321e19c2 Mon Sep 17 00:00:00 2001 From: Carson Gee Date: Thu, 5 Oct 2023 19:42:57 -0600 Subject: [PATCH 4/5] Added pylint disable for setuptools --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 208e3de..a89e0d0 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ Plugin for py.test for doing pylint tests """ - +# pylint: disable=import-error from setuptools import setup with open("README.rst", encoding="utf-8") as f: From 64601e0aee8be334be06c80d57d26a83d91af17b Mon Sep 17 00:00:00 2001 From: Carson Gee Date: Thu, 5 Oct 2023 19:50:12 -0600 Subject: [PATCH 5/5] Corrected version of pylint that works with Python 3.12 --- tox.ini | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index a42e66e..4fe59f6 100644 --- a/tox.ini +++ b/tox.ini @@ -2,7 +2,8 @@ envlist = py3{8, 9}-pylint{26, 30}-pytest{54} py3{8, 9, 10}-pylint{213, 214, 30}-pytest{71} - py3{8, 9, 10, 11, 12}-pylint{215, latest, main}-pytest{71, latest} + py3{8, 9, 10, 11}-pylint{215, latest, main}-pytest{71, latest} + py3{12}-pylint{latest, main}-pytest{71, latest} coverage qa skip_missing_interpreters = true