python: remove references to obsolete API