pylint: FTBFS against python 3.15rc1
Maximiliano Curia <[email protected]>
| Newsgroups | gmane.linux.debian.devel.python |
|---|---|
| Message-ID | <[email protected]> |
Package: src:pylint Version: 4.0.6-1 User: [email protected] Usertags: python3.15 Tags: patch, ftbfs, forky, sid Hi! While rebuilding the python related packages against the Python 3.15rc1 version we found that TODO fails to build from source [1]. There are three problems related to these faiures, 2 are related to fixes needed in other packages (dill and astroid), but the third part is caused by a bug pylint fixed upstream in the "Fixes for Python 3.15" commit [2]. I applied the upstream fix in the sandbox [3] to be able to build the packages that depend on TODO, please consider applying the patch to support the upcoming 3.15 version. Happy hacking, [1]: https://debusine.debian.net/debian/r-python-python3.15/work-request/1124193/ [2]: https://github.com/pylint-dev/pylint/commit/80999752ae7c3bf4c11b275c60d49621a87e3e0e [3]: https://debusine.debian.net/debian/r-python-python3.15/ -- "Can you imagine what I would do if I could do all I can?" -- Sun Tzu Saludos /\/\ /\ >< `/
python-3.15.patch
(text/x-diff, 4.2 KB)
From: Daniël van Noord <[email protected]> Date: Tue, 28 Jul 2026 16:43:45 +0200 Subject: Fixes for Python 3.15 (#11188) Origin: upstream, https://github.com/pylint-dev/pylint/commit/80999752ae7c3bf4c11b275c60d49621a87e3e0e --- diff --git a/pylint/constants.py b/pylint/constants.py index 11e261e0e..e23ddbe31 100644 --- a/pylint/constants.py +++ b/pylint/constants.py @@ -18,6 +18,7 @@ from pylint.typing import MessageTypesFullName PY311_PLUS = sys.version_info[:2] >= (3, 11) PY312_PLUS = sys.version_info[:2] >= (3, 12) PY314_PLUS = sys.version_info[:2] >= (3, 14) +PY315_PLUS = sys.version_info[:2] >= (3, 15) IS_PYPY = platform.python_implementation() == "PyPy" diff --git a/tests/functional/d/deprecated/deprecated_methods_py36.rc b/tests/functional/d/deprecated/deprecated_methods_py36.rc new file mode 100644 index 000000000..4cd84d47f --- /dev/null +++ b/tests/functional/d/deprecated/deprecated_methods_py36.rc @@ -0,0 +1,2 @@ +[testoptions] +max_pyver=3.15 diff --git a/tests/functional/n/no/no_name_in_module.py b/tests/functional/n/no/no_name_in_module.py index 6d34245c8..eb1598d95 100644 --- a/tests/functional/n/no/no_name_in_module.py +++ b/tests/functional/n/no/no_name_in_module.py @@ -6,9 +6,9 @@ import collections.tutu # [no-name-in-module] from collections import toto # [no-name-in-module] toto.yo() -from xml.etree import ElementTree -ElementTree.nonexistent_function() # [no-member] -ElementTree.another.nonexistent.function() # [no-member] +from xml.etree import ElementPath +ElementPath.nonexistent_function() # [no-member] +ElementPath.another.nonexistent.function() # [no-member] import sys diff --git a/tests/functional/n/no/no_name_in_module.txt b/tests/functional/n/no/no_name_in_module.txt index ed8628108..baeb9fbbf 100644 --- a/tests/functional/n/no/no_name_in_module.txt +++ b/tests/functional/n/no/no_name_in_module.txt @@ -1,7 +1,7 @@ no-name-in-module:5:0:5:23::No name 'tutu' in module 'collections':UNDEFINED no-name-in-module:6:0:6:28::No name 'toto' in module 'collections':UNDEFINED -no-member:10:0:10:32::Module 'xml.etree.ElementTree' has no 'nonexistent_function' member:INFERENCE -no-member:11:0:11:19::Module 'xml.etree.ElementTree' has no 'another' member:INFERENCE +no-member:10:0:10:32::Module 'xml.etree.ElementPath' has no 'nonexistent_function' member:INFERENCE +no-member:11:0:11:19::Module 'xml.etree.ElementPath' has no 'another' member:INFERENCE no-member:16:6:16:17::Module 'sys' has no 'stdoout' member; maybe 'stdout'?:INFERENCE no-name-in-module:23:0:23:34::No name 'compiile' in module 're':UNDEFINED no-name-in-module:23:0:23:34::No name 'findiiter' in module 're':UNDEFINED diff --git a/tests/testutils/test_functional_testutils.py b/tests/testutils/test_functional_testutils.py index 2b1574e35..da3b1ad82 100644 --- a/tests/testutils/test_functional_testutils.py +++ b/tests/testutils/test_functional_testutils.py @@ -17,6 +17,7 @@ import pytest from _pytest.outcomes import Skipped from pylint import testutils +from pylint.constants import PY315_PLUS from pylint.testutils.functional import ( FunctionalTestFile, get_functional_test_files_from_directory, @@ -135,17 +136,18 @@ def test_minimal_messages_config_enabled(pytest_config: MagicMock) -> None: str(DATA_DIRECTORY / "m"), "minimal_messages_config.py" ) mod_test = testutils.LintModuleTest(test_file, pytest_config) + expected_messages: tuple[str, ...] = ( + "consider-using-with", + "consider-using-f-string", + # Always enable fatal errors: important not to have false negatives + "astroid-error", + "fatal", + "syntax-error", + ) + if not PY315_PLUS: + expected_messages += ("unspecified-encoding",) assert all( - mod_test._linter.is_message_enabled(msgid) - for msgid in ( - "consider-using-with", - "unspecified-encoding", - "consider-using-f-string", - # Always enable fatal errors: important not to have false negatives - "astroid-error", - "fatal", - "syntax-error", - ) + mod_test._linter.is_message_enabled(msgid) for msgid in expected_messages ) assert not mod_test._linter.is_message_enabled("unused-import")