On Tue, Dec 18, 2018 at 9:06 AM <buhtz at posteo.de> wrote: > So this would do the trick I think. > > if cairo.version_info >= (1, 13, 0): > _surface_format = cairo.Format.RGB24, > else: > _surface_format = cairo.FORMAT_RGB24 cairo.FORMAT_RGB24 is also available in newer versions.