Issue #12955: Change the urlopen() examples to use context managers where appropriate.

Patch by Martin Panter.