f^ ddlZddlZddlmZmZmZddlmZmZm Z m Z m Z ejdZ GddejZGdd ejZGd d ej"ZGd d eej&ZGddeej(Zdedeej,fdZej0ey)N)AnyOptionalTuple) IDNAErroralabeldecodeencodeulabelu [.。.。]c LeZdZddededeeeffdZddededeeeffdZy)Codecdataerrorsreturncr|dk7rtdj||syt|t|fS)NstrictUnsupported error handling "{}"r)rformatr lenselfrrs S/var/lib/jenkins/workspace/mettalog/venv/lib/python3.12/site-packages/idna/codec.pyr z Codec.encode s: X =DDVLM Md|SY&&rcr|dk7rtdj||syt|t|fS)Nrrr)rrr rrs rr z Codec.decodes: X =DDVLM Md|SY&&rN)r) __name__ __module__ __qualname__strrbytesintr r rrr r sG'3''5;L''5'#'U38_'rr c .eZdZdedededeeeffdZy)IncrementalEncoderrrfinalrc`|dk7rtdj||sytj|}d}|r|dsd}|d=n |s|d=|rd}g}d}|D]1}|j t ||r|dz }|t |z }3dj||z} |t |z }| |fS) Nrrrr.rr)rr_unicode_dots_resplitappendrrjoin) rrrr'labels trailing_dotresultsizelabel result_bytess r_buffer_encodez!IncrementalEncoder._buffer_encodes X =DDVLM M!''- ":# 2J2J#'LE MM&- (  CJ D yy(<7  L!!T!!rN) rrr r!boolrr"r#r5r$rrr&r&s-"3""D"U5RU:EV"rr&c .eZdZdedededeeeffdZy)IncrementalDecoderrrr'rc|dk7rtdj||syt|ts t|d}tj |}d}|r|dsd}|d=n |s|d=|rd}g}d}|D]1}|j t||r|d z }|t|z }3dj||z} |t|z }| |fS) Nrrrasciirr).rr) rr isinstancer!r+r,r-r rr.) rrrr'r/r0r1r2r3 result_strs r_buffer_decodez!IncrementalDecoder._buffer_decodeAs X =DDVLM M$$tW%D!''- ":" 2J2J#&LE MM&- (  CJ D  XXf% 4  L!!D!!rN) rrr rr!r6rr#r>r$rrr8r8@s, "3 " "D "U3PS8_ "rr8c eZdZy) StreamWriterNrrr r$rrr@r@drr@c eZdZy) StreamReaderNrAr$rrrDrDhrBrrDnamerc |dk7rytj|tjtjt t ttS)Nidna2008)rEr r incrementalencoderincrementaldecoder streamwriter streamreader) codecs CodecInfor r r r&r8r@rD)rEs rsearch_functionrNlsA z    w~~w~~--!! r)rLretypingrrrcorerrr r r compiler+r BufferedIncrementalEncoderr&BufferedIncrementalDecoderr8r@rDr!rMrNregisterr$rrrVs '';;2:::;'FLL'("::"D!"::!"H 5&--  5&--  # (6+;+;"<  r