Merge pull request #728 from rafrafek/patch-1

Update docs to use context manager