some patch for python3

urllib2 and itervalues is deprecated in python3.