Fix Python 3.8 incompatible `with` statements.
Review Request #15029 — Created May 7, 2026 and submitted — Latest diff uploaded
Change d6f083ba introduced some
withstatements that used multiple
conditions, which doesn't work on Python 3.8. This change fixes those
up.
Ran affected tests.