beeware/toga

Local environment configuration is not respected for app file storage

Open

#2,867 建立於 2024年9月22日

在 GitHub 查看
 (8 留言) (0 反應) (0 負責人)Python (3,615 star) (624 fork)batch import
buggood first issuegtklinuxqtwindows

描述

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.

貢獻者指南