Local environment configuration is not respected for app file storage
#2,867 opened on Sep 22, 2024
Description
Describe the bug
Toga makes assumptions about which file paths to use for toga.Paths; this can conflict with local machine configuration that should affect arbitrary application storage. For instance, on GTK, if I configure my XDG env vars to something other than the default values, then Toga will ignore this.
Steps to reproduce
For the system, configure application storage with values other than the default and run a Toga app that creates filesystem content.
Expected behavior
Toga should respect local machine configuration for application storage. Given this configuration can be complex on any given platform, the platformdirs package provides nice abstractions. In the least, their logic should be used on Desktop, I think. Outside of Linux distros going rogue....this is also probably important for enterprise environments where IT wants apps to work in a certain way.
Screenshots
No response
Environment
- Operating System: all
- Python version: all
- Software versions:
- Toga: 0.4.7
Logs
No response
Additional context
I see that https://github.com/beeware/toga/pull/1964 confirms the same default behavior as platformdirs....but it seemed to have been a foregone conclusion that platformdirs would not become a dependency for Toga.