Issue #21677: Fixed chaining nonnormalized exceptions in io close() methods.
Issue #21677: Fixed chaining nonnormalized exceptions in io close() methods.
Closes #21256: Printout of keyword args in deterministic order in mock calls.

Printout of keyword args should be in deterministic order in
a mock function call. This will help to write better doctests.
Issue #21310: Fixed possible resource leak in failed open().
Issue #21310: Fixed possible resource leak in failed open().