/usr/lib64/python3.6/email/__pycache__
NameSizeModeActions
base64mime.cpython-36.opt-1.pyc32200644editdlrm
base64mime.cpython-36.opt-2.pyc14430644editdlrm
base64mime.cpython-36.pyc32200644editdlrm
charset.cpython-36.opt-1.pyc114760644editdlrm
charset.cpython-36.opt-2.pyc51410644editdlrm
charset.cpython-36.pyc115130644editdlrm
contentmanager.cpython-36.opt-1.pyc72900644editdlrm
contentmanager.cpython-36.opt-2.pyc72900644editdlrm
contentmanager.cpython-36.pyc72900644editdlrm
encoders.cpython-36.opt-1.pyc16420644editdlrm
encoders.cpython-36.opt-2.pyc12910644editdlrm
encoders.cpython-36.pyc16420644editdlrm
errors.cpython-36.opt-1.pyc63500644editdlrm
errors.cpython-36.opt-2.pyc47690644editdlrm
errors.cpython-36.pyc63500644editdlrm
feedparser.cpython-36.opt-1.pyc104920644editdlrm
feedparser.cpython-36.opt-2.pyc88270644editdlrm
feedparser.cpython-36.pyc106460644editdlrm
generator.cpython-36.opt-1.pyc132690644editdlrm
generator.cpython-36.opt-2.pyc95730644editdlrm
generator.cpython-36.pyc132690644editdlrm
header.cpython-36.opt-1.pyc164820644editdlrm
header.cpython-36.opt-2.pyc108580644editdlrm
header.cpython-36.pyc164820644editdlrm
headerregistry.cpython-36.opt-1.pyc212240644editdlrm
headerregistry.cpython-36.opt-2.pyc154530644editdlrm
headerregistry.cpython-36.pyc212800644editdlrm
iterators.cpython-36.opt-1.pyc19120644editdlrm
iterators.cpython-36.opt-2.pyc12900644editdlrm
iterators.cpython-36.pyc19120644editdlrm
message.cpython-36.opt-1.pyc379940644editdlrm
message.cpython-36.opt-2.pyc214020644editdlrm
message.cpython-36.pyc379940644editdlrm
parser.cpython-36.opt-1.pyc57270644editdlrm
parser.cpython-36.opt-2.pyc27070644editdlrm
parser.cpython-36.pyc57270644editdlrm
policy.cpython-36.opt-1.pyc96200644editdlrm
policy.cpython-36.opt-2.pyc34030644editdlrm
policy.cpython-36.pyc96200644editdlrm
quoprimime.cpython-36.opt-1.pyc76820644editdlrm
quoprimime.cpython-36.opt-2.pyc42050644editdlrm
quoprimime.cpython-36.pyc76820644editdlrm
utils.cpython-36.opt-1.pyc132070644editdlrm
utils.cpython-36.opt-2.pyc94270644editdlrm
utils.cpython-36.pyc132070644editdlrm
_encoded_words.cpython-36.opt-1.pyc55860644editdlrm
_encoded_words.cpython-36.opt-2.pyc37000644editdlrm
_encoded_words.cpython-36.pyc55860644editdlrm
_header_value_parser.cpython-36.opt-1.pyc761220644editdlrm
_header_value_parser.cpython-36.opt-2.pyc596310644editdlrm
_header_value_parser.cpython-36.pyc761740644editdlrm
_parseaddr.cpython-36.opt-1.pyc124990644editdlrm
_parseaddr.cpython-36.opt-2.pyc95390644editdlrm
_parseaddr.cpython-36.pyc124990644editdlrm
_policybase.cpython-36.opt-1.pyc152880644editdlrm
_policybase.cpython-36.opt-2.pyc60160644editdlrm
_policybase.cpython-36.pyc152880644editdlrm
__init__.cpython-36.opt-1.pyc16710644editdlrm
__init__.cpython-36.opt-2.pyc10620644editdlrm
__init__.cpython-36.pyc16710644editdlrm
Edit: /usr/lib64/python3.6/email/__pycache__/policy.cpython-36.pyc (9620B)
3 \(@sdZddlZddlmZmZmZmZddlmZddl m Z ddl m Z ddl mZdd d d d d ddgZejdZeGdd d eZeZe`ejddZejddZejdddZejddZdS)zcThis will be the home for the policy that hooks in the new code that adds all the email6 features. N)PolicyCompat32compat32_extend_docstrings)_has_surrogates)HeaderRegistry)raw_data_manager) EmailMessagerrr EmailPolicydefaultstrictSMTPHTTPz\n|\rcspeZdZdZeZdZdZeZ e Z fddZ ddZ dd Zd d Zd d ZddZddZdddZZS)r aQ + PROVISIONAL The API extensions enabled by this policy are currently provisional. Refer to the documentation for details. This policy adds new header parsing and folding algorithms. Instead of simple strings, headers are custom objects with custom attributes depending on the type of the field. The folding algorithm fully implements RFCs 2047 and 5322. In addition to the settable attributes listed above that apply to all Policies, this policy adds the following additional attributes: utf8 -- if False (the default) message headers will be serialized as ASCII, using encoded words to encode any non-ASCII characters in the source strings. If True, the message headers will be serialized using utf8 and will not contain encoded words (see RFC 6532 for more on this serialization format). refold_source -- if the value for a header in the Message object came from the parsing of some source, this attribute indicates whether or not a generator should refold that value when transforming the message back into stream form. The possible values are: none -- all source values use original folding long -- source values that have any line that is longer than max_line_length will be refolded all -- all values are refolded. The default is 'long'. header_factory -- a callable that takes two arguments, 'name' and 'value', where 'name' is a header field name and 'value' is an unfolded header field value, and returns a string-like object that represents that header. A default header_factory is provided that understands some of the RFC5322 header field types. (Currently address fields and date fields have special treatment, while all other fields are treated as unstructured. This list will be completed before the extension is marked stable.) content_manager -- an object with at least two methods: get_content and set_content. When the get_content or set_content method of a Message object is called, it calls the corresponding method of this object, passing it the message object as its first argument, and any arguments or keywords that were passed to it as additional arguments. The default content_manager is :data:`~email.contentmanager.raw_data_manager`. Flongc s*d|krtj|dttjf|dS)Nheader_factory)object __setattr__rsuper__init__)selfkw) __class__$/usr/lib64/python3.6/email/policy.pyr\szEmailPolicy.__init__cCs |j|jS)z+ The implementation for this class returns the max_count attribute from the specialized header class that would be used to construct a header of type 'name'. )rZ max_count)rnamerrrheader_max_countcszEmailPolicy.header_max_countcCs>|djdd\}}|jddj|dd}||jdfS)ac+ The name is parsed as everything up to the ':' and returned unmodified. The value is determined by stripping leading whitespace off the remainder of the first line, joining all subsequent lines together, and stripping any trailing carriage return or linefeed characters. (This is the same as Compat32). r:z Nz )splitlstripjoinrstrip)rZ sourcelinesrvaluerrrheader_source_parseus zEmailPolicy.header_source_parsecCsVt|dr$|jj|jkr$||fSt|trFt|jdkrFtd||j||fS)a+ The name is returned unchanged. If the input value has a 'name' attribute and it matches the name ignoring case, the value is returned unchanged. Otherwise the name and value are passed to header_factory method, and the resulting custom header object is returned as the value. In this case a ValueError is raised if the input value contains CR or LF characters. rrzDHeader values may not contain linefeed or carriage return characters) hasattrrlower isinstancestrlen splitlines ValueErrorr)rrr#rrrheader_store_parses zEmailPolicy.header_store_parsecCs*t|dr|Sdjtj|}|j||S)ai+ If the value has a 'name' attribute, it is returned to unmodified. Otherwise the name and the value with any linesep characters removed are passed to the header_factory method, and the resulting custom header object is returned. Any surrogateescaped bytes get turned into the unicode unknown-character glyph. rr)r%r!linesep_splitterrr)rrr#rrrheader_fetch_parses zEmailPolicy.header_fetch_parsecCs|j||ddS)a + Header folding is controlled by the refold_source policy setting. A value is considered to be a 'source value' if and only if it does not have a 'name' attribute (having a 'name' attribute means it is a header object of some sort). If a source value needs to be refolded according to the policy, it is converted into a custom header object by passing the name and the value with any linesep characters removed to the header_factory method. Folding of a custom header object is done by calling its fold method with the current policy. Source values are split into lines using splitlines. If the value is not to be refolded, the lines are rejoined using the linesep from the policy and returned. The exception is lines containing non-ascii binary data. In that case the value is refolded regardless of the refold_source setting, which causes the binary data to be CTE encoded using the unknown-8bit charset. T) refold_binary)_fold)rrr#rrrfoldszEmailPolicy.foldcCs0|j|||jdkd}|jr dnd}|j|dS)a+ The same as fold if cte_type is 7bit, except that the returned value is bytes. If cte_type is 8bit, non-ASCII binary data is converted back into bytes. Headers with binary data are not refolded, regardless of the refold_header setting, since there is no way to know whether the binary data consists of single byte characters or multibyte characters. If utf8 is true, headers are encoded to utf8, otherwise to ascii with non-ASCII unicode rendered as encoded words. Z7bit)r/utf8asciisurrogateescape)r0Zcte_typer2encode)rrr#Zfoldedcharsetrrr fold_binaryszEmailPolicy.fold_binarycst|dr|j|dS|jr"|jntd|j}|jdkp|jdko|rft|dt|dkptfdd |d dD}|s|rt|r|j |d j |j|dS|d |j j ||j S) Nr)Zpolicyinfallrrc3s|]}t|kVqdS)N)r)).0x)maxlenrr sz$EmailPolicy._fold..rrz: ) r%r1max_line_lengthfloatr* refold_sourcer)anyrrr!linesep)rrr#r/linesZrefoldr)r=rr0s     zEmailPolicy._fold)F)__name__ __module__ __qualname____doc__r Zmessage_factoryr2rArrrZcontent_managerrrr$r,r.r1r7r0 __classcell__rr)rrr s;  T)Zraise_on_defectz )rC)rCr?)r2)rHreZemail._policybaserrrrZ email.utilsrZemail.headerregistryrZemail.contentmanagerrZ email.messager __all__compiler-r r rZcloner r rZSMTPUTF8rrrrs0      @