Skip to content

gimodule, cairo: Use multi-phase initialization as per PEP-489

Marco Trevisan requested to merge 3v1n0/pygobject:multi-phase-init into master

PEP-489 [1] defines a way to init extension modules that is closer to what builtin modules do. This was supported since python 3.5, and since we require python 3.8 we can just support this without having to go through #if's.

This will also allow a better memory management, that would ideally permit to cleanup all the objects we create on finalization.

[1] https://peps.python.org/pep-0489/

Merge request reports