pygobject3: Added Python 3 support

Closes #26655.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>