Updated the code to handle new pypi changes