File tree 2 files changed +10
-0
lines changed
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
30
30
- {pull}` 587 ` improves typing of ` capture.py ` .
31
31
- {pull}` 588 ` resets class variables of ` ExecutionReport ` and ` Traceback ` .
32
32
- {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.
33
36
34
37
## 0.4.6 - 2024-03-13
35
38
Original file line number Diff line number Diff line change 14
14
15
15
from attrs import define
16
16
from attrs import field
17
+ from upath import UPath
17
18
from upath ._stat import UPathStatResult
18
19
19
20
from _pytask ._hashlib import hash_value
@@ -376,6 +377,12 @@ def _get_state(path: Path) -> str | None:
376
377
A simple function to handle local and remote files.
377
378
378
379
"""
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
+
379
386
try :
380
387
stat = path .stat ()
381
388
except FileNotFoundError :
You can’t perform that action at this time.
0 commit comments