Title: pylint is broken with CPython main · Issue #101914 · python/cpython · GitHub
Open Graph Title: pylint is broken with CPython main · Issue #101914 · python/cpython
X Title: pylint is broken with CPython main · Issue #101914 · python/cpython
Description: Bug report pylint currently crashes with CPython main. I noticed this when I noticed the pylint benchmark in Pyston's benchmark suite was no longer working. The first bad commit is 4a1c58d (@markshannon), issue #96793, PR #98772. I don't...
Open Graph Description: Bug report pylint currently crashes with CPython main. I noticed this when I noticed the pylint benchmark in Pyston's benchmark suite was no longer working. The first bad commit is 4a1c58d (@marksh...
X Description: Bug report pylint currently crashes with CPython main. I noticed this when I noticed the pylint benchmark in Pyston's benchmark suite was no longer working. The first bad commit is 4a1c58d (@ma...
Opengraph URL: https://github.com/python/cpython/issues/101914
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"pylint is broken with CPython main","articleBody":"# Bug report\r\n\r\n`pylint` currently crashes with CPython main. I noticed this when I noticed the `pylint` benchmark in Pyston's benchmark suite was no longer working.\r\n\r\nThe first bad commit is 4a1c58d504a49eeb9be7beef3ca861a9d6b28ede (@markshannon), issue #96793, PR #98772.\r\n\r\nI don't know whether this is the result of expected breakage (and `pylint` or `astroid` needs to modify their code) or there is a specialization failure here.\r\n\r\n# Your environment\r\n\r\nLinux\r\n\r\n# To reproduce\r\n\r\n`pip install pylint==2.16.2`\r\n\r\nDownload the example Python file from [the pyston macrobenchmark suite](https://github.com/pyston/python-macrobenchmarks/blob/main/benchmarks/bm_pylint/data/pylint_target/dist.py)\r\n\r\n`pylint dist.py`\r\n\r\nBacktrace:\r\n\r\n```pytb\r\nException on node \u003cCall l.430 at 0x7ff062d76ae0\u003e in file '/home/mdboom/Work/builds/python-macrobenchmarks/benchmarks/bm_pylint/data/pylint_target/dist.py'\r\nTraceback (most recent call last):\r\n File \"/home/mdboom/Work/builds/python-macrobenchmarks/benchmarks/bm_pylint/venv/lib/python3.12/site-packages/astroid/inference.py\", line 450, in infer_subscript\r\n assigned = value.getitem(index_value, context)\r\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n File \"/home/mdboom/Work/builds/python-macrobenchmarks/benchmarks/bm_pylint/venv/lib/python3.12/site-packages/astroid/nodes/node_classes.py\", line 2466, in getitem\r\n raise AstroidIndexError(index)\r\nastroid.exceptions.AstroidIndexError: \u003cexception str() failed\u003e\r\n\r\nThe above exception was the direct cause of the following exception:\r\n\r\nTraceback (most recent call last):\r\n File \"/home/mdboom/Work/builds/python-macrobenchmarks/benchmarks/bm_pylint/venv/lib/python3.12/site-packages/pylint/utils/ast_walker.py\", line 91, in walk\r\n callback(astroid)\r\n File \"/home/mdboom/Work/builds/python-macrobenchmarks/benchmarks/bm_pylint/venv/lib/python3.12/site-packages/pylint/checkers/base/basic_checker.py\", line 705, in visit_call\r\n if utils.is_terminating_func(node):\r\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n File \"/home/mdboom/Work/builds/python-macrobenchmarks/benchmarks/bm_pylint/venv/lib/python3.12/site-packages/pylint/checkers/utils.py\", line 2181, in is_terminating_func\r\n return True\r\n ^^^^\r\n File \"/home/mdboom/Work/builds/python-macrobenchmarks/benchmarks/bm_pylint/venv/lib/python3.12/site-packages/astroid/nodes/node_ng.py\", line 171, in infer\r\n yield from self._infer(context=context, **kwargs)\r\n File \"/home/mdboom/Work/builds/python-macrobenchmarks/benchmarks/bm_pylint/venv/lib/python3.12/site-packages/astroid/decorators.py\", line 142, in raise_if_nothing_inferred\r\n yield next(generator)\r\n ^^^^^^^^^^^^^^^\r\n File \"/home/mdboom/Work/builds/python-macrobenchmarks/benchmarks/bm_pylint/venv/lib/python3.12/site-packages/astroid/decorators.py\", line 119, in wrapped\r\n yielded.add(ares)\r\n File \"/home/mdboom/Work/builds/python-macrobenchmarks/benchmarks/bm_pylint/venv/lib/python3.12/site-packages/astroid/inference.py\", line 380, in infer_attribute\r\n context.boundnode = old_boundnode\r\n ^^^^^^^^^^^^^^^^^\r\n File \"/home/mdboom/Work/builds/python-macrobenchmarks/benchmarks/bm_pylint/venv/lib/python3.12/site-packages/astroid/nodes/node_ng.py\", line 184, in infer\r\n for i, result in enumerate(self._infer(context=context, **kwargs)):\r\n File \"/home/mdboom/Work/builds/python-macrobenchmarks/benchmarks/bm_pylint/venv/lib/python3.12/site-packages/astroid/decorators.py\", line 142, in raise_if_nothing_inferred\r\n yield next(generator)\r\n ^^^^^^^^^^^^^^^\r\n File \"/home/mdboom/Work/builds/python-macrobenchmarks/benchmarks/bm_pylint/venv/lib/python3.12/site-packages/astroid/decorators.py\", line 119, in wrapped\r\n yielded.add(ares)\r\n File \"/home/mdboom/Work/builds/python-macrobenchmarks/benchmarks/bm_pylint/venv/lib/python3.12/site-packages/astroid/inference.py\", line 458, in infer_subscript\r\n raise InferenceError(node=self, context=context) from exc\r\nastroid.exceptions.InferenceError: Inference failed for \u003cSubscript l.430 at 0x7ff062d76b40\u003e.\r\n************* Module pylint_target.dist\r\ndata/pylint_target/dist.py:1:0: C0302: Too many lines in module (1261/1000) (too-many-lines)\r\ndata/pylint_target/dist.py:22:0: E0401: Unable to import 'distutils.errors' (import-error)\r\ndata/pylint_target/dist.py:22:0: W4901: Deprecated module 'distutils.errors' (deprecated-module)\r\ndata/pylint_target/dist.py:22:0: W0401: Wildcard import distutils.errors (wildcard-import)\r\ndata/pylint_target/dist.py:23:0: E0401: Unable to import 'distutils.fancy_getopt' (import-error)\r\ndata/pylint_target/dist.py:23:0: W4901: Deprecated module 'distutils.fancy_getopt' (deprecated-module)\r\ndata/pylint_target/dist.py:24:0: E0401: Unable to import 'distutils.util' (import-error)\r\ndata/pylint_target/dist.py:24:0: W4901: Deprecated module 'distutils.util' (deprecated-module)\r\ndata/pylint_target/dist.py:25:0: E0401: Unable to import 'distutils' (import-error)\r\ndata/pylint_target/dist.py:25:0: W4901: Deprecated module 'distutils' (deprecated-module)\r\ndata/pylint_target/dist.py:26:0: E0401: Unable to import 'distutils.debug' (import-error)\r\ndata/pylint_target/dist.py:26:0: W4901: Deprecated module 'distutils.debug' (deprecated-module)\r\ndata/pylint_target/dist.py:49:0: R0902: Too many instance attributes (27/7) (too-many-instance-attributes)\r\ndata/pylint_target/dist.py:278:26: C0209: Formatting a regular string which could be a f-string (consider-using-f-string)\r\ndata/pylint_target/dist.py:141:4: R0912: Too many branches (18/12) (too-many-branches)\r\ndata/pylint_target/dist.py:141:4: R0915: Too many statements (60/50) (too-many-statements)\r\ndata/pylint_target/dist.py:305:8: W0622: Redefining built-in 'dict' (redefined-builtin)\r\ndata/pylint_target/dist.py:310:4: C0116: Missing function or method docstring (missing-function-docstring)\r\ndata/pylint_target/dist.py:311:8: C0415: Import outside toplevel (pprint.pformat) (import-outside-toplevel)\r\ndata/pylint_target/dist.py:328:30: C0209: Formatting a regular string which could be a f-string (consider-using-f-string)\r\ndata/pylint_target/dist.py:331:30: C0209: Formatting a regular string which could be a f-string (consider-using-f-string)\r\ndata/pylint_target/dist.py:382:26: C0209: Formatting a regular string which could be a f-string (consider-using-f-string)\r\ndata/pylint_target/dist.py:386:4: C0116: Missing function or method docstring (missing-function-docstring)\r\ndata/pylint_target/dist.py:387:8: C0415: Import outside toplevel (configparser.ConfigParser) (import-outside-toplevel)\r\ndata/pylint_target/dist.py:410:30: C0209: Formatting a regular string which could be a f-string (consider-using-f-string)\r\ndata/pylint_target/dist.py:424:12: C2801: Unnecessarily calls dunder method __init__. Instantiate class directly. (unnecessary-dunder-call)\r\ndata/pylint_target/dist.py:1:0: F0002: data/pylint_target/dist.py: Fatal error while checking 'data/pylint_target/dist.py'. Please open an issue in our bug tracker so we address this. There is a pre-filled template that you can use in '/home/mdboom/.cache/pylint/pylint-crash-2023-02-14-15-25-33.txt'. (astroid-error)\r\n\r\n------------------------------------------------------------------\r\nYour code has been rated at 0.00/10 (previous run: 0.00/10, +0.00)\r\n```\r\n","author":{"url":"https://github.com/mdboom","@type":"Person","name":"mdboom"},"datePublished":"2023-02-14T20:30:40.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/101914/cpython/issues/101914"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:476073a0-9cf3-47a4-3ae3-1d891a32bec6 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D2FA:1672C1:4B0797:622D82:696AE241 |
| html-safe-nonce | c7afe63242ab26fe6c7513031b1e1480a1ab11de581abbc6f1da2c04b01f9377 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMkZBOjE2NzJDMTo0QjA3OTc6NjIyRDgyOjY5NkFFMjQxIiwidmlzaXRvcl9pZCI6IjUyNTY5NTYxMTI4MzYxNTgwMTciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 9cc861745dc63cbcbc41a828e79afde178fdd1e8c99232f0e8c11f9c33f1c41b |
| hovercard-subject-tag | issue:1584785769 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/cpython/101914/issue_layout |
| twitter:image | https://opengraph.githubassets.com/fea85f7292e9951191221dd9730e1398bf886b67c4f1fd2207305f474b917169/python/cpython/issues/101914 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/fea85f7292e9951191221dd9730e1398bf886b67c4f1fd2207305f474b917169/python/cpython/issues/101914 |
| og:image:alt | Bug report pylint currently crashes with CPython main. I noticed this when I noticed the pylint benchmark in Pyston's benchmark suite was no longer working. The first bad commit is 4a1c58d (@marksh... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | mdboom |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5f99f7c1d70f01da5b93e5ca90303359738944d8ab470e396496262c66e60b8d |
| turbo-cache-control | no-preview |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 3d84d50b3c75fa36755c3cf392edbc09e626f979 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width