You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Let's fill this table with everything known to be different between py2/3.
Solve by take py3 version
[proxy] py2: socks imported from vendored socksipy; py3: socks is first searched in installed packages, then vendored
HTTPConnectionWithTimeout py2: bug socket.error rewrap into new instance, loosing traceback, errno
HTTPSConnectionWithTimeout (TLS)
py2: bug socket.error rewrap into new instance, loosing traceback, errno
Response only py3 merges same name headers with comma
Http (public API)
__init__ deprecate ssl_version kwarg from py2; add custom SSLContext
_conn_request py3 handles ResponseNotReady from conn.getresponse()
_conn_request py3 handles socket.timeout from conn.getresponse()but doesn't retry
request py3 handles =?...?= encoding in cached response headers
Solve
[proxy] support callable proxy_info(scheme)
Http (public API)
request py3 passes https parameters based on subclass(HTTPSConnectionWithTimeout), opposed to simple scheme == 'https' check in py2, (temoto) IMHO should check both
Let's fill this table with everything known to be different between py2/3.
Solve by take py3 version
HTTPConnectionWithTimeout
py2: bug socket.error rewrap into new instance, loosing traceback, errnoHTTPSConnectionWithTimeout
(TLS)Response
only py3 merges same name headers with commaHttp
(public API)__init__
deprecatessl_version
kwarg from py2; add customSSLContext
_conn_request
py3 handlesResponseNotReady
fromconn.getresponse()
_conn_request
py3 handlessocket.timeout
fromconn.getresponse()
but doesn't retryrequest
py3 handles=?...?=
encoding in cached response headersSolve
proxy_info(scheme)
Http
(public API)request
py3 passes https parameters based onsubclass(HTTPSConnectionWithTimeout)
, opposed to simplescheme == 'https'
check in py2, (temoto) IMHO should check bothFigure out
_updateCache
py3 handles UnicodeEncodeError with a weird danceHttpsConnectionWithTimeout
(TLS)getaddrinfo
, connects toself.host,port
sock.shutdown()
onssl.match_hostname
error - it's either shutdown is redundant or fd leak until remote closes socketssl.SSL_ERROR_SSL -> raise SSLHandshakeError
SSLHandshakeError
CertificateValidationUnsupported
,CertificateHostnameMismatch
NotSupportedOnThisPlatform
NotRunningAppEngineEnvironment
class Http
(public API)_conn_request
py2 checkshasattr(conn, sock)
_conn_request
py2 handlesssl_SSLError
_conn_request
different way to read errno from socket.error_conn_request
py2 handlesECONNREFUSED
_conn_request
py3 doubleconn.close()
onsocket.error
fromconn.getresponse()
request
py2proxy_info = self._get_proxy_info(scheme, authority)
TODO write tests
safename
bytes input_entry_disposition
request cache-controlmax-age
not a number_entry_disposition
request cache-controlmin-fresh
not a number_entry_disposition
response cache-controlmax-age
not a number_updateCache
info.as_string
fail withUnicodeEncodeError
DigestAuthentication
challengeqop
invalid valueDigestAuthentication
challengealgorithm
invalid valueHmacDigestAuthentication
WsseAuthentication
GoogleLoginAuthentication
repr(ProxyInfo)
proxy_info_from_environment
method nothttp,https
proxy_info_from_url
blabla@host
without:password
partHTTPSConnectionWithTimeout
using proxyHTTPSConnectionWithTimeout
except (ssl.SSLError,...): if self.sock: self.sock.close()
HTTPSConnectionWithTimeout
socket.timeout, gaierrorHttp.clear_credentials
Http._conn_request
socket.timeoutHttp._conn_request
conn.request -> http.client.HTTPException
Http._conn_request
conn.getresponse -> except (socket.error, http.client.HTTPException)
Http._request
on redirect strip headersif-none-match, if-modified-since, authorization
Http.request
urihttp://domain:443
Http.request
uri bytes Some HTTP requests fail if "uri"type is "bytes" #225Http.request
header encoding=?...?=
Http.request
from cache with-x-permanent-redirect-url
while redirect limit overflowHttp.request
on 304 preserve.stale_digest
from cacheHttp.request
from cache stale/transparent new response not 200,304 -> cache.deleteResponse
.dict = self
The text was updated successfully, but these errors were encountered: