Uname: Linux business55.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64
Software: LiteSpeed
PHP version: 8.1.31 [ PHP INFO ] PHP os: Linux
Server Ip: 162.213.251.212
Your Ip: 3.129.217.232
User: allssztx (535) | Group: allssztx (533)
Safe Mode: OFF
Disable Function:
NONE

name : headerregistry.cpython-313.pyc
�

*}gSQ��,�SrSSKJr SSKJr SSKJr SSKJr "SS5r"SS	5r	"S
S\
5rSr"S
S5r
"SS\
5r"SS5r"SS\5r"SS5r"SS\5r"SS\5r"SS\5r"SS5r"SS 5r"S!S"\5r"S#S$\5r"S%S&5r"S'S(5r0S)\_S*\_S+\_S,\_S-\_S.\_S/\_S0\_S1\_S2\_S3\_S4\_S5\_S6\_S7\_S8\_S9\_\\\S:.Er"S;S<5rg=)>z�Representing and manipulating email headers via custom objects.

This module provides an implementation of the HeaderRegistry API.
The implementation is designed to flexibly follow RFC5322 rules.
�)�MappingProxyType)�utils)�errors)�_header_value_parserc�p�\rSrSrSSjr\S5r\S5r\S5r\S5r	Sr
S	rS
rSr
g)
�Address�Nc	��SR[SXX4455nSU;dSU;a[S5eUb�U(dU(a[S5e[R
"U5upgU(a[SR
Xd55eUR(aURSeURnURnXl
X lX0lg)	a�Create an object representing a full email address.

An address can have a 'display_name', a 'username', and a 'domain'.  In
addition to specifying the username and domain separately, they may be
specified together by using the addr_spec keyword *instead of* the
username and domain keywords.  If an addr_spec string is specified it
must be properly quoted according to RFC 5322 rules; an error will be
raised if it is not.

An Address object has display_name, username, domain, and addr_spec
attributes, all of which are read-only.  The addr_spec and the string
value of the object are both quoted according to RFC5322 rules, but
without any Content Transfer Encoding.

�N�
�
z8invalid arguments; address parts cannot contain CR or LFz=addrspec specified when username and/or domain also specifiedz6Invalid addr_spec; only '{}' could be parsed from '{}'r)
�join�filter�
ValueError�	TypeError�parser�
get_addr_spec�format�all_defects�
local_part�domain�
_display_name�	_username�_domain)�self�display_name�usernamer�	addr_spec�inputs�a_s�rests        �;/opt/alt/python313/lib64/python3.13/email/headerregistry.py�__init__�Address.__init__s���"�����|�v�&Q�R�S���6�>�T�V�^��W�X�X�� ��6��!8�9�9��,�,�Y�7�I�C�� �"=�=C�V�$'�>4�5�5�����o�o�a�(�(��~�~�H��Z�Z�F�)��!����c��UR$�N�r�rs r"r�Address.display_name8����!�!�!r%c��UR$r')rr)s r"r�Address.username<����~�~�r%c��UR$r')rr)s r"r�Address.domain@����|�|�r%c���URn[RRU5(d[R"U5nUR
(aUS-UR
-$U(dgU$)z�The addr_spec (username@domain) portion of the address, quoted
according to RFC 5322 rules, but with no Content Transfer Encoding.
�@�<>)rr�
DOT_ATOM_ENDS�
isdisjoint�quote_stringr)r�lps  r"r�Address.addr_specDsY��
�]�]���#�#�.�.�r�2�2��$�$�R�(�B��;�;���8�d�k�k�)�)����	r%c��SRURRURURUR
5$)Nz1{}(display_name={!r}, username={!r}, domain={!r}))r�	__class__�__name__rrrr)s r"�__repr__�Address.__repr__Rs9��B�I�I����/�/��)�)�4�=�=�$�+�+�G�	Gr%c��URn[RRU5(d[R"U5nU(a/UR
S:XaSOUR
nSR
X5$UR
$)Nr4rz{} <{}>)rr�SPECIALSr6r7rr)r�disprs   r"�__str__�Address.__str__Wsf��� � �����)�)�$�/�/��&�&�t�,�D��"�n�n�d�2�����I��#�#�D�4�4��~�~�r%c���[U[5(d[$URUR:H=(a9 URUR:H=(a UR
UR
:H$r')�
isinstancer�NotImplementedrrr�r�others  r"�__eq__�Address.__eq__`sX���%��)�)�!�!��!�!�U�%7�%7�7�,��
�
����/�,����u�|�|�+�	-r%)rrr)rrrN)r<�
__module__�__qualname__�__firstlineno__r#�propertyrrrrr=rBrI�__static_attributes__�r%r"rrsh��(�T�"��"�������������G�
�-r%rc�P�\rSrSrS
Sjr\S5r\S5rSrSr	Sr
S	rg)�Group�hNc�^�XlU(a[U5Ulg[5Ulg)a�Create an object representing an address group.

An address group consists of a display_name followed by colon and a
list of addresses (see Address) terminated by a semi-colon.  The Group
is created by specifying a display_name and a possibly empty list of
Address objects.  A Group can also be used to represent a single
address that is not in a group, which is convenient when manipulating
lists that are a combination of Groups and individual Addresses.  In
this case the display_name should be set to None.  In particular, the
string representation of a Group whose display_name is None is the same
as the Address object, if there is one and only one Address object in
the addresses list.

N)r�tuple�
_addresses)rr�	addressess   r"r#�Group.__init__js ��*��.7�%�	�*���U�W��r%c��UR$r'r(r)s r"r�Group.display_name|r+r%c��UR$r')rVr)s r"rW�Group.addresses�s�����r%c�x�SRURRURUR5$)Nz${}(display_name={!r}, addresses={!r})rr;r<rrWr)s r"r=�Group.__repr__�s1��5�<�<����(�(��"�"�D�N�N�4�	4r%c��URc1[UR5S:Xa[URS5$URnUb:[R
R
U5(d[R"U5nSRSUR55nU(aSU-OUnSRX5$)N�r�, c3�8# �UHn[U5v� M g7fr')�str)�.0�xs  r"�	<genexpr>� Group.__str__.<locals>.<genexpr>�s���:�>�a�3�q�6�6�>�s�� z{}:{};)
r�lenrWrcrr@r6r7rr)rrA�adrstrs   r"rB�
Group.__str__�s������$��T�^�^�)<�a�)?��t�~�~�a�(�)�)�� � ����F�O�O�$>�$>�t�$D�$D��&�&�t�,�D����:�4�>�>�:�:��!'��v��V�����t�,�,r%c��[U[5(d[$URUR:H=(a URUR:H$r')rErRrFrrWrGs  r"rI�Group.__eq__�sC���%��'�'�!�!��!�!�U�%7�%7�7�2����%�/�/�1�	3r%)rVr)NN)r<rKrLrMr#rNrrWr=rBrIrOrPr%r"rRrRhs?��E�$�"��"�����4�
-�3r%rRc�`�\rSrSrSrSrSr\S5r\S5r	Sr
\S5rS	r
S
rg)�
BaseHeader�aBase class for message headers.

Implements generic behavior and provides tools for subclasses.

A subclass must define a classmethod named 'parse' that takes an unfolded
value string and a dictionary as its arguments.  The dictionary will
contain one key, 'defects', initialized to an empty list.  After the call
the dictionary must contain two additional keys: parse_tree, set to the
parse tree obtained from parsing the header, and 'decoded', set to the
string value of the idealized representation of the data from the value.
(That is, encoded words are decoded, and values that have canonical
representations are so represented.)

The defects key is intended to collect parsing defects, which the message
parser will subsequently dispose of as appropriate.  The parser should not,
insofar as practical, raise any errors.  Defects should be added to the
list instead.  The standard header parsers register defects for RFC
compliance issues, for obsolete RFC syntax, and for unrecoverable parsing
errors.

The parse method may add additional keys to the dictionary.  In this case
the subclass must define an 'init' method, which will be passed the
dictionary as its keyword arguments.  The method should use (usually by
setting them as the value of similarly named attributes) and remove all the
extra keys added by its parse method, and then use super to call its parent
class with the remaining arguments and keywords.

The subclass should also make sure that a 'max_count' attribute is defined
that is either None or 1. XXX: need to better define this API.

c��S/0nURX#5 [R"US5(a[R"US5US'[RXS5nUS	UR"U40UD6 U$)N�defects�decoded)�parser�_has_surrogates�	_sanitizerc�__new__�init)�cls�name�value�kwdsrs     r"rw�BaseHeader.__new__�sq���2����	�	�%��� � ��i��1�1�#�o�o�d�9�o�>�D��O��{�{�3�Y��0����O��	�	�$��$���r%c�(�XlX lX0lgr')�_name�_parse_tree�_defects)rrz�
parse_treerrs    r"rx�BaseHeader.init�s���
�%���
r%c��UR$r')rr)s r"rz�BaseHeader.name�s���z�z�r%c�,�[UR5$r')rUr�r)s r"rr�BaseHeader.defects�s���T�]�]�#�#r%c��[URRURR[	U54UR54$r')�_reconstruct_headerr;r<�	__bases__rc�__getstate__r)s r"�
__reduce__�BaseHeader.__reduce__�sC������'�'����(�(��D�	�
�

����!�	!r%c�,�[RX5$r')rcrw)ryr{s  r"�_reconstruct�BaseHeader._reconstruct�s���{�{�3�&�&r%c	��[R"[R"[R"URS5[R"SS5/5/5nUR
(a;UR
[R"[R"SS5/55 UR
UR
5 URUS9$)a$Fold header according to policy.

The parsed representation of the header is folded according to
RFC5322 rules, as modified by the policy.  If the parse tree
contains surrogateescaped bytes, the bytes are CTE encoded using
the charset 'unknown-8bit".

Any non-ASCII characters in the parse tree are CTE encoded using
charset utf-8. XXX: make this a policy setting.

The returned value is an ASCII-only string possibly containing linesep
characters, and ending with a linesep character.  The string includes
the header name and the ': ' separator.

zheader-name�:z
header-seprh�fws)�policy)
r�Header�HeaderLabel�
ValueTerminalrzr��append�CFWSList�WhiteSpaceTerminal�fold)rr��headers   r"r��BaseHeader.fold�s���"�������$�$�T�Y�Y�
�>��$�$�S�,�7� 9�
:� ���
����M�M�����!:�!:�3��!F� G�H�
J��
�
�d�&�&�'��{�{�&�{�)�)r%)r�rr�N)r<rKrLrM�__doc__rwrxrNrzrrr��classmethodr�r�rOrPr%r"roro�sX���@� �
�����$��$�!��'��'�*r%roc�8�[X05RU5$r')�typer�)�cls_name�basesr{s   r"r�r�s�����$�1�1�%�8�8r%c�L�\rSrSrSr\"\R5r\	S5r
Srg)�UnstructuredHeaderiNc�N�URU5US'[US5US'g)Nr�rs)�value_parserrc�ryr{r|s   r"rt�UnstructuredHeader.parse	s*�� �-�-�e�4��\���d�<�0�1��Y�r%rP)r<rKrLrM�	max_count�staticmethodr�get_unstructuredr�r�rtrOrPr%r"r�r�s)���I��� 7� 7�8�L��2��2r%r�c��\rSrSrSrSrg)�UniqueUnstructuredHeaderir`rPN�r<rKrLrMr�rOrPr%r"r�r�����Ir%r�c�t^�\rSrSrSrSr\"\R5r	\
S5rU4Sjr\
S5rSrU=r$)�
DateHeaderiayHeader whose value consists of a single timestamp.

