[Python-ideas] Add appdirs module to stdlib

Jonas Wielicki j.wielicki at sotecware.net
Thu Sep 3 10:43:59 CEST 2015

On 01.09.2015 23:22, Nathaniel Smith wrote:
> What makes it particularly difficult is that if you "fix a bug" in
> a library like appdirs, so that it starts suddenly returning
> different results on some computer somewhere, then what it looks
> like to the end user is that their data/settings/whatever have
> suddenly evaporated and whatever disk space was being used for
> caches never gets cleaned up and so forth. Generally when
> applications change how they compute these directories, they also
> include tricky migration logic to check both the old and new names,
> move stuff over if needed, but I'm not sure how a low-level library
> like this can support that usefully...

A low-level library could provide an API to return "legacy"
directories. These could on Freedesktop-compliant systems for example
be the fallback directories which are used when the
environment-variables are not present. And after bugfixes (see what
Nick said), the old, incorrect behaviour could be presented.

An application could, after not finding its data in the non-legacy
directories, query the legacy directories and start a migration process.


More information about the Python-ideas mailing list