delete deprecated methods in spec.py