B ”ไ๎\ฟใ@sดdZddlmZGdd„deƒZGdd„deƒZGdd„deƒZGd d „d eƒZGd d „d eƒZGd d„deƒZ Gdd„deƒZ Gdd„deƒZ Gdd„deƒZ Gdd„deƒZ dS)zExceptions module for rfc3986.้)ฺcompatc@seZdZdZdS)ฺRFC3986Exceptionz-Base class for all rfc3986 exception classes.N)ฺ__name__ฺ __module__ฺ __qualname__ฺ__doc__ฉrr๚F/tmp/pip-build-uw_ogi45/urllib3/urllib3/packages/rfc3986/exceptions.pyrsrcs eZdZdZ‡fdd„Z‡ZS)ฺInvalidAuthorityz/Exception when the authority string is invalid.cs tt|ƒ d t |กกกdS)z4Initialize the exception with the invalid authority.z!The authority ({0}) is not valid.N)ฺsuperr ฺ__init__ฺformatrZto_str)ฺselfฺ authority)ฺ __class__rr r s zInvalidAuthority.__init__)rrrrr ฺ __classcell__rr)rr r sr cs eZdZdZ‡fdd„Z‡ZS)ฺ InvalidPortz#Exception when the port is invalid.cstt|ƒ d |กกdS)z/Initialize the exception with the invalid port.zThe port ("{0}") is not valid.N)r rr r )rฺport)rrr r s zInvalidPort.__init__)rrrrr rrr)rr rsrcs eZdZdZ‡fdd„Z‡ZS)ฺResolutionErrorz1Exception to indicate a failure to resolve a URI.cstt|ƒ d | กกกdS)z)Initialize the error with the failed URI.z{0} is not an absolute URI.N)r rr r ฺunsplit)rฺuri)rrr r #s zResolutionError.__init__)rrrrr rrr)rr r src@seZdZdZdS)ฺValidationErrorz,Exception raised during Validation of a URI.N)rrrrrrrr r)srcs eZdZdZ‡fdd„Z‡ZS)ฺMissingComponentErrorz6Exception raised when a required component is missing.csRd}t|ƒdkrd}||_t|ƒ|_d |jก}tt|ƒ d ||ก||jกdS)z5Initialize the error with the missing component name.ฺwasrฺwerez, z{} {} required but missingN) ฺlenrฺsortedฺ componentsฺjoinr rr r )rrฺcomponent_namesฺverbr)rrr r 2s     zMissingComponentError.__init__)rrrrr rrr)rr r/srcs eZdZdZ‡fdd„Z‡ZS)ฺUnpermittedComponentErrorz;Exception raised when a component has an unpermitted value.cs>tt|ƒ d |tt|ƒƒ|ก|||ก||_||_||_dS)z4Initialize the error with the unpermitted component.z.{} was required to be one of {!r} but was {!r}N) r r!r r ฺlistrฺcomponent_nameฺcomponent_valueฺallowed_values)rr#r$r%)rrr r Es z"UnpermittedComponentError.__init__)rrrrr rrr)rr r!Bsr!cs eZdZdZ‡fdd„Z‡ZS)ฺPasswordForbiddenzCException raised when a URL has a password in the userinfo section.cs6tˆd‡fdd„ƒ}tt|ƒ d |ƒกกˆ|_dS)z9Initialize the error with the URI that failed validation.rcsˆS)Nrr)rrr ฺY๓z,PasswordForbidden.__init__..z4"{}" contained a password when validation forbade itN)ฺgetattrr r&r r r)rrr)r)rr r Ws   zPasswordForbidden.__init__)rrrrr rrr)rr r&Tsr&cs eZdZdZ‡fdd„Z‡ZS)ฺInvalidComponentsErrorz9Exception raised when one or more components are invalid.csRd}t|ƒdkrd}||_t|ƒ|_d |jก}tt|ƒ d ||ก||jกdS)z8Initialize the error with the invalid component name(s).rrrz, z{} {} found to be invalidN) rrrrrr r*r r )rrrr r)rrr r es     zInvalidComponentsError.__init__)rrrrr rrr)rr r*bsr*c@seZdZdZdS)ฺMissingDependencyErrorzBException raised when an IRI is encoded without the 'idna' module.N)rrrrrrrr r+usr+N)rฺrฺ Exceptionrr rrrrr!r&r*r+rrrr ฺs