/opt/alt/python311/lib64/python3.11/email/__pycache__
NameSizeModeActions
base64mime.cpython-311.opt-1.pyc43650644editdlrm
base64mime.cpython-311.opt-2.pyc26140644editdlrm
base64mime.cpython-311.pyc43650644editdlrm
charset.cpython-311.opt-1.pyc159740644editdlrm
charset.cpython-311.opt-2.pyc97030644editdlrm
charset.cpython-311.pyc160350644editdlrm
contentmanager.cpython-311.opt-1.pyc138440644editdlrm
contentmanager.cpython-311.opt-2.pyc138440644editdlrm
contentmanager.cpython-311.pyc138440644editdlrm
encoders.cpython-311.opt-1.pyc24000644editdlrm
encoders.cpython-311.opt-2.pyc20710644editdlrm
encoders.cpython-311.pyc24000644editdlrm
errors.cpython-311.opt-1.pyc86780644editdlrm
errors.cpython-311.opt-2.pyc70830644editdlrm
errors.cpython-311.pyc86780644editdlrm
feedparser.cpython-311.opt-1.pyc213070644editdlrm
feedparser.cpython-311.opt-2.pyc196660644editdlrm
feedparser.cpython-311.pyc215070644editdlrm
generator.cpython-311.opt-1.pyc224170644editdlrm
generator.cpython-311.opt-2.pyc187420644editdlrm
generator.cpython-311.pyc224170644editdlrm
header.cpython-311.opt-1.pyc269900644editdlrm
header.cpython-311.opt-2.pyc214130644editdlrm
header.cpython-311.pyc269900644editdlrm
headerregistry.cpython-311.opt-1.pyc337000644editdlrm
headerregistry.cpython-311.opt-2.pyc281060644editdlrm
headerregistry.cpython-311.pyc337660644editdlrm
iterators.cpython-311.opt-1.pyc31770644editdlrm
iterators.cpython-311.opt-2.pyc25840644editdlrm
iterators.cpython-311.pyc31770644editdlrm
message.cpython-311.opt-1.pyc590520644editdlrm
message.cpython-311.opt-2.pyc427650644editdlrm
message.cpython-311.pyc590520644editdlrm
parser.cpython-311.opt-1.pyc73980644editdlrm
parser.cpython-311.opt-2.pyc44260644editdlrm
parser.cpython-311.pyc73980644editdlrm
policy.cpython-311.opt-1.pyc125560644editdlrm
policy.cpython-311.opt-2.pyc63810644editdlrm
policy.cpython-311.pyc125560644editdlrm
quoprimime.cpython-311.opt-1.pyc112510644editdlrm
quoprimime.cpython-311.opt-2.pyc78390644editdlrm
quoprimime.cpython-311.pyc112510644editdlrm
utils.cpython-311.opt-1.pyc193250644editdlrm
utils.cpython-311.opt-2.pyc157840644editdlrm
utils.cpython-311.pyc193250644editdlrm
_encoded_words.cpython-311.opt-1.pyc91310644editdlrm
_encoded_words.cpython-311.opt-2.pyc72580644editdlrm
_encoded_words.cpython-311.pyc91310644editdlrm
_header_value_parser.cpython-311.opt-1.pyc1505680644editdlrm
_header_value_parser.cpython-311.opt-2.pyc1340180644editdlrm
_header_value_parser.cpython-311.pyc1506540644editdlrm
_parseaddr.cpython-311.opt-1.pyc243140644editdlrm
_parseaddr.cpython-311.opt-2.pyc214610644editdlrm
_parseaddr.cpython-311.pyc243140644editdlrm
_policybase.cpython-311.opt-1.pyc197150644editdlrm
_policybase.cpython-311.opt-2.pyc105680644editdlrm
_policybase.cpython-311.pyc197150644editdlrm
__init__.cpython-311.opt-1.pyc21240644editdlrm
__init__.cpython-311.opt-2.pyc15280644editdlrm
__init__.cpython-311.pyc21240644editdlrm
Edit: /opt/alt/python311/lib64/python3.11/email/__pycache__/policy.cpython-311.pyc (12556B)
/g)dZddlZddlZddlmZmZmZmZddlm Z ddl m Z ddl m Z ddlmZgdZejd ZeGd d eZeZe`ed ZedZeddZed ZdS)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) EmailMessage)rrr EmailPolicydefaultstrictSMTPHTTPz\n|\rcreZdZdZeZdZdZeZ e Z fdZ dZ dZdZdZd Zd Zd d ZxZS) 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 d|vr(t|dttjdi|dS)Nheader_factory)object __setattr__rsuper__init__)selfkw __class__s 3/opt/alt/python311/lib64/python3.11/email/policy.pyrzEmailPolicy.__init__]sR 2 % %   t%5~7G7G H H H2c&|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'. )r max_count)rnames rheader_max_countzEmailPolicy.header_max_countds "4(22rc|ddd\}}|dd|ddz}||dfS)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 N )splitlstripjoinrstrip)r sourcelinesr values rheader_source_parsezEmailPolicy.header_source_parsevsb"!n**322 e U##bggk!""o&>&>>ell6**++rcJt|dr3|j|kr||fSt|tr4t |dkrtd||||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. r r$zDHeader values may not contain linefeed or carriage return characters) hasattrr lower isinstancestrlen splitlines ValueErrorrrr r,s rheader_store_parsezEmailPolicy.header_store_parses 5& ! ! !ej&6&6&8&8DJJLL&H&H%= eS ! ! >c%*:*:*<*<&=&=a&?&?=>> >d))$6677rct|dr|Sdt|}|||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. r r%)r/r)linesep_splitterr'rr6s rheader_fetch_parsezEmailPolicy.header_fetch_parsesQ 5& ! ! L(..u5566""4///rc2|||dS)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)_foldr6s rfoldzEmailPolicy.folds&zz$Tz:::rc||||jdk}|jrdnd}||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. 7bitr<utf8asciisurrogateescape)r>cte_typerBencode)rr r,foldedcharsets r fold_binaryzEmailPolicy.fold_binarysGD%t}f7LMM I2&&7}}W&7888rct|dr||S|jr|jn tj|}|jdkp[|jdkoP|r,t|dt|zdzkp"tfd|ddD}|s.|j s| }n|rt|}|r=| |d ||S|d z|j |z|jzS) Nr )policyallrrc3>K|]}t|kVdS)N)r3).0xmaxlens r z$EmailPolicy._fold..s-<zEmailPolicy._foldse 5& ! ! +::T:** *)-)=N%%3;  ""$->$.>As58}}SYY6q86A=<<<<%)<<<<<   09 0"]]__, 0(//  O&&tRWWU^^<<AAANN Nd{T\..u555 DDr)F)__name__ __module__ __qualname____doc__r message_factoryrBrVrrr content_managerrr!r-r7r:r?rIr> __classcell__)rs@rr r s88t#O DM#^%%N&O333$ , , ,888& 0 0 0;;;*999$EEEEEEEErr T)raise_on_defectr&)rY)rYrS)rB)r_rerTemail._policybaserrrr email.utilsremail.headerregistryremail.contentmanagerr email.messager __all__compiler9r r rcloner rrSMTPUTF8rrrrns_ LLLLLLLLLLLL''''''AAAAAA111111&&&&&&   2:h''CECECECECE&CECECEL +--  t , ,}}V}$$}}VT}:: ::4: r