sip: add Python 3 support.

Closes #26372.

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