A path to xdg-utils2 in python

Thomas Kluyver thomas at kluyver.me.uk
Thu Feb 28 09:37:24 UTC 2019


Hi Simon,

On Thu, Feb 28, 2019, at 12:08 AM, Simon Lees wrote:
> Where ever possible i'm currently planning to use as much of the 
> existing pyxdg libraries especially for handling all the mime / .desktop 
> file handling.

As the not very active maintainer of PyXDG: much of the package is written in ways I would avoid for new code - e.g. it has its own ini file parsing instead of using the standard library configparser module. I'm wary of changing it because it's been around for a long time and people could be relying on all kinds of implementation details. But I wouldn't necessarily encourage you to use it for new code.

If there's useful functionality in there, by all means make use of it. But you might be better off extracting and refactoring any code you want, either as internal modules for xdg-utils2 or as separately packaged parts. I can probably find some time to help with this if you like.

When I first read your email,  I thought about a parallel 'pyxdg2' project to produce a modern version of that code without compatibility constraints. But on further thought, I don't think it necessarily makes sense to bundle together the different functionality that's in PyXDG. Historically, the limitations of the Python packaging tools pushed us towards fewer, bigger packages incorporating disparate functionality, and PyXDG is exactly that. Now the tools have improved, it's more practical to have more focused packages - e.g. maybe desktop file handling could be its own package.

Best wishes,
Thomas


More information about the xdg mailing list