Skip to content

Conversation

@crusaderky
Copy link
Contributor

@crusaderky crusaderky commented Dec 12, 2025

  • Allow downstream code to selectively catch URLError when a download fails.
    Notably, this enables downstream tests to use
@pytest.mark.xfail(raises=URLError, reason="download from the internet may fail", strict=False)
def test1():
    dataset = ml_datasets.<some function>()
    ...

which will allow for flakiness only in case of download failure, and trigger a test failure otherwise.

  • Fix bug where HTTPError would be treated as a generic URLError.

Copy link

@ngoldbaum ngoldbaum left a comment

Choose a reason for hiding this comment

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

I think this can't break any existing error handling, because except Exception blocks will still catch these errors.

This change makes sense to me.

@crusaderky crusaderky merged commit 783a85b into explosion:master Dec 12, 2025
8 checks passed
@crusaderky crusaderky deleted the fetch_fail branch December 12, 2025 18:10
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.

2 participants