for compatibility with 2to3 and http.client