reverting changes done for removing PendingDeprecationWarning, as it breaking in py 2.6