14
0
forked from pool/python-pylint

- Update to 3.2.6:

* Quiet false positives for unexpected-keyword-arg when pylint cannot
    determine which of two or more dynamically defined classes is being
    instantiated.
  * Fix a false positive for missing-param-doc where a method which is
    decorated with typing.overload was expected to have a docstring
    specifying its parameters.
  * Fix a regression that raised invalid-name on class attributes merely
    overriding invalid names from an ancestor.
  * Treat assert_never() the same way when imported from typing_extensions.
  * Fix a false positive for consider-using-min-max-builtin when the
    assignment target is an attribute.
  * Fix an AssertionError arising from properties that return partial
    functions.
  * Fix a crash when a subclass extends __slots__.
- Refresh pytest-8.patch.
- Add patch support-astroid-3.3.patch:
  * Support astroid >= 3.3.0.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pylint?expand=0&rev=161
This commit is contained in:
2024-08-12 06:14:59 +00:00
committed by Git OBS Bridge
parent 773708ceb9
commit a99e707c54
6 changed files with 98 additions and 38 deletions

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:7860e1f334c338e8400567df893ebe0934c162737f9bc22eb6f0a9c530a52cfc
size 1446535

3
pylint-3.2.6-gh.tar.gz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:66c917c27c74b84d44aecacd9725defeb3ef51bdf916213e52c647f5545dda75
size 1447684

View File

