systemd/python-systemd

Document compatibility with systemd versions

ktvoelker opened this issue · 2 comments

It would be very handy to have some documentation about which systemd versions a release of this library is known to work against.

My story: I am currently using systemd 233 with python-systemd 234 (because I need some of the improvements that have been added to JournalHandler in 234). It seems to work okay, but it worries me, because the nature of the python-systemd version numbering scheme suggests that perhaps it is only meant to be used with the matching version of systemd.

There is no relation between the version of this package and systemd. They just started at the same version after being split, and they are still in similar range.

At the source level, python-systemd should work with any systemd version. (Probably not very old ones, but anything from the last few years). When the C module is compiled, it detects which functions in libsystemd.so are available, and links to them. So once you compile against a specific so-version, the module cannot be used with lower version (the dynamic linking will fail). It can be used with newer so-versions.

I guess this should be documented somewhere.

Thanks for the explanation!