pypi platformdirs 4.14.6

36 minutes ago

Bug fixes

  • Accept use_site_for_root in user_fonts_dir, user_fonts_path and the media directory and path functions, so they can return root's own directories as the matching properties do (#686) by @abhishekcpp007 and @gaborbernat.
  • Ignore a WIN_PD_OVERRIDE_* value that names an extended or device drive without its root, such as \\?\D: or \\.\D:, instead of appending the app name to it as a drive-relative path (#702) by @h55n and @gaborbernat.
  • Keep a carriage return inside a user-dirs.dirs path as part of the directory name, instead of ignoring the entry (#712) by @liuyinchu and @gaborbernat.
  • Keep trailing non-ASCII whitespace, such as a no-break space, in WIN_PD_OVERRIDE_* values, since it can end a folder name (#700) by @subotac and @gaborbernat.
  • Make find_*_file and find_*_files skip a directory the user cannot search, and treat a name too long for the file system as not found, instead of raising on Python 3.13 and older (#703) by @darrenhuai and @gaborbernat.
  • Remove the backslash before an escaped character in an unquoted user-dirs.dirs path, as the shell does, and keep an escaped blank before # in the path instead of reading the rest as a comment (#716) by @Primeteumm and @gaborbernat.

Performance

  • Importing platformdirs no longer imports typing: the names it needs only for type annotations are imported under a module-level TYPE_CHECKING guard, so import platformdirs is faster (#714) by @hugovk and @gaborbernat.

Packaging

New Contributors

🐍 PyPI release

📜 Full Changelog

Don't miss a new platformdirs release

NewReleases is sending notifications on new releases.