Skip to content

Fix regression for catching empty tuple in except#21153

Open
hauntsaninja wants to merge 2 commits intopython:masterfrom
hauntsaninja:excempty
Open

Fix regression for catching empty tuple in except#21153
hauntsaninja wants to merge 2 commits intopython:masterfrom
hauntsaninja:excempty

Conversation

@hauntsaninja
Copy link
Copy Markdown
Collaborator

Fixes #21152

@hauntsaninja hauntsaninja force-pushed the excempty branch 2 times, most recently from d822ecf to 64c3d86 Compare April 2, 2026 23:13
@github-actions

This comment has been minimized.

@hauntsaninja
Copy link
Copy Markdown
Collaborator Author

@ilevkivskyi can you help me understand why are the parallel tests are failing on this one?

@ilevkivskyi
Copy link
Copy Markdown
Member

I am already going to bed, didn't actually look, but judging from the test output, most likely this is a bug in ast-serialize (it is automatically used for parallel checking).

@ilevkivskyi
Copy link
Copy Markdown
Member

Yeah, quickly looked at read_try_stmt() we don't set line/column for var_expr.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 3, 2026

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

pass
[builtins fixtures/tuple.pyi]

[case testExceptWithMultipleTypes6_no_parallel]
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Could you please open an issue in ast_serialize tracker about this, and leave a comment above why this is skipped?

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.

[1.20 regression] no longer accepts the empty tuple for except ...:

2 participants