Skip to content

Conversation

@Wauplin
Copy link
Contributor

@Wauplin Wauplin commented Sep 18, 2025

Related to huggingface/huggingface_hub#3340.

This PR adapts datasets to be compatible with both huggingface_hub v0.x and v1.x.

In practice nothing else should change (I've checked the codebase). The HfHubHTTPError is a base error defined in huggingface_hub that inherits from requests.HTTPError in v0.x and will inherit from httpx.HTTPError in v1.x. It has been introduced ~2 years ago so it's fine to use it right now (i.e. no need to wait for v1.x release or bump minimal version).

Most of the changes have been around the test suite to make sure that tests are passing with both requests and httpx backends. Mid-term it would be good to completely remove the requests dependency from datasets but that's an orthogonal topic.

@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

"fsspec[http]>=2023.1.0,<=2025.9.0",
# To get datasets from the Datasets Hub on huggingface.co
"huggingface-hub>=0.24.0",
"huggingface-hub>=0.25.0,<2.0",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bumping to 0.25.0 to be able to use update_repo_settings in tests. Honestly not a big breaking change IMO (dates back to Sept. 2024)

@Wauplin Wauplin changed the title Adapt and test huggingface_hub v1.0.0.rc0 Support huggingface_hub v0.x and v1.x Sep 30, 2025
@Wauplin Wauplin marked this pull request as ready for review September 30, 2025 13:53
@Wauplin
Copy link
Contributor Author

Wauplin commented Sep 30, 2025

@lhoestq could you have a look at this PR please? It makes datasets compatible with the upcoming huggingface_hub v1.0 release while staying compatible with 0.x. Look at PR description for more details.

The CI is currently failing because of 429 rate limit errors but otherwise everything should be fine (made extensive local and ci tests to ensure that). Let me know if you notice anything weird. PR is ready to be merged "as-is" in my opinion.

Copy link
Member

@lhoestq lhoestq left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm !

@lhoestq lhoestq merged commit a0c786c into main Oct 1, 2025
36 of 54 checks passed
@lhoestq lhoestq deleted the ci-test-huggingface-hub-v1.0.0.rc0 branch October 1, 2025 13:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants