Fix stream oscar
MEMBER
One additional note: if we can try to not change the code of oscar.py too often, I'm sure users that have it in their cache directory will be happy to not have to redownload it every time they update the library ;)

(since changing the code changes the cache directory of the dataset)
2021-08-17T13:16:59Z
https://github.com/huggingface/datasets/pull/2811#issuecomment-900290038
https://api.github.com/repos/huggingface/datasets/issues/2811
IC_kwDODunzps41qVX2
https://api.github.com/repos/huggingface/datasets/issues/comments/900290038/reactions
2021-08-17T13:16:59Z
https://api.github.com/repos/huggingface/datasets/issues/comments/900290038
https://avatars.githubusercontent.com/u/42851186?v=4
https://api.github.com/users/lhoestq/events{/privacy}
https://api.github.com/users/lhoestq/followers
https://api.github.com/users/lhoestq/following{/other_user}
https://api.github.com/users/lhoestq/gists{/gist_id}
https://github.com/lhoestq
lhoestq
MDQ6VXNlcjQyODUxMTg2
https://api.github.com/users/lhoestq/orgs
https://api.github.com/users/lhoestq/received_events
https://api.github.com/users/lhoestq/repos
https://api.github.com/users/lhoestq/starred{/owner}{/repo}
https://api.github.com/users/lhoestq/subscriptions
User
https://api.github.com/users/lhoestq
public
MEMBER
I don't think this is confusing for users because users don't even know we have patched `open`. The only thing users care is that if the pass `streaming=True`, they want to be able to load the dataset in streaming mode.

I don't see any other dataset where patching `open` with `fsspec.open`+`compression` is an "underlying issue". Are there other datasets where this is an issue?

The only dataset where this was an issue is in oscar and the issue is indeed due to the additional `open` you added inside `zip.open`.
2021-08-17T14:34:19Z
https://github.com/huggingface/datasets/pull/2811#issuecomment-900352936
https://api.github.com/repos/huggingface/datasets/issues/2811
IC_kwDODunzps41qkuo
https://api.github.com/repos/huggingface/datasets/issues/comments/900352936/reactions
2021-08-17T14:34:19Z
https://api.github.com/repos/huggingface/datasets/issues/comments/900352936
https://avatars.githubusercontent.com/u/8515462?v=4
https://api.github.com/users/albertvillanova/events{/privacy}
https://api.github.com/users/albertvillanova/followers
https://api.github.com/users/albertvillanova/following{/other_user}
https://api.github.com/users/albertvillanova/gists{/gist_id}
https://github.com/albertvillanova
albertvillanova
MDQ6VXNlcjg1MTU0NjI=
https://api.github.com/users/albertvillanova/orgs
https://api.github.com/users/albertvillanova/received_events
https://api.github.com/users/albertvillanova/repos
https://api.github.com/users/albertvillanova/starred{/owner}{/repo}
https://api.github.com/users/albertvillanova/subscriptions
User
https://api.github.com/users/albertvillanova
public
MEMBER
Closing this one since https://github.com/huggingface/datasets/pull/2822 reverted the change of behavior of `open`
2021-08-26T10:26:14Z
https://github.com/huggingface/datasets/pull/2811#issuecomment-906283062
https://api.github.com/repos/huggingface/datasets/issues/2811
IC_kwDODunzps42BMg2
https://api.github.com/repos/huggingface/datasets/issues/comments/906283062/reactions
2021-08-26T10:26:14Z
https://api.github.com/repos/huggingface/datasets/issues/comments/906283062
https://avatars.githubusercontent.com/u/42851186?v=4
https://api.github.com/users/lhoestq/events{/privacy}
https://api.github.com/users/lhoestq/followers
https://api.github.com/users/lhoestq/following{/other_user}
https://api.github.com/users/lhoestq/gists{/gist_id}
https://github.com/lhoestq
lhoestq
MDQ6VXNlcjQyODUxMTg2
https://api.github.com/users/lhoestq/orgs
https://api.github.com/users/lhoestq/received_events
https://api.github.com/users/lhoestq/repos
https://api.github.com/users/lhoestq/starred{/owner}{/repo}
https://api.github.com/users/lhoestq/subscriptions
User
https://api.github.com/users/lhoestq
public
Previously, an additional `open` was added to oscar to make it stream-compatible: 587bbb94e891b22863b312b99696e32708c379f4.

This was argued that might be problematic: https://github.com/huggingface/datasets/pull/2786#discussion_r690045921

This PR:
- removes that additional `open`
- patches `gzip.open` with `xopen` + `compression="gzip"`