-
-
Notifications
You must be signed in to change notification settings - Fork 213
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feature: use cache directory in user folder if possible #213
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Liking this so far. Seems like a drop-in, progressive enhancement, to the permission warnings throughout the years.
mock_version_module.version = "1.2.3" | ||
monkeypatch.setitem(sys.modules, "tldextract._version", mock_version_module) | ||
|
||
assert get_pkg_unique_identifier() == "3.8.1.final__myvirtualenv__f01a7b__tldextract-1.2.3" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Magic string f01a7b
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's a md5 hash of sys.prefix. not sure a better way?
Follows the XDG Base Directory Specification https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html Falls back to attempting to use package directory if it can't determine and XDG directory location.
b5524ce
to
77e9f0a
Compare
@john-kurkowski ready for review again |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✨
https://build.opensuse.org/request/show/851574 by user mia + dimstar_suse - Update to 3.1.0: * Features + Prefer to cache in XDG cache directory in user folder, vs. in Python install folder (john-kurkowski/tldextract#213) + Fix `AttributeError` on `--update` (john-kurkowski/tldextract#215)
okay here is an attempt at using the xdg folder. Addresses #212
While I'm not aware of any issues with this implementation I'm wary of the last changes and their unintended consequences. Could be good to sit on this for a few days
Follows the XDG Base Directory Specification
https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
Falls back to attempting to use package directory if it can't determine and XDG directory location.