Subject: 30.1; Python mode indentation incorrect for multi-line "with" statements

From: Tim Landscheidt <[email-masked]>
Date: Thu, 07 Aug 2025 09:49:38 +0000

https://docs.python.org/3/reference/compound_stmts.html#the-with-statement
allows for multi-item context managers in "with" statements
surrounded by parentheses:

| with (
|     A() as a,
|     B() as b,
| ):
|     SUITE

I. e., the context managers are indented to the same level
as the suite.

However, when entering the example above, Emacs 30.1/Fedora
41 indents it as:

| with (
|         A() as a,
|         B() as b,
|         ):
|     SUITE

I. e., the context managers are indented two levels instead
of one, and the closing parenthesis is indented two levels
instead of none.