ported the plugin to py3 + on a more recent API.