Use 'with' operator for some download functions
NONE
The docs for this PR live [here](https://moon-ci-docs.huggingface.co/docs/datasets/pr_6751). All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.
2024-03-25T15:08:58Z
https://github.com/huggingface/datasets/pull/6751#issuecomment-2018228051
https://api.github.com/repos/huggingface/datasets/issues/6751
IC_kwDODunzps54S7dT
https://api.github.com/repos/huggingface/datasets/issues/comments/2018228051/reactions
2024-03-25T15:08:58Z
https://api.github.com/repos/huggingface/datasets/issues/comments/2018228051
https://avatars.githubusercontent.com/u/99929124?v=4
https://api.github.com/users/HuggingFaceDocBuilderDev/events{/privacy}
https://api.github.com/users/HuggingFaceDocBuilderDev/followers
https://api.github.com/users/HuggingFaceDocBuilderDev/following{/other_user}
https://api.github.com/users/HuggingFaceDocBuilderDev/gists{/gist_id}
https://github.com/HuggingFaceDocBuilderDev
HuggingFaceDocBuilderDev
U_kgDOBfTMJA
https://api.github.com/users/HuggingFaceDocBuilderDev/orgs
https://api.github.com/users/HuggingFaceDocBuilderDev/received_events
https://api.github.com/users/HuggingFaceDocBuilderDev/repos
https://api.github.com/users/HuggingFaceDocBuilderDev/starred{/owner}{/repo}
https://api.github.com/users/HuggingFaceDocBuilderDev/subscriptions
User
https://api.github.com/users/HuggingFaceDocBuilderDev
public
NONE
I was mistaken on the intent of those functions, closing the PR.
2024-03-26T00:40:57Z
https://github.com/huggingface/datasets/pull/6751#issuecomment-2019183308
https://api.github.com/repos/huggingface/datasets/issues/6751
IC_kwDODunzps54WkrM
https://api.github.com/repos/huggingface/datasets/issues/comments/2019183308/reactions
2024-03-26T00:40:57Z
https://api.github.com/repos/huggingface/datasets/issues/comments/2019183308
https://avatars.githubusercontent.com/u/31669?v=4
https://api.github.com/users/Moisan/events{/privacy}
https://api.github.com/users/Moisan/followers
https://api.github.com/users/Moisan/following{/other_user}
https://api.github.com/users/Moisan/gists{/gist_id}
https://github.com/Moisan
Moisan
MDQ6VXNlcjMxNjY5
https://api.github.com/users/Moisan/orgs
https://api.github.com/users/Moisan/received_events
https://api.github.com/users/Moisan/repos
https://api.github.com/users/Moisan/starred{/owner}{/repo}
https://api.github.com/users/Moisan/subscriptions
User
https://api.github.com/users/Moisan
public
Some functions in `streaming_download_manager.py` are not closing the file they open which lead to `Unclosed file` warnings in our code. This fixes a few of them.