3 šig‘ã@sœUddlZddlZddlZddlZddlmZmZejdfejdfej dfej dfej dfej dfej d fgZeeeefejd ƒZeed œd d „ZdS)éN)ÚListÚTuplezutf-8zutf-16z utf-16-bez utf-16-lezutf-32z utf-32-bez utf-32-lescoding[:=]\s*([-\w.]+))ÚdataÚreturncCs²x0tD](\}}|j|ƒr|t|ƒd…j|ƒSqWxf|jdƒdd…D]P}|dd…dkrFtj|ƒrFtj|ƒ}|dk szt‚|jƒdjdƒ}|j|ƒSqFW|jt j dƒp®t j ƒƒS) zŠCheck a bytes string for a BOM to correctly detect the encoding Fallback to locale.getpreferredencoding(False) like open() on Python3Nó éréó#ÚasciiF) ÚBOMSÚ startswithÚlenÚdecodeÚsplitÚ ENCODING_REÚsearchÚAssertionErrorÚgroupsÚlocaleÚgetpreferredencodingÚsysÚgetdefaultencoding)rÚbomÚencodingÚlineÚresult©rú;/tmp/pip-build-88gy_88q/pip/pip/_internal/utils/encoding.pyÚ auto_decodes   r)ÚcodecsrÚrerZtypingrrÚBOM_UTF8Ú BOM_UTF16Ú BOM_UTF16_BEÚ BOM_UTF16_LEÚ BOM_UTF32Ú BOM_UTF32_BEÚ BOM_UTF32_LEr ÚbytesÚstrÚcompilerrrrrrÚs