fix w3lib deprecation warnings