3 »nNj 8 ã @ sÈ d dl mZ d dlZd dlZd dlZd dlZd dlZd dlmZm Z d dlZddlm Z ddlmZ ddlmZ yd dlZejZW n, eefk r® dZG dd „ d eƒZY nX yeZW n$ ek rÜ G d d„ deƒZY nX ddlmZmZmZmZ dd l m!Z!m"Z" ddl#m$Z$m%Z%m&Z&m'Z'm(Z( ddl)m*Z* ddl+m,Z, ej-e.ƒZ/dddœZ0ej1dddƒZ2ej3dƒZ4G dd„ de5ƒZ6G dd„ dee5ƒZG dd„ deƒZ7G dd„ de7ƒZ8d d!„ Z9e�rÀe7Z:e8Z7ne6Z7dS )"é )Úabsolute_importN)ÚerrorÚtimeouté )Úsix)ÚHTTPConnection)Ú HTTPExceptionc @ s e Zd ZdS )ÚBaseSSLErrorN)Ú__name__Ú __module__Ú__qualname__© r r ú /usr/lib/python3.6/connection.pyr s r c @ s e Zd ZdS )ÚConnectionErrorN)r r r r r r r r s r )ÚNewConnectionErrorÚConnectTimeoutErrorÚSubjectAltNameWarningÚSystemTimeWarning)Úmatch_hostnameÚCertificateError)Úresolve_cert_reqsÚresolve_ssl_versionÚassert_fingerprintÚcreate_urllib3_contextÚssl_wrap_socket)Ú connection)ÚHTTPHeaderDictéP i» )ÚhttpÚhttpsié é é z[^-!#$%&'*+.^_`|~0-9a-zA-Z]c @ s e Zd ZdZdS )ÚDummyConnectionz-Used to detect a failed ConnectionCls import.N)r r r Ú__doc__r r r r r" D s r" c @ sx e Zd ZdZed ZejejdfgZ dZ dd„ Zedd„ ƒZ e jd d„ ƒZ d d„ Zdd „ Zdd„ Zdd„ Zddd„ZdS )r a$ Based on httplib.HTTPConnection but provides an extra constructor backwards-compatibility layer between older and newer Pythons. Additional keyword parameters are used to configure attributes of the connection. Accepted parameters include: - ``strict``: See the documentation on :class:`urllib3.connectionpool.HTTPConnectionPool` - ``source_address``: Set the source address for the current connection. - ``socket_options``: Set specific options on the underlying socket. If not specified, then defaults are loaded from ``HTTPConnection.default_socket_options`` which includes disabling Nagle's algorithm (sets TCP_NODELAY to 1) unless the connection is behind a proxy. For example, if you wish to enable TCP Keep Alive in addition to the defaults, you might pass:: HTTPConnection.default_socket_options + [ (socket.SOL_SOCKET, socket.SO_KEEPALIVE, 1), ] Or you may want to disable the defaults by passing an empty list (e.g., ``[]``). r r Fc O sD t jr|jdd ƒ |jdƒ| _|jd| jƒ| _tj| f|ž|Ž d S )NÚstrictÚsource_addressÚsocket_options) r ZPY3ÚpopÚgetr% Údefault_socket_optionsr&