Your IP : 3.139.86.53


Current Path : /lib64/python3.8/email/__pycache__/
Upload File :
Current File : //lib64/python3.8/email/__pycache__/policy.cpython-38.opt-2.pyc

U

e5d�(�@s�ddlZddlZddlmZmZmZmZddlmZddl	m
Z
ddlmZddl
mZddd	d
ddd
dgZe�d�ZeGdd
�d
e��Ze�Ze`ejdd�Zejdd�Zejddd�Zejdd�ZdS)�N)�Policy�Compat32�compat32�_extend_docstrings)�_has_surrogates)�HeaderRegistry)�raw_data_manager)�EmailMessagerrr�EmailPolicy�default�strict�SMTP�HTTPz\n|\rcsleZdZeZdZdZe�Ze	Z
�fdd�Zdd�Zdd�Z
d	d
�Zdd�Zd
d�Zdd�Zddd�Z�ZS)r
F�longcs*d|krt�|dt��t�jf|�dS)N�header_factory)�object�__setattr__r�super�__init__)�self�kw��	__class__��$/usr/lib64/python3.8/email/policy.pyr]szEmailPolicy.__init__cCs|j|jS�N)rZ	max_count)r�namerrr�header_max_countdszEmailPolicy.header_max_countcCs>|d�dd�\}}|�d�d�|dd��}||�d�fS)Nr�:�z 	��
)�split�lstrip�join�rstrip)rZsourcelinesr�valuerrr�header_source_parsevs	zEmailPolicy.header_source_parsecCsVt|d�r$|j��|��kr$||fSt|t�rFt|���dkrFtd��||�||�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.foldcCs0|j|||jdkd�}|jr dnd}|�|d�S)NZ7bitr3�utf8�ascii�surrogateescape)r5Zcte_typer7�encode)rrr&Zfolded�charsetrrr�fold_binary�szEmailPolicy.fold_binarycs�t|d�r|j|d�S|jr"|jntj�|��}|jdkp�|jdko�|rdt|d�t|�d�kp�t�fdd�|d	d�D��}|s�|r�t	|�r�|�
|d
�|��j|d�S|d|j�|�|jS)Nr)Zpolicy�allrr�c3s|]}t|��kVqdSr)r,)�.0�x��maxlenrr�	<genexpr>�sz$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=
T)Zraise_on_defectr!)rI)rIrD)r7)�rerEZemail._policybaserrrrZemail.utilsrZemail.headerregistryrZemail.contentmanagerrZ
email.messager	�__all__�compiler1r
rrZclonerr
rZSMTPUTF8rrrr�<module>s2�
@

?>