update upgrade.py