Fix PyGI deprecated warning