Sorry Pablo, I don’t understand your dismissal here.
I agree that looking forward to 3.11 and beyond, this would be an
excellent improvement. But if assert (cond, msg) becomes legal in
3.11, then there will be temptation for people to use that form in
library code that has to support older versions, where the parentheses
change the meaning of the code.
You say that “The code is not syntactically invalid in older versions”
but that is incorrect, assert (cond, msg) is valid in at least some
older versions, it’s just wrong. Example:
python3.7 -c "assert (False, 'This should fail')"
should fail, but silently succeeds. And there is no SyntaxWarning.
(There is a SyntaxWarning under 3.10.)
You say the code “won’t do anything opposite on older versions”, but it
does: it takes failing assertions and turns them into passing assertions.
Even though they shouldn’t do this, many people use assertions as a lazy
way of writing error checking code, so this could potentially take
libraries that work (or at least work if you don’t run them under -O)
and disable their error checking.
So I think that you need a stronger justification why this backwards-
incompatible change is safe to go ahead without a future import.
By the way, if this PEP is approved, I assume that we’ll still need to
keep the SyntaxWarning (and upgrade it to a SyntaxError?) to cover the
1-tuple and 3+ tuple cases
assert () # OK, this is like assert False
assert (cond,) # always succeeds, needs a warning