new file mode 100644
@@ -0,0 +1,53 @@
+From 341e19dd69d847f84859e85cabff5846e7da24c4 Mon Sep 17 00:00:00 2001
+From: Trevor Gamblin <tgamblin@baylibre.com>
+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 <tgamblin@baylibre.com>
+---
+ 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
+
@@ -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"
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. Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> --- ...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