Origin: upstream, https://github.com/pylint-dev/pylint/pull/10843 Description: Bump astroid dependency to 4.1.1 and update functional test outputs. --- a/pyproject.toml +++ b/pyproject.toml @@ -40,7 +40,7 @@ # 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>=4.0.2,<=4.1.dev0", + "astroid>=4.1.1,<=4.2.dev0", "colorama>=0.4.5; sys_platform=='win32'", "dill>=0.2; python_version<'3.11'", "dill>=0.3.6; python_version>='3.11'", @@ -94,7 +94,7 @@ # Configuration for the build system test-min = [ # Base test dependencies - "astroid==4.0.2", # Pinned to a specific version for tests + "astroid==4.1.1", # Pinned to a specific version for tests "py~=1.11.0", "pytest~=8.4", "pytest-benchmark~=5.1", --- a/tests/functional/d/deprecated/deprecated_decorators.txt +++ b/tests/functional/d/deprecated/deprecated_decorators.txt @@ -1 +1 @@ -deprecated-decorator:7:4:7:28:MyClass.my_method:Using deprecated decorator abc.abstractclassmethod():UNDEFINED +deprecated-decorator:7:4:7:28:MyClass:Using deprecated decorator abc.abstractclassmethod():UNDEFINED --- a/tests/functional/m/method_cache_max_size_none.txt +++ b/tests/functional/m/method_cache_max_size_none.txt @@ -1,8 +1,8 @@ -method-cache-max-size-none:26:5:26:20:MyClassWithMethods.my_func:'lru_cache(maxsize=None)' or 'cache' will keep all method args alive indefinitely, including 'self':INFERENCE -method-cache-max-size-none:30:5:30:30:MyClassWithMethods.my_func:'lru_cache(maxsize=None)' or 'cache' will keep all method args alive indefinitely, including 'self':INFERENCE -method-cache-max-size-none:34:5:34:38:MyClassWithMethods.my_func:'lru_cache(maxsize=None)' or 'cache' will keep all method args alive indefinitely, including 'self':INFERENCE -method-cache-max-size-none:38:5:38:24:MyClassWithMethods.my_func:'lru_cache(maxsize=None)' or 'cache' will keep all method args alive indefinitely, including 'self':INFERENCE -method-cache-max-size-none:43:5:43:24:MyClassWithMethods.my_func:'lru_cache(maxsize=None)' or 'cache' will keep all method args alive indefinitely, including 'self':INFERENCE -method-cache-max-size-none:44:5:44:24:MyClassWithMethods.my_func:'lru_cache(maxsize=None)' or 'cache' will keep all method args alive indefinitely, including 'self':INFERENCE -method-cache-max-size-none:49:5:49:30:MyClassWithMethods.my_func:'lru_cache(maxsize=None)' or 'cache' will keep all method args alive indefinitely, including 'self':INFERENCE -method-cache-max-size-none:79:5:79:40:MyClassWithMethodsAndMaxSize.my_func:'lru_cache(maxsize=None)' or 'cache' will keep all method args alive indefinitely, including 'self':INFERENCE +method-cache-max-size-none:26:5:26:20:MyClassWithMethods:'lru_cache(maxsize=None)' or 'cache' will keep all method args alive indefinitely, including 'self':INFERENCE +method-cache-max-size-none:30:5:30:30:MyClassWithMethods:'lru_cache(maxsize=None)' or 'cache' will keep all method args alive indefinitely, including 'self':INFERENCE +method-cache-max-size-none:34:5:34:38:MyClassWithMethods:'lru_cache(maxsize=None)' or 'cache' will keep all method args alive indefinitely, including 'self':INFERENCE +method-cache-max-size-none:38:5:38:24:MyClassWithMethods:'lru_cache(maxsize=None)' or 'cache' will keep all method args alive indefinitely, including 'self':INFERENCE +method-cache-max-size-none:43:5:43:24:MyClassWithMethods:'lru_cache(maxsize=None)' or 'cache' will keep all method args alive indefinitely, including 'self':INFERENCE +method-cache-max-size-none:44:5:44:24:MyClassWithMethods:'lru_cache(maxsize=None)' or 'cache' will keep all method args alive indefinitely, including 'self':INFERENCE +method-cache-max-size-none:49:5:49:30:MyClassWithMethods:'lru_cache(maxsize=None)' or 'cache' will keep all method args alive indefinitely, including 'self':INFERENCE +method-cache-max-size-none:79:5:79:40:MyClassWithMethodsAndMaxSize:'lru_cache(maxsize=None)' or 'cache' will keep all method args alive indefinitely, including 'self':INFERENCE --- a/tests/functional/n/non_ascii_name/non_ascii_name_decorator.txt +++ b/tests/functional/n/non_ascii_name/non_ascii_name_decorator.txt @@ -1 +1 @@ -non-ascii-name:16:4:16:13:a_function:"Argument name ""fåling"" contains a non-ASCII character, consider renaming it.":HIGH +non-ascii-name:16:4:16:13::"Argument name ""fåling"" contains a non-ASCII character, consider renaming it.":HIGH --- a/tests/functional/o/overridden_final_method_regression.txt +++ b/tests/functional/o/overridden_final_method_regression.txt @@ -1 +1 @@ -undefined-variable:4:1:4:18:crash_test:Undefined variable 'unknown_decorator':UNDEFINED +undefined-variable:4:1:4:18::Undefined variable 'unknown_decorator':UNDEFINED --- a/tests/functional/r/regression_02/regression_10334.txt +++ b/tests/functional/r/regression_02/regression_10334.txt @@ -1 +1 @@ -not-callable:4:1:4:4:A:s is not callable:UNDEFINED +not-callable:4:1:4:4::s is not callable:UNDEFINED --- a/tests/functional/s/singledispatch/singledispatch_method.txt +++ b/tests/functional/s/singledispatch/singledispatch_method.txt @@ -1,9 +1,9 @@ -singledispatch-method:9:5:9:19:Board1.convert_position:singledispatch decorator should not be used with methods, use singledispatchmethod instead.:HIGH -singledispatch-method:13:5:13:30:Board1._:singledispatch decorator should not be used with methods, use singledispatchmethod instead.:INFERENCE -singledispatch-method:18:5:18:30:Board1._:singledispatch decorator should not be used with methods, use singledispatchmethod instead.:INFERENCE -singledispatch-method:24:5:24:19:Board2.convert_position:singledispatch decorator should not be used with methods, use singledispatchmethod instead.:HIGH -singledispatch-method:29:5:29:30:Board2._:singledispatch decorator should not be used with methods, use singledispatchmethod instead.:INFERENCE -singledispatch-method:35:5:35:30:Board2._:singledispatch decorator should not be used with methods, use singledispatchmethod instead.:INFERENCE -singledispatch-method:43:5:43:19:Board3.convert_position:singledispatch decorator should not be used with methods, use singledispatchmethod instead.:HIGH -singledispatch-method:48:5:48:30:Board3._:singledispatch decorator should not be used with methods, use singledispatchmethod instead.:INFERENCE -singledispatch-method:54:5:54:30:Board3._:singledispatch decorator should not be used with methods, use singledispatchmethod instead.:INFERENCE +singledispatch-method:9:5:9:19:Board1:singledispatch decorator should not be used with methods, use singledispatchmethod instead.:HIGH +singledispatch-method:13:5:13:30:Board1:singledispatch decorator should not be used with methods, use singledispatchmethod instead.:INFERENCE +singledispatch-method:18:5:18:30:Board1:singledispatch decorator should not be used with methods, use singledispatchmethod instead.:INFERENCE +singledispatch-method:24:5:24:19:Board2:singledispatch decorator should not be used with methods, use singledispatchmethod instead.:HIGH +singledispatch-method:29:5:29:30:Board2:singledispatch decorator should not be used with methods, use singledispatchmethod instead.:INFERENCE +singledispatch-method:35:5:35:30:Board2:singledispatch decorator should not be used with methods, use singledispatchmethod instead.:INFERENCE +singledispatch-method:43:5:43:19:Board3:singledispatch decorator should not be used with methods, use singledispatchmethod instead.:HIGH +singledispatch-method:48:5:48:30:Board3:singledispatch decorator should not be used with methods, use singledispatchmethod instead.:INFERENCE +singledispatch-method:54:5:54:30:Board3:singledispatch decorator should not be used with methods, use singledispatchmethod instead.:INFERENCE --- a/tests/functional/s/singledispatch/singledispatchmethod_function.txt +++ b/tests/functional/s/singledispatch/singledispatchmethod_function.txt @@ -1,3 +1,3 @@ -singledispatchmethod-function:9:1:9:21:convert_position2:singledispatchmethod decorator should not be used with functions, use singledispatch instead.:HIGH -singledispatchmethod-function:13:1:13:27:_:singledispatchmethod decorator should not be used with functions, use singledispatch instead.:INFERENCE -singledispatchmethod-function:18:1:18:27:_:singledispatchmethod decorator should not be used with functions, use singledispatch instead.:INFERENCE +singledispatchmethod-function:9:1:9:21::singledispatchmethod decorator should not be used with functions, use singledispatch instead.:HIGH +singledispatchmethod-function:13:1:13:27::singledispatchmethod decorator should not be used with functions, use singledispatch instead.:INFERENCE +singledispatchmethod-function:18:1:18:27::singledispatchmethod decorator should not be used with functions, use singledispatch instead.:INFERENCE --- a/tests/functional/u/undefined/undefined_variable.314.txt +++ b/tests/functional/u/undefined/undefined_variable.314.txt @@ -30,6 +30,6 @@ undefined-variable:291:18:291:24:not_using_loop_variable_accordingly:Undefined variable 'iteree':UNDEFINED undefined-variable:308:27:308:28:undefined_annotation:Undefined variable 'x':UNDEFINED used-before-assignment:309:7:309:8:undefined_annotation:Using variable 'x' before assignment:HIGH -undefined-variable:339:11:339:12:decorated3:Undefined variable 'x':UNDEFINED -undefined-variable:344:19:344:20:decorated4:Undefined variable 'y':UNDEFINED +undefined-variable:339:11:339:12::Undefined variable 'x':UNDEFINED +undefined-variable:344:19:344:20::Undefined variable 'y':UNDEFINED undefined-variable:365:10:365:20:global_var_mixed_assignment:Undefined variable 'GLOBAL_VAR':HIGH --- a/tests/functional/u/undefined/undefined_variable.txt +++ b/tests/functional/u/undefined/undefined_variable.txt @@ -31,8 +31,8 @@ undefined-variable:291:18:291:24:not_using_loop_variable_accordingly:Undefined variable 'iteree':UNDEFINED undefined-variable:308:27:308:28:undefined_annotation:Undefined variable 'x':UNDEFINED used-before-assignment:309:7:309:8:undefined_annotation:Using variable 'x' before assignment:HIGH -undefined-variable:339:11:339:12:decorated3:Undefined variable 'x':UNDEFINED -undefined-variable:344:19:344:20:decorated4:Undefined variable 'y':UNDEFINED +undefined-variable:339:11:339:12::Undefined variable 'x':UNDEFINED +undefined-variable:344:19:344:20::Undefined variable 'y':UNDEFINED undefined-variable:365:10:365:20:global_var_mixed_assignment:Undefined variable 'GLOBAL_VAR':HIGH undefined-variable:377:19:377:44:RepeatedReturnAnnotations.x:Undefined variable 'RepeatedReturnAnnotations':UNDEFINED undefined-variable:379:19:379:44:RepeatedReturnAnnotations.y:Undefined variable 'RepeatedReturnAnnotations':UNDEFINED --- a/tests/functional/u/unsupported/unsupported_version_for_final.txt +++ b/tests/functional/u/unsupported/unsupported_version_for_final.txt @@ -1,9 +1,9 @@ -using-final-decorator-in-unsupported-version:10:1:10:6:MyClass1:typing.final is not supported by all versions included in the py-version setting:HIGH -using-final-decorator-in-unsupported-version:12:5:12:10:MyClass1.my_method:typing.final is not supported by all versions included in the py-version setting:HIGH -using-final-decorator-in-unsupported-version:13:5:13:10:MyClass1.my_method:typing.final is not supported by all versions included in the py-version setting:HIGH -using-final-decorator-in-unsupported-version:18:1:18:8:MyClass2:typing.final is not supported by all versions included in the py-version setting:HIGH -using-final-decorator-in-unsupported-version:20:5:20:12:MyClass2.my_method:typing.final is not supported by all versions included in the py-version setting:HIGH -using-final-decorator-in-unsupported-version:25:1:25:13:MyClass3:typing.final is not supported by all versions included in the py-version setting:HIGH -using-final-decorator-in-unsupported-version:27:5:27:17:MyClass3.my_method:typing.final is not supported by all versions included in the py-version setting:HIGH -using-final-decorator-in-unsupported-version:32:1:32:15:MyClass4:typing.final is not supported by all versions included in the py-version setting:HIGH -using-final-decorator-in-unsupported-version:34:5:34:19:MyClass4.my_method:typing.final is not supported by all versions included in the py-version setting:HIGH +using-final-decorator-in-unsupported-version:10:1:10:6::typing.final is not supported by all versions included in the py-version setting:HIGH +using-final-decorator-in-unsupported-version:12:5:12:10:MyClass1:typing.final is not supported by all versions included in the py-version setting:HIGH +using-final-decorator-in-unsupported-version:13:5:13:10:MyClass1:typing.final is not supported by all versions included in the py-version setting:HIGH +using-final-decorator-in-unsupported-version:18:1:18:8::typing.final is not supported by all versions included in the py-version setting:HIGH +using-final-decorator-in-unsupported-version:20:5:20:12:MyClass2:typing.final is not supported by all versions included in the py-version setting:HIGH +using-final-decorator-in-unsupported-version:25:1:25:13::typing.final is not supported by all versions included in the py-version setting:HIGH +using-final-decorator-in-unsupported-version:27:5:27:17:MyClass3:typing.final is not supported by all versions included in the py-version setting:HIGH +using-final-decorator-in-unsupported-version:32:1:32:15::typing.final is not supported by all versions included in the py-version setting:HIGH +using-final-decorator-in-unsupported-version:34:5:34:19:MyClass4:typing.final is not supported by all versions included in the py-version setting:HIGH --- a/tests/functional/u/unsupported/unsupported_version_for_posonly_args.txt +++ b/tests/functional/u/unsupported/unsupported_version_for_posonly_args.txt @@ -1 +1 @@ -using-positional-only-args-in-unsupported-version:2:0:None:None:add:Positional-only arguments are not supported by all versions included in the py-version setting:HIGH +using-positional-only-args-in-unsupported-version:2:0:2:None:add:Positional-only arguments are not supported by all versions included in the py-version setting:HIGH --- a/tests/functional/u/unused/unused_argument.txt +++ b/tests/functional/u/unused/unused_argument.txt @@ -3,8 +3,8 @@ unused-argument:32:29:32:32:Sub.newmethod:Unused argument 'aay':INFERENCE unused-argument:59:13:59:16:function:Unused argument 'arg':HIGH unused-argument:66:21:66:24:AAAA.method:Unused argument 'arg':INFERENCE -unused-argument:73:0:None:None:AAAA.selected:Unused argument 'args':INFERENCE -unused-argument:73:0:None:None:AAAA.selected:Unused argument 'kwargs':INFERENCE +unused-argument:73:0:73:None:AAAA.selected:Unused argument 'args':INFERENCE +unused-argument:73:0:73:None:AAAA.selected:Unused argument 'kwargs':INFERENCE unused-argument:92:23:92:26:BBBB.__init__:Unused argument 'arg':INFERENCE unused-argument:103:34:103:39:Ancestor.set_thing:Unused argument 'other':INFERENCE unused-argument:129:21:129:25:TestClassWithOnlyNew.__new__:Unused argument 'argA':INFERENCE --- a/requirements_test_min.txt +++ b/requirements_test_min.txt @@ -1,6 +1,6 @@ .[testutils,spelling] # astroid dependency is also defined in pyproject.toml -astroid==4.0.2 # Pinned to a specific version for tests +astroid==4.1.1 # Pinned to a specific version for tests typing-extensions~=4.15 py~=1.11.0 pytest~=8.4