(self, response)
return response.read().decode(encoding)
Read and decode a PyPI HTTP response.
Read and decode a PyPI HTTP response.
Read and decode a PyPI HTTP response .
def _read_pypi_response(self, response):
        """Read and decode a PyPI HTTP response."""
        import cgi
        content_type = response.getheader('content-type', 'text/plain')
        encoding = cgi.parse_header(content_type)[1].get('charset', 'ascii')
        return response.read().decode(encoding)
def _read_pypi_response ( self , response ) : import cgi content_type = response . getheader ( 'content-type' , 'text/plain' ) encoding = cgi . parse_header ( content_type ) [ 1 ] . get ( 'charset' , 'ascii' ) return response . read ( ) . decode ( encoding )