Fix PyGI deprecated warnings