traits
traits copied to clipboard
Use appdirs in ETSConfig
Or perhaps even better, deprecate all the directory management and tell people to use appdirs
instead?
Default user directories could then be an application configuration option.
We would need some way to tell Pyface, TraitsUI, Kiva, etc. where to put caches and mementos, but it may be good enough to have library-specific caches.
@corranwebster Do I remember that you experimented with this at one point? I seem to remember that there were some things it turned out that appdirs
didn't quite solve. Do you remember what those things were?
@corranwebster Do I remember that you experimented with this at one point? I seem to remember that there were some things it turned out that
appdirs
didn't quite solve. Do you remember what those things were?
@corranwebster its been a while now but I'm just starting to look at this / a related issue I was curious if you had an answer here. I also notice that the latest appdirs
release on PyPI was on May 11 2020 so it is possible the things you had found have changed by now anyways but even so
I don't remember entirely, but looking again right now, there are things like that appdirs
version of the "user data directory" is different from ETSConfig's (appdirs is "where you put user-specific application data" whereas ETSConfig's is "where users save documents") and appdirs
has no equivalent of ETSConfig's.
It also has different (but reasonable) locations for some other stuff, but which means that there needs to be a way to transition from the old directory locations to the new which would need to be handled somehow.
So we're in a situation where using appdirs in ETSConfig means that we don't get to use the extra stuff that it provides, but we still need to have some code that does os-specific directory name mangling. Plus we still have ETSConfig sitting in Traits.
I still think that the solution to this is a library slightly above Traits, but which handles things like app configuration and toolkit selection without assuming the existence of Pyface or TraitsUI.