Fix AsyncFileSystem monkeypatching breaking 3rd-party file systems#1241
Fix AsyncFileSystem monkeypatching breaking 3rd-party file systems#1241gutzbenj merged 1 commit intoearthobservations:mainfrom
AsyncFileSystem monkeypatching breaking 3rd-party file systems#1241Conversation
|
After reviewing the code, it's not clear to my why the Another note, maybe the patching should be opt-in for users, as it might be unexpected that (transient) dependencies break other installed packages simply by importing something. |
|
Dear @provinzkraut , the patching has a long story you could break down to the following problems:
What do you think about index caching? And would you like to work on that as well on fsspec side? The PR currently needs to be fixed. [1] https://opendata.dwd.de/climate_environment/CDC/observations_germany/climate/1_minute/precipitation/historical/ |
|
Thanks for the detailed explanation @gutzbenj! One thing I don't fully understand though is this part:
You're patching the |
|
The reason lays here: https://github.com/fsspec/filesystem_spec/blob/1dfed9d9c23aa30b19bad536a578cda6addb7de0/fsspec/spec.py#L149 |
The monkeypatching done for
AsyncFileSystemcurrently breaks 3rd partyAsyncFileSystembecause it doesn't use cooperative inheritance, so not__init__s in a classes MRO are called when subclassingAsyncFileSystem, breaking filesystems like adlfs.This PR fixes that by adding the missing
super().__init__call.