From 245d147d50084f308ffd320b6cfdba6d405a56a1 Mon Sep 17 00:00:00 2001 From: Pierre Sassoulas Date: Sat, 4 Nov 2023 10:21:30 +0100 Subject: [PATCH 01/14] Move everything from the setup.cfg to pyproject.toml --- pyproject.toml | 2 ++ setup.cfg | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) delete mode 100644 setup.cfg diff --git a/pyproject.toml b/pyproject.toml index 9f4abc8..b7da82b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,4 +1,6 @@ # Only a configuration storage, for now +[tool.aliases] +test = "pytest" [tool.black] line-length = 100 diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index 31ad82b..0000000 --- a/setup.cfg +++ /dev/null @@ -1,2 +0,0 @@ -[aliases] -test = pytest From bc95dc147edbbd9d7482b763aff185ef913e0296 Mon Sep 17 00:00:00 2001 From: Pierre Sassoulas Date: Sun, 15 Oct 2023 11:08:14 +0200 Subject: [PATCH 02/14] Drop python 3.6 and 3.7 https://github.com/pylint-dev/pylint-pytest/pull/8#issuecomment-1763326663 --- .github/workflows/run-tests.yaml | 13 ++----------- CHANGELOG.md | 4 ++++ setup.py | 4 +--- tox.ini | 2 +- 4 files changed, 8 insertions(+), 15 deletions(-) diff --git a/.github/workflows/run-tests.yaml b/.github/workflows/run-tests.yaml index 656f11f..76fa960 100644 --- a/.github/workflows/run-tests.yaml +++ b/.github/workflows/run-tests.yaml @@ -20,20 +20,11 @@ jobs: - windows-latest - macos-latest python-version: - - '3.6' - - '3.7' - '3.8' - '3.9' - '3.10' - '3.11' - # - '3.12' # FixMe: https://github.com/pylint-dev/pylint-pytest/issues/3 - # Python 3.6 is not available in `ubuntu-latest`. - exclude: - - python-version: '3.6' - os: ubuntu-latest - include: - - python-version: '3.6' - os: ubuntu-20.04 +# - '3.12' # FixMe: https://github.com/pylint-dev/pylint-pytest/issues/3 defaults: run: @@ -61,7 +52,7 @@ jobs: env: FORCE_COLOR: 1 PYTEST_CI_ARGS: --cov-report=xml --cov-report=html --junitxml=test_artifacts/test_report.xml --color=yes - run: tox ${{ matrix.python-version == '3.6' && '--skip-missing-interpreters=true' || '' }} + run: tox --skip-missing-interpreters=true - name: Upload coverage reports to Codecov uses: codecov/codecov-action@v3 diff --git a/CHANGELOG.md b/CHANGELOG.md index 6a62d64..e196357 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ## [Unreleased] +### Removed + +- Support for Python 3.6 & 3.7 (#23) + ## [1.1.3] - 2023-10-23 This is the first release after maintenance was assumed by https://github.com/stdedos. diff --git a/setup.py b/setup.py index f30541f..82b45f9 100755 --- a/setup.py +++ b/setup.py @@ -31,7 +31,7 @@ "pylint<3", "pytest>=4.6", ], - python_requires=">=3.6", + python_requires=">=3.8", classifiers=[ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", @@ -39,8 +39,6 @@ "Topic :: Software Development :: Quality Assurance", "Programming Language :: Python", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", diff --git a/tox.ini b/tox.ini index 09dd02e..3430831 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py36,py37,py38,py39,py310,py311 +envlist = py38,py39,py310,py311 skipsdist = True passenv = FORCE_COLOR From bdb3ff73821c05b9e789e1b0321eeb7874064311 Mon Sep 17 00:00:00 2001 From: Pierre Sassoulas Date: Sat, 4 Nov 2023 11:12:50 +0100 Subject: [PATCH 03/14] Upgrade python version to python 3.8 in tooling configuration Co-authored-by: Irtaza Akram --- pyproject.toml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index b7da82b..c39b4e3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -38,7 +38,7 @@ paths.source = [ ] [tool.mypy] -python_version = "3.7" +python_version = "3.8" check_untyped_defs = true explicit_package_bases = true namespace_packages = true @@ -91,8 +91,7 @@ ignore = [ "RUF012", # Mutable class attributes should be annotated with `typing.ClassVar` ] -# py36, but ruff does not support it :/ -target-version = "py37" +target-version = "py38" [tool.ruff.pydocstyle] convention = "google" @@ -115,7 +114,7 @@ convention = "google" [tool.pylint] -py-version = "3.6" +py-version = "3.8" ignore-paths="tests/input" # Ignore test inputs From e0526a8015d32b0f64e8dda7586609f465e13e46 Mon Sep 17 00:00:00 2001 From: Pierre Sassoulas Date: Sat, 4 Nov 2023 11:11:03 +0100 Subject: [PATCH 04/14] Add python 3.12 and pylint 3.0 compatibility Co-authored-by: Irtaza Akram Co-authored-by: Stavros Ntentos <133706+stdedos@users.noreply.github.com> --- .github/workflows/run-tests.yaml | 7 +++++-- CHANGELOG.md | 5 +++++ pylint_pytest/checkers/class_attr_loader.py | 2 -- pylint_pytest/checkers/fixture.py | 2 -- pyproject.toml | 2 -- setup.py | 3 ++- tests/base_tester.py | 4 +--- tox.ini | 2 +- 8 files changed, 14 insertions(+), 13 deletions(-) diff --git a/.github/workflows/run-tests.yaml b/.github/workflows/run-tests.yaml index 76fa960..40415aa 100644 --- a/.github/workflows/run-tests.yaml +++ b/.github/workflows/run-tests.yaml @@ -24,7 +24,7 @@ jobs: - '3.9' - '3.10' - '3.11' -# - '3.12' # FixMe: https://github.com/pylint-dev/pylint-pytest/issues/3 + - '3.12' defaults: run: @@ -52,7 +52,10 @@ jobs: env: FORCE_COLOR: 1 PYTEST_CI_ARGS: --cov-report=xml --cov-report=html --junitxml=test_artifacts/test_report.xml --color=yes - run: tox --skip-missing-interpreters=true + run: | + TOX_ENV=$(echo "py${{ matrix.python-version }}" | tr -d .) + tox -e $TOX_ENV + shell: bash - name: Upload coverage reports to Codecov uses: codecov/codecov-action@v3 diff --git a/CHANGELOG.md b/CHANGELOG.md index e196357..ea52506 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,11 @@ ## [Unreleased] +### Added + +- Support for Python 3.12 (#24) +- Support for Pylint 3 (#24) + ### Removed - Support for Python 3.6 & 3.7 (#23) diff --git a/pylint_pytest/checkers/class_attr_loader.py b/pylint_pytest/checkers/class_attr_loader.py index 6c9b4e9..40d16cf 100644 --- a/pylint_pytest/checkers/class_attr_loader.py +++ b/pylint_pytest/checkers/class_attr_loader.py @@ -1,14 +1,12 @@ from typing import Optional, Set from astroid import Assign, Attribute, ClassDef, Name -from pylint.interfaces import IAstroidChecker from ..utils import _can_use_fixture, _is_class_autouse_fixture from . import BasePytestChecker class ClassAttrLoader(BasePytestChecker): - __implements__ = IAstroidChecker msgs = {"E6400": ("", "pytest-class-attr-loader", "")} in_setup = False diff --git a/pylint_pytest/checkers/fixture.py b/pylint_pytest/checkers/fixture.py index 32ec894..374b8a4 100644 --- a/pylint_pytest/checkers/fixture.py +++ b/pylint_pytest/checkers/fixture.py @@ -8,7 +8,6 @@ import pylint import pytest from pylint.checkers.variables import VariablesChecker -from pylint.interfaces import IAstroidChecker from ..utils import ( _can_use_fixture, @@ -42,7 +41,6 @@ def pytest_collectreport(self, report): class FixtureChecker(BasePytestChecker): - __implements__ = IAstroidChecker msgs = { "W6401": ( "Using a deprecated @pytest.yield_fixture decorator", diff --git a/pyproject.toml b/pyproject.toml index c39b4e3..18cc087 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -124,13 +124,11 @@ load-plugins= [ "pylint.extensions.broad_try_clause", "pylint.extensions.check_elif", "pylint.extensions.code_style", - "pylint.extensions.comparetozero", "pylint.extensions.comparison_placement", "pylint.extensions.confusing_elif", # "pylint.extensions.consider_ternary_expression", # Not a pretty refactoring "pylint.extensions.docparams", "pylint.extensions.docstyle", - "pylint.extensions.emptystring", "pylint.extensions.eq_without_hash", "pylint.extensions.for_any_all", "pylint.extensions.mccabe", diff --git a/setup.py b/setup.py index 82b45f9..821cd3b 100755 --- a/setup.py +++ b/setup.py @@ -28,7 +28,7 @@ long_description_content_type="text/markdown", packages=find_packages(exclude=["tests*", "sandbox"]), install_requires=[ - "pylint<3", + "pylint<4", "pytest>=4.6", ], python_requires=">=3.8", @@ -43,6 +43,7 @@ "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", "Programming Language :: Python :: Implementation :: CPython", "Operating System :: OS Independent", "License :: OSI Approved :: MIT License", diff --git a/tests/base_tester.py b/tests/base_tester.py index 12d2e63..38853c8 100644 --- a/tests/base_tester.py +++ b/tests/base_tester.py @@ -70,13 +70,11 @@ def setup_method(self): self.impacted_checkers = [] for key, value in self.CONFIG.items(): - setattr(self.checker.config, key, value) + setattr(self.linter.config, key, value) self.checker.open() for checker_class in self.IMPACTED_CHECKER_CLASSES: checker = checker_class(self.linter) - for key, value in self.CONFIG.items(): - setattr(checker.config, key, value) checker.open() self.impacted_checkers.append(checker) diff --git a/tox.ini b/tox.ini index 3430831..cd8467c 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py38,py39,py310,py311 +envlist = py{38,39,310,311,312} skipsdist = True passenv = FORCE_COLOR From c7fc5222d60b072c7a64d05992e3c82464a68990 Mon Sep 17 00:00:00 2001 From: Pierre Sassoulas Date: Sat, 4 Nov 2023 12:57:27 +0100 Subject: [PATCH 05/14] [pyproject.toml] Move project informations from setup.py --- pyproject.toml | 44 +++++++++++++++++++++++++++++++++++++++++++- setup.py | 47 ----------------------------------------------- 2 files changed, 43 insertions(+), 48 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 18cc087..7609522 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,4 +1,46 @@ -# Only a configuration storage, for now +[project] +name = "pylint-pytest" +version = "1.1.3" +authors = [ + {name = "Reverb Chu"}, +] +maintainers = [ + {name = "Stavros Ntentos", email = "133706+stdedos@users.noreply.github.com"}, + {name = "Pierre Sassoulas", email = "pierre.sassoulas@gmail.com"}, +] +description = "A Pylint plugin to suppress pytest-related false positives." +readme = "README.md" +license = "MIT" +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Intended Audience :: Developers", + "Topic :: Software Development :: Testing", + "Topic :: Software Development :: Quality Assurance", + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "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", + "Programming Language :: Python :: Implementation :: CPython", + "Operating System :: OS Independent", +] +keywords = ["pylint", "pytest", "plugin"] +requires-python = ">=3.8" + +dependencies = [ + "pylint<3", + "pytest>=4.6" +] + +[project.urls] +"Changelog"="https://github.com/pylint-dev/pylint-pytest/blob/master/CHANGELOG.md" +"Documentation"="https://github.com/pylint-dev/pylint-pytest#readme" +"Say Thanks!"="https://saythanks.io/to/stdedos" +"Source"="https://github.com/pylint-dev/pylint-pytest" +"Tracker"="https://github.com/pylint-dev/pylint-pytest/issues" + [tool.aliases] test = "pytest" diff --git a/setup.py b/setup.py index 821cd3b..84d2a9c 100755 --- a/setup.py +++ b/setup.py @@ -1,53 +1,6 @@ -#!/usr/bin/env python - -from os import path - from setuptools import find_packages, setup -here = path.abspath(path.dirname(__file__)) -with open(path.join(here, "README.md")) as fin: - long_description = fin.read() - - setup( - name="pylint-pytest", - version="1.1.3", - author="Stavros Ntentos", - author_email="133706+stdedos@users.noreply.github.com", - license="MIT", - url="https://github.com/pylint-dev/pylint-pytest", - project_urls={ - "Changelog": "https://github.com/pylint-dev/pylint-pytest/blob/master/CHANGELOG.md", - "Documentation": "https://github.com/pylint-dev/pylint-pytest#readme", - "Say Thanks!": "https://saythanks.io/to/stdedos", - "Source": "https://github.com/pylint-dev/pylint-pytest", - "Tracker": "https://github.com/pylint-dev/pylint-pytest/issues", - }, - description="A Pylint plugin to suppress pytest-related false positives.", - long_description=long_description, - long_description_content_type="text/markdown", packages=find_packages(exclude=["tests*", "sandbox"]), - install_requires=[ - "pylint<4", - "pytest>=4.6", - ], - python_requires=">=3.8", - classifiers=[ - "Development Status :: 5 - Production/Stable", - "Intended Audience :: Developers", - "Topic :: Software Development :: Testing", - "Topic :: Software Development :: Quality Assurance", - "Programming Language :: Python", - "Programming Language :: Python :: 3", - "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", - "Programming Language :: Python :: Implementation :: CPython", - "Operating System :: OS Independent", - "License :: OSI Approved :: MIT License", - ], tests_require=["pytest", "pytest-cov", "pylint"], - keywords=["pylint", "pytest", "plugin"], ) From dda8a03ac3b856397e5383530907b879c58215c3 Mon Sep 17 00:00:00 2001 From: Pierre Sassoulas Date: Sat, 4 Nov 2023 12:59:33 +0100 Subject: [PATCH 06/14] [pyproject.toml] Define the license using setuptools as builder --- pyproject.toml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 7609522..c8c0401 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,10 @@ +[build-system] +requires = ["setuptools>=66.1"] +build-backend = "setuptools.build_meta" + +[tool.setuptools] +license-files = ["LICENSE"] + [project] name = "pylint-pytest" version = "1.1.3" @@ -10,7 +17,6 @@ maintainers = [ ] description = "A Pylint plugin to suppress pytest-related false positives." readme = "README.md" -license = "MIT" classifiers = [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", From 246232c7a778d37366724bd7470d0dd9df91939f Mon Sep 17 00:00:00 2001 From: Pierre Sassoulas Date: Sat, 4 Nov 2023 13:03:34 +0100 Subject: [PATCH 07/14] [pyproject.toml] Move the exclusion from setup.py --- pyproject.toml | 3 +++ setup.py | 3 +-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index c8c0401..6621305 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,6 +5,9 @@ build-backend = "setuptools.build_meta" [tool.setuptools] license-files = ["LICENSE"] +[tool.setuptools.packages.find] +exclude=["tests*", "sandbox"] + [project] name = "pylint-pytest" version = "1.1.3" diff --git a/setup.py b/setup.py index 84d2a9c..d393410 100755 --- a/setup.py +++ b/setup.py @@ -1,6 +1,5 @@ -from setuptools import find_packages, setup +from setuptools import setup setup( - packages=find_packages(exclude=["tests*", "sandbox"]), tests_require=["pytest", "pytest-cov", "pylint"], ) From 3cbbfc6bec027c6dfdf4dc80265c7c84c7ee24b7 Mon Sep 17 00:00:00 2001 From: Pierre Sassoulas Date: Sat, 4 Nov 2023 13:06:15 +0100 Subject: [PATCH 08/14] [pyproject.toml] Migrate from test_requires to optional extra 'test' See https://stackoverflow.com/a/58826468/2519059 --- pyproject.toml | 6 ++++++ setup.py | 4 +--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 6621305..48bdd48 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -43,6 +43,12 @@ dependencies = [ "pytest>=4.6" ] +[project.optional-dependencies] +test = [ + "pytest", + "pytest-cov", +] + [project.urls] "Changelog"="https://github.com/pylint-dev/pylint-pytest/blob/master/CHANGELOG.md" "Documentation"="https://github.com/pylint-dev/pylint-pytest#readme" diff --git a/setup.py b/setup.py index d393410..6068493 100755 --- a/setup.py +++ b/setup.py @@ -1,5 +1,3 @@ from setuptools import setup -setup( - tests_require=["pytest", "pytest-cov", "pylint"], -) +setup() From 37aea8bb7642459242c32b96acb65085693be0cc Mon Sep 17 00:00:00 2001 From: Stavros Ntentos <133706+stdedos@users.noreply.github.com> Date: Thu, 19 Oct 2023 11:39:15 +0300 Subject: [PATCH 09/14] Revert "Roll back `from __future__ import annotations` for Python 3.6" This reverts commit b8ce4adaade3031a11368a7ec2e5da067531b5f3. Signed-off-by: Stavros Ntentos <133706+stdedos@users.noreply.github.com> --- pylint_pytest/checkers/class_attr_loader.py | 6 +++--- pylint_pytest/checkers/fixture.py | 11 ++++++----- pylint_pytest/checkers/types.py | 2 ++ tests/base_tester.py | 7 ++++--- tests/base_tester_test.py | 2 +- 5 files changed, 16 insertions(+), 12 deletions(-) diff --git a/pylint_pytest/checkers/class_attr_loader.py b/pylint_pytest/checkers/class_attr_loader.py index 40d16cf..fdd8339 100644 --- a/pylint_pytest/checkers/class_attr_loader.py +++ b/pylint_pytest/checkers/class_attr_loader.py @@ -1,4 +1,4 @@ -from typing import Optional, Set +from __future__ import annotations from astroid import Assign, Attribute, ClassDef, Name @@ -10,8 +10,8 @@ class ClassAttrLoader(BasePytestChecker): msgs = {"E6400": ("", "pytest-class-attr-loader", "")} in_setup = False - request_cls: Set[str] = set() - class_node: Optional[ClassDef] = None + request_cls: set[str] = set() + class_node: ClassDef | None = None def visit_functiondef(self, node): """determine if a method is a class setup method""" diff --git a/pylint_pytest/checkers/fixture.py b/pylint_pytest/checkers/fixture.py index 86dd5bb..5b13360 100644 --- a/pylint_pytest/checkers/fixture.py +++ b/pylint_pytest/checkers/fixture.py @@ -1,8 +1,9 @@ +from __future__ import annotations + import fnmatch import io import sys from pathlib import Path -from typing import Set, Tuple import astroid import pytest @@ -19,7 +20,7 @@ from .types import FixtureDict, replacement_add_message # TODO: support pytest python_files configuration -FILE_NAME_PATTERNS: Tuple[str, ...] = ("test_*.py", "*_test.py") +FILE_NAME_PATTERNS: tuple[str, ...] = ("test_*.py", "*_test.py") ARGUMENT_ARE_KEYWORD_ONLY = ( "https://docs.pytest.org/en/stable/deprecations.html#pytest-fixture-arguments-are-keyword-only" ) @@ -28,7 +29,7 @@ class FixtureCollector: # Same as ``_pytest.fixtures.FixtureManager._arg2fixturedefs``. fixtures: FixtureDict = {} - errors: Set[pytest.CollectReport] = set() + errors: set[pytest.CollectReport] = set() def pytest_sessionfinish(self, session): # pylint: disable=protected-access @@ -76,9 +77,9 @@ class FixtureChecker(BasePytestChecker): # Store all fixtures discovered by pytest session _pytest_fixtures: FixtureDict = {} # Stores all used function arguments - _invoked_with_func_args: Set[str] = set() + _invoked_with_func_args: set[str] = set() # Stores all invoked fixtures through @pytest.mark.usefixture(...) - _invoked_with_usefixtures: Set[str] = set() + _invoked_with_usefixtures: set[str] = set() _original_add_message = replacement_add_message def open(self): diff --git a/pylint_pytest/checkers/types.py b/pylint_pytest/checkers/types.py index c4c43e8..7fd5708 100644 --- a/pylint_pytest/checkers/types.py +++ b/pylint_pytest/checkers/types.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import sys from pprint import pprint from typing import Any, Dict, List diff --git a/tests/base_tester.py b/tests/base_tester.py index c57971e..c775502 100644 --- a/tests/base_tester.py +++ b/tests/base_tester.py @@ -1,9 +1,10 @@ +from __future__ import annotations + import os import sys from abc import ABC from pathlib import Path from pprint import pprint -from typing import List, Type import astroid from pylint.checkers import BaseChecker @@ -23,9 +24,9 @@ def get_test_root_path() -> Path: class BasePytestTester(ABC): CHECKER_CLASS = BaseChecker - IMPACTED_CHECKER_CLASSES: List[Type[BaseChecker]] = [] + IMPACTED_CHECKER_CLASSES: list[BaseChecker] = [] MSG_ID: str - msgs: List[MessageTest] = [] + msgs: list[MessageTest] = [] def __init_subclass__(cls, **kwargs): super().__init_subclass__(**kwargs) diff --git a/tests/base_tester_test.py b/tests/base_tester_test.py index b40d510..89c714c 100644 --- a/tests/base_tester_test.py +++ b/tests/base_tester_test.py @@ -25,7 +25,7 @@ class NoMsgIDSubclass(BasePytestTester): pass -@pytest.mark.parametrize("msg_id", [123, None, ""], ids=lambda x: f"msg_id={x}") +@pytest.mark.parametrize("msg_id", [123, None, ""], ids=lambda msg_id: f"{msg_id=}") def test_init_subclass_invalid_msg_id_type(msg_id): with pytest.raises(TypeError): From 05e6359881fc1f849e3de46b38ff833731e3db2b Mon Sep 17 00:00:00 2001 From: Stavros Ntentos <133706+stdedos@users.noreply.github.com> Date: Sun, 3 Dec 2023 22:10:31 +0200 Subject: [PATCH 10/14] Copy-paste those changes from a different branch Signed-off-by: Stavros Ntentos <133706+stdedos@users.noreply.github.com> --- pyproject.toml | 50 ++++++++++++++++++++++++++++++++------------------ setup.py | 7 +++++++ 2 files changed, 39 insertions(+), 18 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 1bde092..a1fad97 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,15 +2,12 @@ requires = ["setuptools>=66.1"] build-backend = "setuptools.build_meta" -[tool.setuptools] -license-files = ["LICENSE"] - -[tool.setuptools.packages.find] -exclude=["tests*", "sandbox"] - [project] name = "pylint-pytest" -version = "1.1.3" +version = "2.0.0rc0" +license = {file = "LICENSE"} +description = "A Pylint plugin to suppress pytest-related false positives." + authors = [ {name = "Reverb Chu"}, ] @@ -18,8 +15,8 @@ maintainers = [ {name = "Stavros Ntentos", email = "133706+stdedos@users.noreply.github.com"}, {name = "Pierre Sassoulas", email = "pierre.sassoulas@gmail.com"}, ] -description = "A Pylint plugin to suppress pytest-related false positives." -readme = "README.md" + +readme = "README.md" classifiers = [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", @@ -34,27 +31,44 @@ classifiers = [ "Programming Language :: Python :: 3.12", "Programming Language :: Python :: Implementation :: CPython", "Operating System :: OS Independent", + "License :: OSI Approved :: MIT License", +] +keywords = [ + "pylint", + "pytest", + "plugin", ] -keywords = ["pylint", "pytest", "plugin"] -requires-python = ">=3.8" +requires-python = ">=3.8" dependencies = [ - "pylint<3", - "pytest>=4.6" + "pylint>=2", + "pytest>=4.6", ] [project.optional-dependencies] test = [ "pytest", "pytest-cov", + # For linting purposes, only pylint>3 is supported + "pylint>=3", ] [project.urls] -"Changelog"="https://github.com/pylint-dev/pylint-pytest/blob/master/CHANGELOG.md" -"Documentation"="https://github.com/pylint-dev/pylint-pytest#readme" -"Say Thanks!"="https://saythanks.io/to/stdedos" -"Source"="https://github.com/pylint-dev/pylint-pytest" -"Tracker"="https://github.com/pylint-dev/pylint-pytest/issues" +Changelog = "https://github.com/pylint-dev/pylint-pytest/blob/master/CHANGELOG.md" +Documentation = "https://github.com/pylint-dev/pylint-pytest#readme" +Homepage = "https://github.com/pylint-dev/pylint-pytest" +Source = "https://github.com/pylint-dev/pylint-pytest" +Tracker = "https://github.com/pylint-dev/pylint-pytest/issues" +"Say Thanks!" = "https://saythanks.io/to/stdedos" + +[tool.setuptools] +license-files = ["LICENSE"] + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "sandbox", +] [tool.aliases] test = "pytest" diff --git a/setup.py b/setup.py index 6068493..9c50e41 100755 --- a/setup.py +++ b/setup.py @@ -1,3 +1,10 @@ +#!/usr/bin/env python3 + +""" +Only a compatibility placeholder +https://setuptools.pypa.io/en/latest/userguide/pyproject_config.html +""" + from setuptools import setup setup() From de51223c212ffc203e834bf306a94ea462205f68 Mon Sep 17 00:00:00 2001 From: Pierre Sassoulas Date: Mon, 4 Dec 2023 09:46:05 +0100 Subject: [PATCH 11/14] Update setup.py --- setup.py | 1 - 1 file changed, 1 deletion(-) diff --git a/setup.py b/setup.py index 9c50e41..746fbbe 100755 --- a/setup.py +++ b/setup.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python3 """ Only a compatibility placeholder From 975e1e705403a93b24504b52efb04f6299719f0c Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 4 Dec 2023 08:46:13 +0000 Subject: [PATCH 12/14] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- setup.py | 1 - 1 file changed, 1 deletion(-) diff --git a/setup.py b/setup.py index 746fbbe..28f5531 100755 --- a/setup.py +++ b/setup.py @@ -1,4 +1,3 @@ - """ Only a compatibility placeholder https://setuptools.pypa.io/en/latest/userguide/pyproject_config.html From 5c6d3fbb4e3983792a22b5dfe0c0ae1bce92b847 Mon Sep 17 00:00:00 2001 From: Stavros Ntentos <133706+stdedos@users.noreply.github.com> Date: Mon, 4 Dec 2023 10:48:22 +0200 Subject: [PATCH 13/14] `chmod -x setup.py` Signed-off-by: Stavros Ntentos <133706+stdedos@users.noreply.github.com> --- setup.py | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 setup.py diff --git a/setup.py b/setup.py old mode 100755 new mode 100644 From 2df48d8803a408496cf1355d60c3c3961ca6d517 Mon Sep 17 00:00:00 2001 From: Stavros Ntentos <133706+stdedos@users.noreply.github.com> Date: Tue, 19 Dec 2023 17:02:32 +0200 Subject: [PATCH 14/14] Correct `CHANGELOG.md` Signed-off-by: Stavros Ntentos <133706+stdedos@users.noreply.github.com> --- CHANGELOG.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2323cf3..0758c3f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,8 +4,9 @@ ### Added -* Support for Python 3.12 (https://github.com/pylint-dev/pylint-pytest/pull/24) -* Support for Pylint 3 (https://github.com/pylint-dev/pylint-pytest/pull/24) +* Migrate setup.py to pyproject.toml (https://github.com/pylint-dev/pylint-pytest/pull/8) +* Support for Python 3.12 (https://github.com/pylint-dev/pylint-pytest/issues/3, + "side effect" of https://github.com/pylint-dev/pylint-pytest/pull/8) ### Removed