Skip to content

🐛 fix(api): accept roaming in user_log_dir and user_log_path - #572

Merged
gaborbernat merged 1 commit into
tox-dev:mainfrom
gaborbernat:fix/log-roaming
Sep 25, 2026
Merged

gaborbernat merged 1 commit into
tox-dev:mainfrom
gaborbernat:fix/log-roaming

Conversation

@gaborbernat

@gaborbernat gaborbernat commented Sep 25, 2026 •

Copy link
Copy Markdown
Member

On Windows user_log_dir is a subdirectory of user_data_dir, which a caller moves from AppData\Local to AppData\Roaming with roaming=True. PlatformDirs(roaming=True) returns the Roaming log directory. The module functions user_log_dir() and user_log_path() rejected roaming with a TypeError, so function callers could not reach it. 🪟

Both functions accept roaming by keyword alone, after use_site_for_root, the slot where #544 and #537 placed multipath and use_site_for_root. Positional callers see no change.

Outside Windows the flag has no effect, as with user_data_dir.

@gaborbernat gaborbernat added the bug Something isn't working label Sep 25, 2026
@gaborbernat
gaborbernat requested a review from ofek as a code owner September 25, 2026 14:29
@gaborbernat gaborbernat added the bug Something isn't working label Sep 25, 2026
@gaborbernat
gaborbernat force-pushed the fix/log-roaming branch 2 times, most recently from 79f20f6 to 93bacb4 Compare September 25, 2026 14:55
On Windows user_log_dir is a subdirectory of user_data_dir, which a
caller moves from AppData\Local to AppData\Roaming with roaming=True.
PlatformDirs(roaming=True) returns the Roaming log directory, but
user_log_dir() and user_log_path() had no roaming argument. Passing it
raised TypeError, and function callers got the Local directory.

Add roaming as a keyword-only argument after use_site_for_root, the
placement tox-dev#537 and tox-dev#544 used, so positional callers see no change.
@gaborbernat
gaborbernat enabled auto-merge (squash) September 25, 2026 17:03
@gaborbernat
gaborbernat merged commit d035fd2 into tox-dev:main Sep 25, 2026
36 checks passed
@gaborbernat
gaborbernat deleted the fix/log-roaming branch October 3, 2026 15:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant