a „oe @ã@s–ddlZddlZddlZddlZddlZddlZddlZddlmZm Z m Z m Z m Z m Z ejdkrpddlmZnFejr„ddlmZn2zddlmZWn ey´Gdd„dƒZYn0Gdd„ded d �Zhd £Zhd £Zee ed œdd„Ze eeeefd œdd„Zejje eefedœdd„Zdddddddddddd d!d"d#d$d%d&d'd(d)d*d+d,d-d.d/d0d1œZe eefe eeee effd œd2d3„ZdS)4éN)ÚDictÚListÚOptionalÚTupleÚUnionÚcast)éé)Ú TypedDictc@seZdZdd„ZdS)r cOsdS)N©)Ú_argsÚ_kwargsr r úFC:\Program Files\Certbot\pkgs\setuptools\_vendor\packaging\metadata.pyÚ__init_subclass__szTypedDict.__init_subclass__N)Ú__name__Ú __module__Ú __qualname__rr r r rr sr c@s.eZdZUdZeed<eed<eed<eeed<eed<eed<eeed<eed <eed <eed <eed <eeed <eed<eeed<eeed<eeed<eeed<eed<eed<eeed<eeed<eeed<eed<eeed<eeefed<eed<eeed<eeed<dS)Ú RawMetadataaqA dictionary of raw core metadata. Each field in core metadata maps to a key of this dictionary (when data is provided). The key is lower-case and underscores are used instead of dashes compared to the equivalent core metadata field. Any core metadata field that can be specified multiple times or can hold multiple values in a single field have a key with a plural name. Core metadata fields that can be specified multiple times are stored as a list or dict depending on which is appropriate for the field. Any fields which hold multiple values in a single field are stored as a list. Úmetadata_versionÚnameÚversionÚ platformsÚsummaryÚ descriptionÚkeywordsÚ home_pageÚauthorÚ author_emailÚlicenseÚsupported_platformsÚ download_urlÚ classifiersÚrequiresÚprovidesÚ obsoletesÚ maintainerÚmaintainer_emailÚ requires_distÚ provides_distÚobsoletes_distÚrequires_pythonÚrequires_externalÚ project_urlsÚdescription_content_typeÚprovides_extraÚdynamicN)rrrÚ__doc__ÚstrÚ__annotations__rrr r r rrs:              rF)Útotal>r&rrrrrrrr*rr%rr-r > r/r!rr$r'r+r(r)r#r.r"r)ÚdataÚreturncCsdd„| d¡DƒS)zCSplit a string of comma-separate keyboards into a list of keywords.cSsg|] }| ¡‘qSr ©Ústrip)Ú.0Úkr r rÚ ƒóz#_parse_keywords..ú,)Úsplit)r4r r rÚ_parse_keywords�sr>c Csfi}|D]X}dd„| dd¡Dƒ}| dgtddt|ƒƒ¡|\}}||vrXtdƒ‚|||<q|S) z?Parse a list of label/URL string pairings separated by a comma.cSsg|] }| ¡‘qSr r6)r8Úpr r rr:›r;z'_parse_project_urls..r<éÚréz duplicate labels in project urls)r=ÚextendÚmaxÚlenÚKeyError)r4ZurlsZpairÚpartsZlabelÚurlr r rÚ_parse_project_urls†s rI)ÚmsgÚsourcer5cCsPt|tƒr| ¡}|S|jdd�}z| dd¡WStyJtdƒ‚Yn0dS)zGet the body of the message.T©ÚdecodeÚutf8Ústrictzpayload in an invalid encodingN)Ú isinstancer1Ú get_payloadrMÚUnicodeDecodeErrorÚ ValueError)rJrKÚpayloadZbpayloadr r rÚ _get_payload®s   rUrrr!rr-r r/rrrr%r&rrr$r)rr,r#r(r.r"r'r+r*rrr)rz author-emailZ classifierrzdescription-content-typez download-urlr/z home-pagerrr%zmaintainer-emailzmetadata-versionrr$zobsoletes-distÚplatformz project-urlr#z provides-distzprovides-extrar"z requires-distzrequires-externalzrequires-pythonrzsupported-platformrc Csœi}i}t|tƒr,tjjtjjd� |¡}ntjjtjjd�  |¡}t |  ¡ƒD�]œ}|  ¡}|  |¡}g}d}|D]¤}t|tjjtfƒsŽJ‚t|tjjƒ�rg} tj |¡D]F\} } z|  dd¡Wntyàd} d}Yn0d} |  | | f¡q®| ttj | ¡ƒ¡qt| |¡qt|�s*|||<qPt |¡} | du�rH|||<qP| tv�rnt|ƒdk�rn|d || <qP| tv�r‚||| <qP| d k�r¬t|ƒdk�r¬t|d ƒ|| <qP| d k�ræzt|ƒ|| <Wnt�yâ|||<Yn0qP|||<qPzt||ƒ} Wn4t�y2| d g¡ |j t|t!ƒd �¡Yn\0| �rŽd |v�rlt"t| #d ¡ƒ}| d g¡ $|| g¡n"d |v�r†|d  | ¡n| |d <t"t%|ƒ|fS)aÙParse a distribution's metadata. This function returns a two-item tuple of dicts. The first dict is of recognized fields from the core metadata specification. Fields that can be parsed and translated into Python's built-in types are converted appropriately. All other fields are left as-is. Fields that are allowed to appear multiple times are stored as lists. The second dict contains all other fields from the metadata. This includes any unrecognized fields. It also includes any fields which are expected to be parsed into a built-in type but were not formatted appropriately. Finally, any fields that are expected to appear only once but are repeated are included in this dict. )ÚpolicyTrNrOÚlatin1FNr@rrr,rrL)&rPr1ÚemailÚparserZParserrWZcompat32ZparsestrZ BytesParserZ parsebytesÚ frozensetÚkeysÚlowerZget_allÚheaderZHeaderZ decode_headerrMrRÚappendZ make_headerÚ_EMAIL_TO_RAW_MAPPINGÚgetÚ_STRING_FIELDSrEÚ_LIST_STRING_FIELDSr>rIrFrUrSÚ setdefaultrQÚbytesrÚpoprCr)r4ÚrawZunparsedÚparsedrZheadersÚvalueZvalid_encodingÚhÚchunksÚbinÚencodingZraw_namerTZdescription_headerr r rÚ parse_emailësv              ÿ   ÿ rn)Zemail.feedparserrYZ email.headerZ email.messageZ email.parserZ email.policyÚsysÚtypingrrrrrrÚ version_infor Ú TYPE_CHECKINGZtyping_extensionsÚ ImportErrorrrbrcr1r>rIÚmessageZMessagererUr`rnr r r rÚsf    C(ä