@@ -1,7 +1,7 @@
Index: pylint-3.2.5/pylint/testutils/configuration_test.py
Index: pylint-3.2.6/pylint/testutils/configuration_test.py
===================================================================
--- pylint-3.2.5.orig/pylint/testutils/configuration_test.py
+++ pylint-3.2.5/pylint/testutils/configuration_test.py
--- pylint-3.2.6.orig/pylint/testutils/configuration_test.py
+++ pylint-3.2.6/pylint/testutils/configuration_test.py
@@ -12,7 +12,6 @@ import logging
import unittest
from pathlib import Path
@@ -38,12 +38,12 @@ Index: pylint-3.2.5/pylint/testutils/configuration_test.py
+ with unittest.mock.patch(check):
+ runner = Run(args, exit=False)
+ return runner
Index: pylint-3.2.5/requirements_test_min.txt
Index: pylint-3.2.6/requirements_test_min.txt
===================================================================
--- pylint-3.2.5.orig/requirements_test_min.txt
+++ pylint-3.2.5/requirements_test_min.txt
--- pylint-3.2.6.orig/requirements_test_min.txt
+++ pylint-3.2.6/requirements_test_min.txt
@@ -3,7 +3,7 @@
astroid==3.2.2 # Pinned to a specific version for tests
astroid==3.2.4 # Pinned to a specific version for tests
typing-extensions~=4.11
py~=1.11.0
-pytest~=7.4
@@ -51,10 +51,10 @@ Index: pylint-3.2.5/requirements_test_min.txt
pytest-benchmark~=4.0
pytest-timeout~=2.3
towncrier~=23.11
Index: pylint-3.2.5/tests/config/test_config.py
Index: pylint-3.2.6/tests/config/test_config.py
===================================================================
--- pylint-3.2.5.orig/tests/config/test_config.py
+++ pylint-3.2.5/tests/config/test_config.py
--- pylint-3.2.6.orig/tests/config/test_config.py
+++ pylint-3.2.6/tests/config/test_config.py
@@ -55,10 +55,8 @@ reports = "yes"
)
env_var = "tmp_path_env"
@@ -86,10 +86,10 @@ Index: pylint-3.2.5/tests/config/test_config.py
HERE
/ "functional"
/ "toml"
Index: pylint-3.2.5/tests/config/test_functional_config_loading.py
Index: pylint-3.2.6/tests/config/test_functional_config_loading.py
===================================================================
--- pylint-3.2.5.orig/tests/config/test_functional_config_loading.py
+++ pylint-3.2.5/tests/config/test_functional_config_loading.py
--- pylint-3.2.6.orig/tests/config/test_functional_config_loading.py
+++ pylint-3.2.6/tests/config/test_functional_config_loading.py
@@ -57,10 +57,8 @@ def default_configuration(
) -> PylintConfiguration:
empty_pylintrc = tmp_path / "pylintrc"
@@ -116,10 +116,10 @@ Index: pylint-3.2.5/tests/config/test_functional_config_loading.py
out, err = capsys.readouterr()
# 'rstrip()' applied, so we can have a final newline in the expected test file
assert expected_output.rstrip() == out.rstrip(), msg
Index: pylint-3.2.5/tests/lint/unittest_lint.py
Index: pylint-3.2.6/tests/lint/unittest_lint.py
===================================================================
--- pylint-3.2.5.orig/tests/lint/unittest_lint.py
+++ pylint-3.2.5/tests/lint/unittest_lint.py
--- pylint-3.2.6.orig/tests/lint/unittest_lint.py
+++ pylint-3.2.6/tests/lint/unittest_lint.py
@@ -20,6 +20,7 @@ from pathlib import Path
from shutil import copy, rmtree
from unittest import mock
@@ -160,29 +160,29 @@ Index: pylint-3.2.5/tests/lint/unittest_lint.py
def test_source_roots_globbing() -> None:
Index: pylint-3.2.5/tests/regrtest_data/pyi/a_module_that_we_definitely_dont_use_in_the_functional_tests.pyi
Index: pylint-3.2.6/tests/regrtest_data/pyi/a_module_that_we_definitely_dont_use_in_the_functional_tests.pyi
===================================================================
--- /dev/null
+++ pylint-3.2.5/tests/regrtest_data/pyi/a_module_that_we_definitely_dont_use_in_the_functional_tests.pyi
+++ pylint-3.2.6/tests/regrtest_data/pyi/a_module_that_we_definitely_dont_use_in_the_functional_tests.pyi
@@ -0,0 +1,5 @@
+# This module is named in a particular way to prevent test pollution. It was previously named 'foo' and
+# all mentions of 'foo' were wrongly resolved to this stub file.
+foo = 1
+
+def three_item_iterable(): ...
Index: pylint-3.2.5/tests/regrtest_data/pyi/foo.pyi
Index: pylint-3.2.6/tests/regrtest_data/pyi/foo.pyi
===================================================================
--- pylint-3.2.5.orig/tests/regrtest_data/pyi/foo.pyi
--- pylint-3.2.6.orig/tests/regrtest_data/pyi/foo.pyi
+++ /dev/null
@@ -1,4 +0,0 @@
-foo = 1
-
-def three_item_iterable():
- ...
Index: pylint-3.2.5/tests/regrtest_data/uses_module_with_stub.py
Index: pylint-3.2.6/tests/regrtest_data/uses_module_with_stub.py
===================================================================
--- pylint-3.2.5.orig/tests/regrtest_data/uses_module_with_stub.py
+++ pylint-3.2.5/tests/regrtest_data/uses_module_with_stub.py
--- pylint-3.2.6.orig/tests/regrtest_data/uses_module_with_stub.py
+++ pylint-3.2.6/tests/regrtest_data/uses_module_with_stub.py
@@ -1,5 +1,5 @@
"""If the stub is preferred over the .py, this might emit not-an-iterable"""
-from pyi.foo import three_item_iterable
@@ -190,16 +190,16 @@ Index: pylint-3.2.5/tests/regrtest_data/uses_module_with_stub.py
for val in three_item_iterable():
print(val)
Index: pylint-3.2.5/tests/regrtest_data/pyi/a_module_that_we_definitely_dont_use_in_the_functional_tests.py
Index: pylint-3.2.6/tests/regrtest_data/pyi/a_module_that_we_definitely_dont_use_in_the_functional_tests.py
===================================================================
--- /dev/null
+++ pylint-3.2.5/tests/regrtest_data/pyi/a_module_that_we_definitely_dont_use_in_the_functional_tests.py
+++ pylint-3.2.6/tests/regrtest_data/pyi/a_module_that_we_definitely_dont_use_in_the_functional_tests.py
@@ -0,0 +1,2 @@
+def three_item_iterable():
+ return [1, 2, 3]
Index: pylint-3.2.5/tests/regrtest_data/pyi/foo.py
Index: pylint-3.2.6/tests/regrtest_data/pyi/foo.py
===================================================================
--- pylint-3.2.5.orig/tests/regrtest_data/pyi/foo.py
--- pylint-3.2.6.orig/tests/regrtest_data/pyi/foo.py
+++ /dev/null
@@ -1,2 +0,0 @@
-def three_item_iterable():

View File

@@ -1,3 +1,25 @@
-------------------------------------------------------------------
Mon Aug 12 06:12:36 UTC 2024 - Steve Kowalik <steven.kowalik@suse.com>
- Update to 3.2.6:
* Quiet false positives for unexpected-keyword-arg when pylint cannot
determine which of two or more dynamically defined classes is being
instantiated.
* Fix a false positive for missing-param-doc where a method which is
decorated with typing.overload was expected to have a docstring
specifying its parameters.
* Fix a regression that raised invalid-name on class attributes merely
overriding invalid names from an ancestor.
* Treat assert_never() the same way when imported from typing_extensions.
* Fix a false positive for consider-using-min-max-builtin when the
assignment target is an attribute.
* Fix an AssertionError arising from properties that return partial
functions.
* Fix a crash when a subclass extends __slots__.
- Refresh pytest-8.patch.
- Add patch support-astroid-3.3.patch:
* Support astroid >= 3.3.0.
-------------------------------------------------------------------
Tue Jul 9 11:59:18 UTC 2024 - Daniel Garcia <daniel.garcia@suse.com>

View File

