U e5dKQ ã @ sz d Z ddlmZ ddlmZ ddlmZ ddlmZ G dd„ dƒZG dd „ d ƒZ G d d„ de ƒZdd „ ZG dd„ dƒZ G dd„ de ƒZG dd„ dƒZG dd„ deƒZG dd„ dƒZG dd„ deƒZG dd„ deƒZG dd„ deƒZG dd„ dƒZG d d!„ d!ƒZG d"d#„ d#eƒZG d$d%„ d%eƒZG d&d'„ d'ƒZG d(d)„ d)ƒZeeeeeeeeeeeeeeeeeeeed*œZG d+d,„ d,ƒZd-S ).a; 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. Eventually HeaderRegistry will be a public API, but it isn't yet, and will probably change some before that happens. é )ÚMappingProxyType)Úutils)Úerrors)Ú_header_value_parserc @ s^ e Zd Zddd„Zedd„ ƒZedd„ ƒZed d „ ƒZedd„ ƒZd d„ Z dd„ Z dd„ ZdS )ÚAddressÚ Nc C sœ d td||||fƒ¡}d|ks(d|kr0tdƒ‚|dk r†|s@|rHtdƒ‚t |¡\}}|rjtd ||¡ƒ‚|jrz|jd ‚|j}|j }|| _ || _|| _dS ) 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. r 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ÚparserZ get_addr_specÚformatÚall_defectsÚ local_partÚdomainÚ _display_nameÚ _usernameÚ_domain)ÚselfÚdisplay_nameÚusernamer Ú addr_specZinputsZa_sÚrest© r ú,/usr/lib64/python3.8/email/headerregistry.pyÚ__init__ s&