Files
intellecton/venv/lib/python3.12/site-packages/idna/__pycache__/codec.cpython-312.pyc
T

60 lines
6.2 KiB
Plaintext
Raw Normal View History

Ë
ãó`ddlZddlmZmZddlmZmZmZmZm Z m
Z
Gddej«Z Gddej«Z
Gd „d
ej«ZGd d e ej «ZGd
de ej"«Zdedeej&fdZej*e«y)éN)ÚAnyÚOptionalé)Ú IDNAErrorÚ_unicode_dots_reÚalabelÚdecodeÚencodeÚulabelc óPeZdZdZddededeeeffdZddededeeeffdZ y) ÚCodecafStateless IDNA 2008 codec.
Implements the :class:`codecs.Codec` protocol so that the whole-domain
encoder (:func:`idna.encode`) and decoder (:func:`idna.decode`) are
accessible through the standard codec machinery as ``"idna2008"``.
Only the ``"strict"`` error handler is supported; any other handler
raises :exc:`~idna.IDNAError`.
ÚdataÚerrorsÚreturncó\|dk7rtd|d«|syt|«t|«fS)strictúUnsupported error handling "úór)rr
Úlen©Úselfrrs úM/home/antigravity/intellecton/venv/lib/python3.12/site-packages/idna/codec.pyr
z Codec.encodes8Ø  ÜÐ:¸6¸(À!Ð Øäd|œS &rcó\|dk7rtd|d«|syt|«t|«fS)Nrrr©Úr)rr rrs rr z Codec.decodes8Ø  ÜÐ:¸6¸(À!Ð Øäd|œS &rN)r)
Ú__name__Ú
__module__Ú __qualname__Ú__doc__ÚstrÚtupleÚbytesÚintr
r ©rrr
r
sLññ'˜ð'¸ÈÀÑ;Ló'˜'¨#ð'¸UÀ3ÈÀ8¹_ô'rr
c
ó2eZdZdZdedededeeeffdZ y)ÚIncrementalEncodera·Incremental IDNA 2008 encoder.
Buffers a partial trailing label across calls until either the next
label separator is seen or ``final=True``, so that streamed input is
encoded one whole label at a time. Any of the four Unicode label
separators (``U+002E``, ``U+3002``, ``U+FF0E``, ``U+FF61``) ends a
label; the result always uses ``U+002E`` as the separator.
Only the ``"strict"`` error handler is supported.
rrÚfinalrcóJ|dk7rtd|d«|sytj|«}d}|r|dsd}|d=n |s|d=|rd}g}d}|D]1}|jt |««|r|d z
}|t |«z
}Œ3dj
|«|z} |t |«z
}| |fS)
Nrrrrréÿÿÿÿó.rr)rrÚsplitÚappendrrÚjoin)
rrrr)ÚlabelsÚ trailing_dotÚresultÚsizeÚlabelÚ result_bytess
rÚ_buffer_encodez!IncrementalEncoder._buffer_encode1Ø  ÜÐ:¸6¸(À!Ð Øä!×Ó-ˆØˆ ٠ؘ"’:Ø# ؘ2à˜2Ø#'ˆØˆØò ˆEØ M‰Mœ&  Ø˜Ø ”C˜“JÑ ‰Dð  ð—y‘y Ó(¨<Ñ Ø !ˆØ˜TÐ!rN)
rrr r!r"Úboolr#r$r%r6r&rrr(r(%s2ñ ð" ð"¸"ÀUÈ5ÐRUÈ:ÑEVô"rr(c
ó2eZdZdZdedededeeeffdZ y)ÚIncrementalDecoderaIncremental IDNA 2008 decoder.
Buffers a partial trailing label across calls until either the next
label separator is seen or ``final=True``, so that streamed input is
decoded one whole label at a time.
Only the ``"strict"`` error handler is supported.
rrr)rcó‚|dk7rtd|d«|syt|t«s 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) NrrrrÚasciirr+ú.rr) rÚ
isinstancer"rr-r.r rr/)
rrrr)r0r1r2r3r4Ú
result_strs
rÚ_buffer_decodez!IncrementalDecoder._buffer_decode\Ø  ÜÐ:¸6¸(À!Ð Øä˜$¤Ôt˜%ˆ!×Ó-ˆØˆ ٠ؘ"" ؘ2à˜2Ø#&ˆØˆØò ˆEØ M‰Mœ&  Ø˜Ø ”C˜“JÑ ‰Dð  ð —X‘X˜fÓ Ñ
Ø Ø˜!rN)
rrr r!rr"r7r#r%r?r&rrr9r9Rs1ñð "  ð "¸ "ÀUÈ3ÐPSÈ8Á_ô "rr9có eZdZy)Ú StreamWriterN©rrr r&rrrArAóØrrAcó eZdZy)Ú StreamReaderNrBr&rrrErEƒrCrrEÚnamerc ó®|dk7rytj|t«jt«jt