python3-pylint: upgrade 2.17.3 -> 2.17.4
PATCH 1/2 python3-pylint: upgrade 2.17.3 -> 2.17.4
This upgrade fixes most of the ptest errors that have been seen with pylint, which were caused by a tomlkit issue. Changelog (see also
https://github.com/pylint-dev/pylint/releases/tag/v2.17.4):
False Positives Fixed
- Fix a false positive for bad-dunder-name when there is a user-defined __index__ method. Closes #8613
Other Bug Fixes
- pyreverse: added escaping of vertical bar character in annotation labels produced by DOT printer to ensure it is not treated as field separator of record-based nodes. Closes #8603
- Fixed a crash when generating a configuration file:
tomlkit.exceptions.TOMLKitError: Can't add a table to a dotted key caused by tomlkit v0.11.8. Closes #8632
---
.../{python3-pylint_2.17.3.bb => python3-pylint_2.17.4.bb} | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
rename meta-python/recipes-devtools/python/{python3-pylint_2.17.3.bb => python3-pylint_2.17.4.bb} (96%)meta-python/recipes-devtools/python/python3-pylint_2.17.4.bb renamed from meta-python/recipes-devtools/python/python3-pylint_2.17.3.bb +1 -1
@@ -8,7 +8,7 @@ SRC_URI += " \ file://run-ptest \ file://0001-pyproject.toml-Remove-hard-coded-dependencies.patch \ " -SRCREV ?= "389e14c36819cb87190fd412d3f366a3283f0078" +SRCREV ?= "fc34a4b6abe56f3ac07ca15d846b1c1955545f85" inherit python_setuptools_build_meta ptest
Signature · 1 line
2.40.1
PATCH 2/2 python3-pylint: omit failing pickle test
There is one test in the pylint suite involving pickling non-pickleable plugins that fails on target (but not host). Disable this test for ptest runs.
--- ...001-pylint-remove-plugin-pickle-test.patch | 53 +++++++++++++++++++ .../python/python3-pylint_2.17.4.bb | 1 + 2 files changed, 54 insertions(+) create mode 100644 meta-python/recipes-devtools/python/python3-pylint/0001-pylint-remove-plugin-pickle-test.patch
meta-python/recipes-devtools/python/python3-pylint/0001-pylint-remove-plugin-pickle-test.patch new file +53 -0
@@ -0,0 +1,53 @@ +From 341e19dd69d847f84859e85cabff5846e7da24c4 Mon Sep 17 00:00:00 2001 +From: Trevor Gamblin <[email protected]> +Date: Mon, 15 May 2023 09:26:04 -0400 +Subject: [PATCH] pylint: remove plugin pickle test + +Upstream-Status: Inappropriate (oe-specific) + +Upstream uses an assertion in the removed test to state that the test +needs changing if the plugin loading succeeds. The same failure wasn't +seen when running the tests on the host with pytest, so disable it by +removing the test from the suite. + +Signed-off-by: Trevor Gamblin <[email protected]> +--- + tests/test_check_parallel.py | 22 ---------------------- + 1 file changed, 22 deletions(-) + +diff --git a/tests/test_check_parallel.py b/tests/test_check_parallel.py +index d56502eaf..34fec140f 100644 +--- a/tests/test_check_parallel.py ++++ b/tests/test_check_parallel.py +@@ -257,28 +257,6 @@ class TestCheckParallelFramework: + assert stats.statement == 18 + assert stats.warning == 0 + +- def test_linter_with_unpickleable_plugins_is_pickleable(self) -> None: +- """The linter needs to be pickle-able in order to be passed between workers""" +- linter = PyLinter(reporter=Reporter()) +- # We load an extension that we know is not pickle-safe +- linter.load_plugin_modules(["pylint.extensions.overlapping_exceptions"]) +- try: +- dill.dumps(linter) +- raise AssertionError( +- "Plugins loaded were pickle-safe! This test needs altering" +- ) +- except (KeyError, TypeError, PickleError, NotImplementedError): +- pass +- +- # And expect this call to make it pickle-able +- linter.load_plugin_configuration() +- try: +- dill.dumps(linter) +- except KeyError as exc: +- raise AssertionError( +- "Cannot pickle linter when using non-pickleable plugin" +- ) from exc +- + def test_worker_check_sequential_checker(self) -> None: + """Same as test_worker_check_single_file_no_checkers with SequentialTestChecker.""" + linter = PyLinter(reporter=Reporter()) +-- +2.40.1 +
meta-python/recipes-devtools/python/python3-pylint_2.17.4.bb +1 -0
@@ -7,6 +7,7 @@ SRC_URI += " \ git://github.com/pylint-dev/pylint;branch=main;protocol=https \ file://run-ptest \ file://0001-pyproject.toml-Remove-hard-coded-dependencies.patch \ + file://0001-pylint-remove-plugin-pickle-test.patch \ " SRCREV ?= "fc34a4b6abe56f3ac07ca15d846b1c1955545f85"
Signature · 1 line
2.40.1