Hey. I agree, this has also just bitten me.
Especially as pyxdg's documentation is... sparse... people will typically just use what they see in the code (or what interactive tools like ptpython show them). But now on Debian we have stuff in there which only works on Debian, which is unfortunate. And it's not just the extra symbols, but also the automatically imported BaseDirectory in the package. Dear maintainers, perhaps you could just try to get your changes merged upstream? Cheers, Chris.

