Separates implementations of macOS dirs that share a default#473
Merged
gaborbernat merged 1 commit intotox-dev:mainfrom Apr 6, 2026
Merged
Separates implementations of macOS dirs that share a default#473gaborbernat merged 1 commit intotox-dev:mainfrom
gaborbernat merged 1 commit intotox-dev:mainfrom
Conversation
Some platform dirs on macOS share the same default directory. These would previously share a value set by a mixin-overwritten property such that if you were, for example, to set XDG_DATA_HOME but not XDG_CONFIG_HOME, both `user_config_dir` and `user_data_dir` would both return the value of XDG_DATA_HOME: The values you would overwrite with the XDG_* variables bled into one another if you didn't set all of them. This commit moves the shared implementations to their own macos-internal helper methods for each of `user_config_dir`, `user_data_dir`, `user_state_dir`, `_site_config_dirs`, and `_site_data_dirs`. Each of these properties now call to their respective helper method separately so that none of them bleed into others through a mixin-overwritten default property.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Some platform dirs on macOS share the same default directory. These would previously share a value set by a mixin-overwritten property such that if you were, for example, to set XDG_DATA_HOME but not XDG_CONFIG_HOME, both
user_config_diranduser_data_dirwould both return the value of XDG_DATA_HOME: The values you would overwrite with the XDG_* variables bled into one another if you didn't set all of them.This commit moves the shared implementations to their own macos-internal helper methods for each of
user_config_dir,user_data_dir,user_state_dir,_site_config_dirs, and_site_data_dirs. Each of these properties now call to their respective helper method separately so that none of them bleed into others through a mixin-overwritten default property.