From 8b4dcd83351f87057d30bdcaddfab4280241d082 Mon Sep 17 00:00:00 2001 From: Krzysztof kuhy Rudnicki Date: Sun, 1 Nov 2026 17:54:09 +0100 Subject: [PATCH] pylint: run serial so CI on Python 3.15 stops crashing in dill setup-python "3.x" moved to CPython 3.15.1, which removed code.co_lnotab. With jobs != 1 pylint pickles the linter for its workers via dill.dumps(), and dill 0.4.1 (newest release) still reads co_lnotab, so both pylint hooks died with AttributeError before linting a file. The 3.15 fix is on dill master only. jobs = 1 in pyproject.toml (the hooks drop their --jobs=4 and take it from there) avoids dill entirely and keeps CI on the newest Python. Hook rev bumped v4.0.8 -> v4.1.3 to match requirements.txt. Co-Authored-By: Claude Opus 5.5 --- .pre-commit-config.yaml | 7 ++++--- pyproject.toml | 7 ++++++- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index aa1122f..f30ed6e 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -106,7 +106,10 @@ repos: - types-requests>=2.31.0 - repo: https://github.com/pylint-dev/pylint - rev: v4.0.8 + # Same release as requirements.txt. No --jobs here: pyproject.toml holds + # it at 1, because parallel pylint pickles through dill, which crashes on + # Python 3.15 (see the comment on `jobs` there). + rev: v4.1.3 hooks: # Two hooks, because the three checks below are not defects in a test # suite -- they are how pytest and unit-testing private mixins work -- @@ -127,7 +130,6 @@ repos: args: - --rcfile=pyproject.toml - --fail-under=8.0 - - --jobs=4 additional_dependencies: - pytest # Kept in step with pyproject.toml: pip refuses two different @@ -148,7 +150,6 @@ repos: args: - --rcfile=pyproject.toml - --fail-under=8.0 - - --jobs=4 - --disable=protected-access,unused-argument,duplicate-code additional_dependencies: - pytest diff --git a/pyproject.toml b/pyproject.toml index 7de24cb..0e45e52 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -180,7 +180,12 @@ exclude = [".venv/"] init-hook = "import sys; sys.path.insert(0, '.')" analyse-fallback-blocks = true persistent = true -jobs = 0 +# Serial on purpose. With jobs != 1 pylint ships the linter to its workers via +# dill.dumps(), and dill 0.4.1 (newest release) reads code.co_lnotab, which +# CPython 3.15 removed -- every run crashed once setup-python's "3.x" became +# 3.15.1. The fix sits on dill master, unreleased; return to 0 once a dill +# release past 0.4.1 ships. The pre-commit hooks take this value too. +jobs = 1 py-version = "3.14" ignore = [".venv", "__pycache__"] # Test suites intentionally use patterns (protected-access, fixture-arg