Skip to content

Allow deeper recursion in mypy daemon, better error reporting - #17707

Merged
hauntsaninja merged 10 commits into
python:masterfrom
kcdodd:issue-17706
Apr 17, 2025
Merged

Allow deeper recursion in mypy daemon, better error reporting#17707
hauntsaninja merged 10 commits into
python:masterfrom
kcdodd:issue-17706

Conversation

@kcdodd

@kcdodd kcdodd commented Aug 23, 2024

Copy link
Copy Markdown
Contributor

Fixes #17706

Handles recursion error during parse of too complex expressions, differentiates from internal recursion errors by attempting to unparse the ast. If builtin ast.unparse fails, then the error is ignored. Otherwise, re-raises.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

Copy link
Copy Markdown
Contributor

According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅

@kcdodd
kcdodd marked this pull request as ready for review August 25, 2024 15:05

@hauntsaninja hauntsaninja left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@hauntsaninja hauntsaninja changed the title Initial attempt at fixing issue-17706 Allow deeper recursion in mypy daemon, better error reporting Apr 17, 2025
@hauntsaninja
hauntsaninja merged commit df60055 into python:master Apr 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

dmypy crashes from RecursionError for some complex expressions (fastparse)

2 participants