File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,9 @@ releases are available on [PyPI](https://pypi.org/project/pytask) and
3030- {pull}` 587 ` improves typing of ` capture.py ` .
3131- {pull}` 588 ` resets class variables of ` ExecutionReport ` and ` Traceback ` .
3232- {pull}` 590 ` fixes an error introduced in {pull}` 588 ` .
33+ - {pull}` 591 ` invalidates the cache of fsspec when checking whether a remote file
34+ exists. Otherwise, a remote file might be reported as missing although it was just
35+ created. See https://github.com/fsspec/s3fs/issues/851 for more info.
3336
3437## 0.4.6 - 2024-03-13
3538
Original file line number Diff line number Diff line change 1414
1515from attrs import define
1616from attrs import field
17+ from upath import UPath
1718from upath ._stat import UPathStatResult
1819
1920from _pytask ._hashlib import hash_value
@@ -376,6 +377,12 @@ def _get_state(path: Path) -> str | None:
376377 A simple function to handle local and remote files.
377378
378379 """
380+ # Invalidate the cache of the path if it is a UPath because it might have changed in
381+ # a different process with pytask-parallel and the main process does not know about
382+ # it and relies on the cache.
383+ if isinstance (path , UPath ):
384+ path .fs .invalidate_cache ()
385+
379386 try :
380387 stat = path .stat ()
381388 except FileNotFoundError :
You can’t perform that action at this time.
0 commit comments