upgrade attr.py