deprecation of urlopen & some flake8