Python 2.7 upgrade & HRD compatibility