Closed yarikoptic closed 2 years ago
@yarikoptic Normally, datalad fusefs
is meant to be run as a command, in which case all the instances of classes that use @lru_cache
are deleted when the program exits anyway. I can only see this being a problem if someone were to invoke datalad.api.fusefs()
multiple times in a single process.
Either way, the best option for replacing @lru_cache
seems to be the methodtools package.
I can only see this being a problem if someone were to invoke
datalad.api.fusefs()
multiple times in a single process.
and even then I am not 100% certain it wouldn't be a "feature" -- don't we want to retain those instances as long as their methods are in the cache? I think we want, so let's just keep them and ignore those warnings for now.
Or am I missing some aspect?
@yarikoptic If datalad.api.fusefs()
is called multiple times in the same process, even if it's passed the same arguments, new instances of the datalad-fusefs
classes will be constructed, and they will not have access to cached results from previous instances.
ah -- gotcha. Let's then switch to methodtools
I have mentioned while looking at https://github.com/datalad/datalad-fuse/runs/6672682413?check_suite_focus=true of #72 that linting gives us
Needs analysis on either it is something to just ignore or we indeed would retain too many instances.