upgrade python snippets