Server : Apache System : Linux server1.cgrithy.com 3.10.0-1160.95.1.el7.x86_64 #1 SMP Mon Jul 24 13:59:37 UTC 2023 x86_64 User : nobody ( 99) PHP Version : 8.1.23 Disable Function : NONE Directory : /opt/alt/python311/lib64/python3.11/email/__pycache__/ |
� �,dn4 � � � d Z g d�ZddlZddlZddlZddlZddlZddlZddlZ ddl mZ ddl mZ ddl mZ ddl mZmZmZ ddlmZ d Zd Zd ZdZdZ ej d � � Z ej d� � Zd� Zd� Zd%d�Zd� Zd� Z d&d�Z!d'd�Z"d(d�Z#d� Z$d� Z%d� Z&d� Z'd(d�Z( ej dej) � � Z*d� Z+ d)d"�Z,d*d$�Z-dS )+zMiscellaneous utilities.)�collapse_rfc2231_value� decode_params�decode_rfc2231�encode_rfc2231� formataddr� formatdate�format_datetime�getaddresses� make_msgid� mktime_tz� parseaddr� parsedate�parsedate_tz�parsedate_to_datetime�unquote� N)�quote)�AddressList)r )r r � _parsedate_tz)�Charsetz, � z �'z[][\\()<>@,:;".]z[\\"]c �R � | � � � dS # t $ r Y dS w xY w)z8Return True if s contains surrogate-escaped binary data.FT)�encode�UnicodeEncodeError)�ss �2/opt/alt/python311/lib64/python3.11/email/utils.py�_has_surrogatesr 3 s; � � � ��� � � ��u��� � � ��t�t����s � � &�&c �Z � | � dd� � }|� dd� � S )N�utf-8�surrogateescape�replace)r �decode)�string�original_bytess r � _sanitizer% @ s. � � �]�]�7�,=�>�>�N�� � ��)�4�4�4� r c � � | \ }}|� d� � |r� |� d� � d}t � |� � rd}t � d|� � }|�|�|�d|�d�S # t $ rD t |t � � rt |� � }|� |� � }|�d|�d�cY S w xY w|S )a� The inverse of parseaddr(), this takes a 2-tuple of the form (realname, email_address) and returns the string value suitable for an RFC 2822 From, To or Cc header. If the first element of pair is false, then the second element is returned unmodified. The optional charset is the character set that is used to encode realname in case realname is not ASCII safe. Can be an instance of str or a Charset-like object which has a header_encode method. Default is 'utf-8'. �asciir �"z\\\g<0>z <�>) r � specialsre�search� escapesre�subr � isinstance�strr � header_encode)�pair�charset�name�address�quotes�encoded_names r r r L s� � � �M�D�'��N�N�7����� C� C��K�K�� � � � �F�� � ��&�&� ����=�=��T�2�2�D�$*�F�D�D�&�&�&�'�'�'�B�B�� "� 7� 7� 7��'�3�'�'� +�!�'�*�*��"�0�0��6�6�L� ,���g�g�g�6�6�6�6� 7���� �Ns �A8 �8AC�Cc �v � t � d� | D � � � � }t |� � }|j S )z7Return a list of (REALNAME, EMAIL) for each fieldvalue.c 3 �4 K � | ]}t |� � V � �d S )N�r0 )�.0�vs r � <genexpr>zgetaddresses.<locals>.<genexpr>p s( � � � �6�6�Q�#�a�&�&�6�6�6�6�6�6r&