using cairocffi instead of pycairo
The Pycairo library is now outdated It hasn't been updated since 2011. In the other hand, Cairocffi is a CFFI-based drop-in replacement for Pycairo, which is well maintained. Moreover, you can easily switch one with the other with a minimal change in your code.
import cairocffi
cairocffi.install_as_pycairo()
import cairo
assert cairo is cairocffi
I hope this can help
regards,
Vincent