Repository navigation
Conversation
Author
|
Looks like style checks are failing on main too, unrelated to these changes. |
wpbonelli
marked this pull request as ready for review
September 20, 2026 11:15
wpbonelli
added a commit
to MODFLOW-ORG/modflow-devtools
that referenced
this pull request
Sep 20, 2026
Pooch can produce FileExistsError when concurrent workers (e.g. pytest-xdist) try to create the same new subdirectory. Create the directory first with exist_ok=True so pooch's existence check passes. See fatiando/pooch#554 Also place the lock file in the cache directory next to the zip file it protects, rather than in the cwd, so it excludes processes regardless of their working directory and does not litter it.
tkittel
added a commit
to tkittel/mccode-antlr
that referenced
this pull request
Oct 9, 2026
pooch (at least up to 1.9.0) creates the directory of a file it downloads without exist_ok, so when several processes download into the same cache, one fails if another creates the directory at the same time (fatiando/pooch#555, open fix in fatiando/pooch#554). On Windows the error is "[WinError 183] Cannot create a file when that file already exists". The registries now fetch through pooch_fetch(), which creates the directory first, with exist_ok. The new test downloads 100 files into new directories from a local HTTP server with 8 processes: without the workaround, some downloads fail in every run. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
g5t
pushed a commit
to mccode-dev/mccode-antlr
that referenced
this pull request
Oct 9, 2026
pooch (at least up to 1.9.0) creates the directory of a file it downloads without exist_ok, so when several processes download into the same cache, one fails if another creates the directory at the same time (fatiando/pooch#555, open fix in fatiando/pooch#554). On Windows the error is "[WinError 183] Cannot create a file when that file already exists". The registries now fetch through pooch_fetch(), which creates the directory first, with exist_ok. The new test downloads 100 files into new directories from a local HTTP server with 8 processes: without the workaround, some downloads fail in every run. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Avoid
FileExistsErrorwhenstream_downloadis called by multiple processesRelevant issues/PRs:
Same idea as #171 just a different code path