Releases: srstevenson/xdg-base-dirs
6.0.1
6.0.0
5.1.1
This patch release moves to using pathlib.Path.home()
to get the home directory.
5.1.0
This minor release implements version 0.8 of the XDG Base Directory Specification, released on 8th May 2021. Specifically, it adds a xdg_state_home
function which returns a path to a directory suitable for storing application state, such as undo history or window layout.
5.0.2
This patch release fixes an issue with relative paths. Prior to this release, xdg
would use paths defined by the relevant environment variables even if they were relative paths, which is not permitted by the specification:
All paths set in these environment variables must be absolute. If an implementation encounters a relative path in any of these variables it should consider the path invalid and ignore it.
Now only absolute paths are accepted, and relative paths are ignored.
5.0.1
This patch release changes the build backend to poetry-core
in order to make PEP 517 builds faster, and not require Poetry and all its dependencies be installed.
5.0.0
This major release refactors the API to provide functions rather than variables. This means xdg
will now respect changes to environment variables made after it is imported. The previous variable based API is maintained for backward compatibility, but is no longer documented.
4.0.1
This patch release adds a py.typed
file to mark xdg
as PEP 561 compliant.
4.0.0
With this major release, paths are no longer returned as strings but as pathlib.Path
objects, which are the new de facto standard for specifying file system paths in Python.
If your code expects strings rather than pathlib.Path
objects, wrap the variable in a call to os.fspath
, e.g.
import os
import xdg
config_home = os.fspath(xdg.XDG_CONFIG_HOME)
3.0.2
This patch release changes the test setup to allow easier distribution packaging. The test suite can now be run with python setup.py test
.