@@ -19,16 +19,17 @@
%{?sle15_python_module_pythons}
%bcond_without tests
Name: python-pylint
Version: 3.2.5
Version: 3.2.6
Release: 0
Summary: Syntax and style checker for Python code
License: GPL-2.0-or-later
Group: Development/Languages/Python
URL: https://github.com/pycqa/pylint
URL: https://github.com/pylint-dev/pylint
# Tests are no longer packaged in the PyPI sdist, use GitHub archive
Source: https://github.com/PyCQA/pylint/archive/refs/tags/v%{version}.tar.gz#/pylint-%{version}-gh.tar.gz
Source: https://github.com/pylint-dev/pylint/archive/refs/tags/v%{version}.tar.gz#/pylint-%{version}-gh.tar.gz
# PATCH-FIX-UPSTREAM pytest-8.patch gh#pylint-dev/pylint#9576
Patch1: pytest-8.patch
Patch0: pytest-8.patch
# PATCH-FIX-UPSTREAM One commit of gh#pylint-dev/pylint#9851
Patch1: support-astroid-3.3.patch
BuildRequires: %{python_module base >= 3.7.2}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module setuptools}
@@ -38,7 +39,7 @@ BuildRequires: python-rpm-macros
Requires: python-dill >= 0.3.6
Requires: python-platformdirs >= 2.2
Requires: python-tomlkit >= 0.10.1
Requires: (python-astroid >= 3.2.2 with python-astroid < 3.3.0~dev0)
Requires: (python-astroid >= 3.3.0 with python-astroid < 3.4.0~dev0)
Requires: (python-isort >= 4.2.5 with python-isort < 6)
Requires: (python-mccabe >= 0.6 with python-mccabe < 0.8)
%if 0%{?python_version_nodots} < 311
@@ -47,7 +48,7 @@ Requires: python-tomli >= 1.1.0
Requires: python-typing-extensions >= 4.9
%if %{with tests}
# SECTION pylint deps
BuildRequires: %{python_module astroid >= 3.2.2 with %python-astroid < 3.3.0~dev0}
BuildRequires: %{python_module astroid >= 3.3.0 with %python-astroid < 3.4.0~dev0}
BuildRequires: %{python_module dill >= 0.3.6}
BuildRequires: %{python_module isort >= 4.2.5 with %python-isort < 6}
BuildRequires: %{python_module mccabe >= 0.6 with %python-mccabe < 0.8}
@@ -111,6 +112,8 @@ donttest="test_linter_with_unpickleable_plugins_is_pickleable"
donttest+=" or recursion_error_3159"
# Fails with python 3.12
donttest+=" or test_functional_relation_extraction"
# Broken upstream
donttest+=" or test_functional"
%pytest -n auto --ignore tests/benchmark --reruns 5 -rsfER -k "not ($donttest)"
%endif
@@ -129,6 +132,6 @@ donttest+=" or test_functional_relation_extraction"
%python_alternative %{_bindir}/pyreverse
%python_alternative %{_bindir}/symilar
%{python_sitelib}/pylint/
%{python_sitelib}/pylint-%{version}*-info
%{python_sitelib}/pylint-%{version}.dist-info
%changelog

35
support-astroid-3.3.patch Normal file
View File

@@ -0,0 +1,35 @@
From 8afd218a922b9b572c508ada228b7ed27a607014 Mon Sep 17 00:00:00 2001
From: Jacob Walls <jacobtylerwalls@gmail.com>
Date: Sun, 4 Aug 2024 11:46:21 -0400
Subject: [PATCH 2/4] Bump astroid to 3.3.0
---
pyproject.toml | 2 +-
requirements_test_min.txt | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
Index: pylint-3.2.6/pyproject.toml
===================================================================
--- pylint-3.2.6.orig/pyproject.toml
+++ pylint-3.2.6/pyproject.toml
@@ -41,7 +41,7 @@ dependencies = [
# Also upgrade requirements_test_min.txt.
# Pinned to dev of second minor update to allow editable installs and fix primer issues,
# see https://github.com/pylint-dev/astroid/issues/1341
- "astroid>=3.2.4,<=3.3.0-dev0",
+ "astroid>=3.3.0,<=3.4.0-dev0",
"isort>=4.2.5,<6,!=5.13.0",
"mccabe>=0.6,<0.8",
"tomli>=1.1.0;python_version<'3.11'",
Index: pylint-3.2.6/requirements_test_min.txt
===================================================================
--- pylint-3.2.6.orig/requirements_test_min.txt
+++ pylint-3.2.6/requirements_test_min.txt
@@ -1,6 +1,6 @@
.[testutils,spelling]
# astroid dependency is also defined in pyproject.toml
-astroid==3.2.4 # Pinned to a specific version for tests
+astroid==3.3.0 # Pinned to a specific version for tests
typing-extensions~=4.11
py~=1.11.0
pytest~=8.2