CLN: contextmanagers should yield in a try-finally block
`@contextmanagers` should yield within a try-finally block to release/reset even when an error occurs.
what motivated this change? e.g. did you see an error on something? > what motivated this change? e.g. did you see an error on something?

No error, was just grepping for `@contextmanager` to see whether they all use try-finally. I think at least the change in `file_leak_context` should be very useful to verify that IO even closes file handles in case of an error (not sure how important the other two changes are). thanks @twoertwein 