AlkantarClanX12

Your IP : 3.15.203.246


Current Path : /opt/alt/python310/lib64/python3.10/email/__pycache__/
Upload File :
Current File : //opt/alt/python310/lib64/python3.10/email/__pycache__/policy.cpython-310.opt-2.pyc

o

6��f�(�@s�	ddlZddlZddlmZmZmZmZddlmZddl	m
Z
ddlmZddl
mZgd�Ze�d�ZeGd	d
�d
e��Ze�Ze`ejdd�Zejd
d�Zejd
dd�Zejdd�ZdS)�N)�Policy�Compat32�compat32�_extend_docstrings)�_has_surrogates)�HeaderRegistry)�raw_data_manager)�EmailMessage)rrr�EmailPolicy�default�strict�SMTP�HTTPz\n|\rcsneZdZ	eZdZdZe�Ze	Z
�fdd�Zdd�Zdd�Z
d	d
�Zdd�Zd
d�Zdd�Zddd�Z�ZS)r
F�longcs.d|vrt�|dt��t�jdi|��dS)N�header_factory�)�object�__setattr__r�super�__init__)�self�kw��	__class__r�3/opt/alt/python310/lib64/python3.10/email/policy.pyr]szEmailPolicy.__init__cCs	|j|jS�N)rZ	max_count)r�namerrr�header_max_countdszEmailPolicy.header_max_countcCs@	|d�dd�\}}|�d�d�|dd��}||�d�fS)Nr�:�z 	��
)�split�lstrip�join�rstrip)rZsourcelinesr�valuerrr�header_source_parsevszEmailPolicy.header_source_parsecCsX	t|d�r|j��|��kr||fSt|t�r$t|���dkr$td��||�||�fS)NrrzDHeader values may not contain linefeed or carriage return characters)	�hasattrr�lower�
isinstance�str�len�
splitlines�
ValueErrorr�rrr&rrr�header_store_parse�s	zEmailPolicy.header_store_parsecCs,	t|d�r|Sd�t�|��}|�||�S)Nrr )r(r$�linesep_splitterr"rr/rrr�header_fetch_parse�s

zEmailPolicy.header_fetch_parsecCs	|j||dd�S)NT��
refold_binary)�_foldr/rrr�fold�szEmailPolicy.foldcCs2	|j|||jdkd�}|jrdnd}|�|d�S)NZ7bitr3�utf8�ascii�surrogateescape)r5Zcte_typer7�encode)rrr&Zfolded�charsetrrr�fold_binary�s
zEmailPolicy.fold_binarycs�t|d�r|j|d�S|jr|jntj�|��}|jdkp@|jdko@|r2t|d�t|�d�kp@t�fdd�|d	d�D��}|sI|rVt	|�rV|�
|d
�|��j|d�S|d|j�|�|jS)Nr)Zpolicy�allrr�c3s�|]	}t|��kVqdSr)r,)�.0�x��maxlenrr�	<genexpr>�s�z$EmailPolicy._fold.<locals>.<genexpr>rr z: )
r(r6�max_line_length�sys�maxsizer-�
refold_sourcer,�anyrrr$�linesep)rrr&r4�linesZrefoldrrArr5�s


 �zEmailPolicy._fold)F)�__name__�
__module__�__qualname__r	Zmessage_factoryr7rGrrrZcontent_managerrrr'r0r2r6r<r5�
__classcell__rrrrr
s:
r
T)Zraise_on_defectr!)rI)rIrD)r7)�rerEZemail._policybaserrrrZemail.utilsrZemail.headerregistryrZemail.contentmanagerrZ
email.messager	�__all__�compiler1r
rrZclonerr
rZSMTPUTF8rrrr�<module>s&
@