-
Notifications
You must be signed in to change notification settings - Fork 384
Disable clobbering of implementations by default #1237
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
Conversation
I think nothing good can come out from clobbing by default. The necessity to clobber=True in process_entries was not well understood by me, but seems to stem from some artificial situation causing re-import of the fsspec
Do you have a reference for this? |
https://github.com/fsspec/filesystem_spec/blob/HEAD/fsspec/tests/test_registry.py#L102 the |
The In short, I think everything is fine, unless you have other concerns. |
@martindurant, following this change, would it be expected for For example: import concurrent.futures
import fsspec # 2023.4.0
def fun(path):
try:
print(path)
with fsspec.open(path) as f:
result = f.read()
except FileNotFoundError:
return "OK" # This error is expected
with concurrent.futures.ThreadPoolExecutor() as executor:
futures = [
executor.submit(fun, path="/path/dummy1"),
executor.submit(fun, path="/path/dummy2"),
]
for future in concurrent.futures.as_completed(futures):
print(future.result()) Results in the following error:
While on A similar example could be created using, for example, |
This should NOT happen. It seems that register is being called twice, perhaps because two instances are being created simultaneously. I bet if you run |
Correct 🙂 |
Maybe we should guard against this anyway, since doing |
I think nothing good can come out from clobbing by default. The necessity to clobber=True in process_entries was not well understood by me, but seems to stem from some artificial situation causing re-import of the fsspec
Follow up to #1227 harmonizing default behavior to have
clobber=False
in both similar functionalities.