Promote a few remaining errors in ext/standard Closes GH-6110
Trim trailing whitespaces and fix code style Closes GH-5554.
Fixed bug #79526 (`__sleep` error message doesn't include the name of the class)