Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

FIX race condition in get_data_home causing FileExistsError #19560

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 1, 2021

Conversation

ogrisel
Copy link
Member

@ogrisel ogrisel commented Feb 25, 2021

It's safer to use os.makedirs(..., exists_ok=True) now that we don't have to support Python 2 anymore.

This should avoid spurious failures when running the tests with pytest-xdist:

https://dev.azure.com/scikit-learn/scikit-learn/_build/results?buildId=26901&view=logs&j=e6d5b7c0-0dfd-5ddf-13d5-c71bebf56ce2&t=c500742d-7cbe-569e-8da5-94db9b4cd21e&l=445

I don't think this change requires additional tests or a changelog entry. Let me know if you disagree.

Copy link
Member

@thomasjpfan thomasjpfan left a comment

Choose a reason for hiding this comment

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

Yea I've been seeing this too and I do not think we need a test for this.

Besides the small lint issue. LGTM

@ogrisel ogrisel merged commit 8d3b424 into scikit-learn:main Mar 1, 2021
@ogrisel ogrisel deleted the get_data_home-FileExistsError branch March 1, 2021 13:45
@ogrisel
Copy link
Member Author

ogrisel commented Mar 1, 2021

I merged this because it might also be the cause of other random failures such as #19587.

@glemaitre glemaitre mentioned this pull request Apr 22, 2021
12 tasks
glemaitre pushed a commit to glemaitre/scikit-learn that referenced this pull request Apr 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.