diff --git a/ChangeLog b/ChangeLog index 245910e58b..b1b4f7138e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -321,6 +321,10 @@ Release date: TBA Relates to #6531 +* Fix a crash when accessing ``__code__`` and assigning it to a variable. + + Closes #6539 + What's New in Pylint 2.13.8? ============================ diff --git a/doc/whatsnew/2.13.rst b/doc/whatsnew/2.13.rst index b7a3eeff49..633d9233f3 100644 --- a/doc/whatsnew/2.13.rst +++ b/doc/whatsnew/2.13.rst @@ -635,6 +635,10 @@ Other Changes Closes #3979 +* Fix a crash when accessing ``__code__`` and assigning it to a variable. + + Closes #6539 + * Fix a crash when linting a file that passes an integer ``mode=`` to ``open`` diff --git a/requirements_test_min.txt b/requirements_test_min.txt index 7c91d2d29a..9b0d00ac8f 100644 --- a/requirements_test_min.txt +++ b/requirements_test_min.txt @@ -1,6 +1,6 @@ -e .[testutils,spelling] # astroid dependency is also defined in setup.cfg -astroid==2.11.4 # Pinned to a specific version for tests +astroid==2.11.5 # Pinned to a specific version for tests typing-extensions~=4.2 pytest~=7.1 pytest-benchmark~=3.4 diff --git a/setup.cfg b/setup.cfg index b75643e4cf..8eadab3a78 100644 --- a/setup.cfg +++ b/setup.cfg @@ -47,7 +47,7 @@ install_requires = # Also upgrade requirements_test_min.txt if you are bumping astroid. # Pinned to dev of next minor update to allow editable installs, # see https://github.com/PyCQA/astroid/issues/1341 - astroid>=2.11.4,<=2.12.0-dev0 + astroid>=2.11.5,<=2.12.0-dev0 isort>=4.2.5,<6 mccabe>=0.6,<0.8 tomli>=1.1.0;python_version<"3.11" diff --git a/tests/functional/i/invalid/invalid_name/invalid_name_module_level.py b/tests/functional/i/invalid/invalid_name/invalid_name_module_level.py index 355969f39a..ec2b2769be 100644 --- a/tests/functional/i/invalid/invalid_name/invalid_name_module_level.py +++ b/tests/functional/i/invalid/invalid_name/invalid_name_module_level.py @@ -21,3 +21,6 @@ def A(): # [invalid-name] CONSTD = A() CONST = "12 34 ".rstrip().split() + + +assignment_that_crashed_pylint = type(float.__new__.__code__)