Provides an additional attribute, datetime, which is either an aware
datetime using a timezone, or a naive datetime if the timezone
in the input string is -0000.  Also accepts a datetime as input.
The 'value' attribute is the normalized form of the timestamp,
which means it is the output of format_datetime on the datetime.
Nc��U(dJUSR[R"55 SUS'SUS'[R"5US'g[U[5(aXS'[R"U5nXS'[R"US5US'URUS5US'g![aH USR[R"S55 SUS'[R"5US'gf=f)Nrr�datetimerrsr�zInvalid date value or format)
r�r�HeaderMissingRequiredValuer�	TokenListrErcr�parsedate_to_datetimer�InvalidDateDefect�format_datetimer�r�s   r"rt�DateHeader.parse$s������O�"�"�6�#D�#D�#F�G�#�D��� �D��O�!'�!1�!1�!3�D�����e�S�!�!�#��O�
��3�3�E�:��!�Z���/�/��Z�0@�A��Y�� �-�-�d�9�o�>��\����
��Y��&�&�v�'?�'?�@^�'_�`�#'��Z� �%+�%5�%5�%7��\�"��	
�s�,B:�:AD�Dc�R>�URS5Ul[TU]"U0UD6 g)Nr�)�pop�	_datetime�superrx�r�args�kwr;s   �r"rx�DateHeader.init9s$������
�+���
���d�!�b�!r%c��UR$r'�r�r)s r"r��DateHeader.datetime=r.r%r�)r<rKrLrMr�r�r�rr�r�r�rtrxrNr�rO�
__classcell__�r;s@r"r�r�sL�����I� �� 7� 7�8�L��?��?�("����r%r�c��\rSrSrSrSrg)�UniqueDateHeaderiBr`rPNr�rPr%r"r�r�Br�r%r�c�l^�\rSrSrSr\S5r\S5rU4Sjr	\
S5r\
S5rSr
U=r$)	�
AddressHeaderiGNc�R�[R"U5upU(aS5eU$)Nzthis should not happen)r�get_address_list)r{�address_lists  r"r��AddressHeader.value_parserKs)��$�5�5�e�<����2�2�2�y��r%c�
�[U[5(a�URU5=US'n/nURH�nUR	[URURVs/sHIn[UR=(d SUR=(d SUR=(d S5PMK sn55 M� [UR5nOF[US5(dU/nUVs/sH#n[US5(d
[SU/5OUPM% nn/nXBS'XrS'SRUVs/sHn[U5PM sn5US'SU;aURUS5US'ggs snfs snfs snf)	Nr�r�__iter__rW�groupsrrrars)rErcr�rWr�rRr�
all_mailboxesrrr�listr�hasattrr)	ryr{r|r�r��addr�mbrr�items	         r"rt�AddressHeader.parseQs����e�S�!�!�14�0@�0@��0G�G�D�����F�$�.�.���
�
�e�D�$5�$5�04�/A�/A�%C�0B��&-�R�_�_�-B��-/�]�]�-@�b�-/�Y�Y�_�"�&>�0B�%C�D�E�/��<�3�3�4�G��5�*�-�-����16�7�05��29��{�1K�1K�e�D�4�&�)�/3�4�05�
�7��G��X��!�Y���)�)�6�$B�6�4�S��Y�6�$B�C��Y���t�#�!$�!1�!1�$�y�/�!B�D���$��!%C��7��%Cs�&AE6�3*E;�8Fc�r>�[URS55UlSUl[TU]"U0UD6 g)Nr�)rUr��_groupsrVr�rxr�s   �r"rx�AddressHeader.initms0����R�V�V�H�-�.������
���d�!�b�!r%c��UR$r')r�r)s r"r��AddressHeader.groupsrr1r%c�v�URc![SUR55UlUR$)Nc3�N# �UHnURHnUv� M	 M g7fr')rW)rd�group�addresss   r"rf�*AddressHeader.addresses.<locals>.<genexpr>ys'���$L���;@�?�?��%,�;J�%,��s�#%)rVrUr�r)s r"rW�AddressHeader.addressesvs5���?�?�"�#�$L����$L�L�D�O����r%)rVr�)r<rKrLrMr�r�r�r�rtrxrNr�rWrOr�r�s@r"r�r�Gs]����I�����
�C��C�6"�
�������r%r�c��\rSrSrSrSrg)�UniqueAddressHeaderi~r`rPNr�rPr%r"r�r�~r�r%r�c�$�\rSrSr\S5rSrg)�SingleAddressHeaderi�c��[UR5S:wa$[SRUR55eURS$)Nr`z9value of single address header {} is not a single addressr)rirWrrrzr)s r"r��SingleAddressHeader.address�sB���t�~�~���!��#�$*�F�4�9�9�$5�7�
7��~�~�a� � r%rPN)r<rKrLrMrNr�rOrPr%r"r�r��s��
�!��!r%r�c��\rSrSrSrSrg)�UniqueSingleAddressHeaderi�r`rPNr�rPr%r"r�r��r�r%r�c�^�\rSrSrSr\"\R5r\	S5r
U4Sjr\S5r
\S5r\S5rSrU=r$)	�MIMEVersionHeaderi�r`c�>�URU5=US'n[U5US'USRUR5 URcSOUR
US'URUS'URbSR
USUS5US'gSUS'g)Nr�rsrr�major�minorz{}.{}�version)r�rc�extendrr�r�r�ryr{r|r�s    r"rt�MIMEVersionHeader.parse�s���*-�*:�*:�5�*A�A��\��Z��j�/��Y���Y����z�5�5�6� *� 0� 0� 8��j�>N�>N��W�
�"�(�(��W�
����'�%�n�n�T�'�]�D��M�J�D��O�"�D��Or%c�>�URS5UlURS5UlURS5Ul[TU]"U0UD6 g)Nr�r�r�)r��_version�_major�_minorr�rxr�s   �r"rx�MIMEVersionHeader.init�sB������y�)��
��f�f�W�o����f�f�W�o���
���d�!�b�!r%c��UR$r')r�r)s r"r��MIMEVersionHeader.major�����{�{�r%c��UR$r')r�r)s r"r��MIMEVersionHeader.minor�r�r%c��UR$r')r�r)s r"r��MIMEVersionHeader.version�����}�}�r%)r�r�r�)r<rKrLrMr�r�r�parse_mime_versionr�r�rtrxrNr�r�r�rOr�r�s@r"r�r��sk����I��� 9� 9�:�L��	#��	#�"������������r%r�c�L^�\rSrSrSr\S5rU4Sjr\S5r	Sr
U=r$)�ParameterizedMIMEHeaderi�r`c�p�URU5=US'n[U5US'USRUR5 URc0US'gURVVs0sH>upA[
R"U5R5[
R"U5_M@ snnUS'gs snnf)Nr�rsrr�params)r�rcr�rrrrv�lower)ryr{r|r�rzs     r"rt�ParameterizedMIMEHeader.parse�s���*-�*:�*:�5�*A�A��\��Z��j�/��Y���Y����z�5�5�6����$��D��N�
3=�2C�2C�E�2C�;�4�$�o�o�d�3�9�9�;�$)�O�O�E�$:�;�2C�E�D��N��Es�%AB2c�R>�URS5Ul[TU]"U0UD6 g)Nr)r��_paramsr�rxr�s   �r"rx�ParameterizedMIMEHeader.init�s$����v�v�h�'���
���d�!�b�!r%c�,�[UR5$r')rrr)s r"r�ParameterizedMIMEHeader.params�s������-�-r%)r)r<rKrLrMr�r�rtrxrNrrOr�r�s@r"rr�s7���
�I��
E��
E�"��.��.r%rc�|^�\rSrSr\"\R5rU4Sjr\	S5r
\	S5r\	S5rSr
U=r$)�ContentTypeHeaderi�c��>�[TU]"U0UD6 [R"URR
5Ul[R"URR5Ulgr')	r�rxrrvr��maintype�	_maintype�subtype�_subtyper�s   �r"rx�ContentTypeHeader.init�sL���
���d�!�b�!�����)9�)9�)B�)B�C�������(8�(8�(@�(@�A��
r%c��UR$r')rr)s r"r�ContentTypeHeader.maintype�r.r%c��UR$r')rr)s r"r�ContentTypeHeader.subtype�rr%c�:�URS-UR-$)N�/)rrr)s r"�content_type�ContentTypeHeader.content_type�s���}�}�s�"�T�\�\�1�1r%)rr)r<rKrLrMr�r�parse_content_type_headerr�rxrNrrrrOr�r�s@r"rr�sU����� @� @�A�L�B�
���������2��2r%rc�\^�\rSrSr\"\R5rU4Sjr\	S5r
SrU=r$)�ContentDispositionHeaderi�c�>�[TU]"U0UD6 URRnUcX0lg[R
"U5Ulgr')r�rxr��content_dispositionrrv�_content_disposition)rr�r��cdr;s    �r"rx�ContentDispositionHeader.init�s?���
���d�!�b�!�
�
�
�
1�
1��*,�*�B�!�%�/�/�"�:M��!r%c��UR$r'�r$r)s r"r#�,ContentDispositionHeader.content_disposition�s���(�(�(r%r()
r<rKrLrMr�r� parse_content_disposition_headerr�rxrNr#rOr�r�s@r"r!r!�s-����� G� G�H�L�N�
�)��)r%r!c�p^�\rSrSrSr\"\R5r\	S5r
U4Sjr\S5r
SrU=r$)�ContentTransferEncodingHeaderi�r`c��URU5=US'n[U5US'USRUR5 g�Nr�rsrr�r�rcr�rr�s    r"rt�#ContentTransferEncodingHeader.parse��A��*-�*:�*:�5�*A�A��\��Z��j�/��Y���Y����z�5�5�6r%c�>�[TU]"U0UD6 [R"URR
5Ulgr')r�rxrrvr��cte�_cter�s   �r"rx�"ContentTransferEncodingHeader.inits0���
���d�!�b�!��O�O�D�$4�$4�$8�$8�9��	r%c��UR$r'�r4r)s r"r3�!ContentTransferEncodingHeader.ctes���y�y�r%r7)r<rKrLrMr�r�r�&parse_content_transfer_encoding_headerr�r�rtrxrNr3rOr�r�s@r"r,r,�sC����I��� M� M�N�L��7��7�
:����r%r,c�L�\rSrSrSr\"\R5r\	S5r
Srg)�MessageIDHeaderi
r`c��URU5=US'n[U5US'USRUR5 gr.r/r�s    r"rt�MessageIDHeader.parser1r%rPN)r<rKrLrMr�r�r�parse_message_idr�r�rtrOrPr%r"r;r;
s)���I��� 7� 7�8�L��7��7r%r;�subject�datezresent-datez	orig-date�senderz
resent-sender�toz	resent-to�ccz	resent-cc�bccz
resent-bcc�fromzresent-fromzreply-tozmime-versionzcontent-type)zcontent-dispositionzcontent-transfer-encodingz
message-idc�:�\rSrSrSr\\S4SjrSrSr	Sr
Srg	)
�HeaderRegistryi2z%A header_factory and header registry.Tc�x�0UlXlX lU(a URR[5 gg)a�Create a header_factory that works with the Policy API.

base_class is the class that will be the last class in the created
header class's __bases__ list.  default_class is the class that will be
used if "name" (see __call__) does not appear in the registry.
use_default_map controls whether or not the default mapping of names to
specialized classes is copied in to the registry when the factory is
created.  The default is True.

N)�registry�
base_class�
default_class�update�_default_header_map)rrJrK�use_default_maps    r"r#�HeaderRegistry.__init__6s1����
�$��*����M�M� � �!4�5�r%c�<�X RUR5'g)zLRegister cls as the specialized class for handling "name" headers.

        N)rIr�rrzrys   r"�map_to_type�HeaderRegistry.map_to_typeHs��'*�
�
�d�j�j�l�#r%c��URRUR5UR5n[	SUR
-X R405$)N�_)rI�getrrKr�r<rJrQs   r"�__getitem__�HeaderRegistry.__getitem__NsC���m�m����
�
��d�.@�.@�A���C����$�s�O�O�&<�b�A�Ar%c��X"X5$)aSCreate a header instance for header 'name' from 'value'.

Creates a header instance by creating a specialized class for parsing
and representing the specified header by combining the factory
base_class with a specialized class from the registry or the
default_class, and passing the name and value to the constructed
class's constructor.

rP)rrzr{s   r"�__call__�HeaderRegistry.__call__Rs���z�$�&�&r%)rJrKrIN)r<rKrLrMr�ror�r#rRrWrZrOrPr%r"rGrG2s#��/�",�<N�'+�6�$*�B�
'r%rGN)r��typesr�emailrrrrrrRrcror�r�r�r�r�r�r�r�r�r�rrr!r,r;rMrGrPr%r"�<module>r^s����
#���0�Y-�Y-�x/3�/3�ha*��a*�H9�2�2��1��
+�+�\�z��
4�4�n�-��
!�-�!�� 3��
"�"�J.�.�:2�/�2�,)�6�)���*	7�	7��
�$<��
�$4���J���$4�	�

�$=���$7�
�	�$7���M��	�$7���M��
�$7���M���$7���M���$7�� �$5�!�"�$5�#�$%=�$A�$3�)��.*'�*'r%
© 2025 GrazzMean-Shell