Your IP : 3.133.134.63


Current Path : /opt/alt/python313/lib64/python3.13/zipfile/__pycache__/
Upload File :
Current File : //opt/alt/python313/lib64/python3.13/zipfile/__pycache__/__init__.cpython-313.pyc

�

+}g�Y����SrSSKrSSKrSSKrSSKrSSKrSSKrSSKrSSK	r	SSK
r
SSKrSSKr\Rr
SSKrSSKr/SQr"SS\5r"SS\5r\=rrSrS	rS	rSrS
rSrSrS
rSrSr Sr!Sr"Sr#Sr$\RJ"\#5r&Sr'Sr(Sr)Sr*Sr+Sr,Sr-Sr.S
r/Sr0Sr1Sr2\RJ"\15r3Sr4Sr5Sr6Sr7Sr8Sr9Sr:Sr;S
r<Sr=Sr>Sr?Sr@SrASrBS rCS!rDS"rES#rFSrGSrHS
rIS$rJS%rKS&rLS'rMS(rN\RJ"\M5rOSrPSrQSrRSrSSrTSrUSrVSrWS
rXSrYSrZSr[S)r\S*r]\RJ"\\5r^S+r_S,r`\RJ"\_5raSrbSrcSrdSreSrfSrgSrhSriS
rjSrkS-rl"S.S/\m5rnS0roS1rpS2rqS3rrS4rs"S5S65rtSquS7rvS8rw"S9S:5rx"S;S<5ry0SS=_SS>_SS?_SS?_SS?_SS?_SS@_SSA_S
SB_SSC_SS@_SSD_SSE_S#SF_SGSH_SISJ_SKSL_rzSMr{S^SNjr|SOr}"SPSQ5r~"SRSS5r"STSU\GR5r�"SVSW\GR5r�"SXSY5r�"SZS[\�5r�S^S\jr�SS]K�J�r�J�r� g!\a Sr\Rr
GNf=f!\a SrGN&f=f!\a SrGN0f=f)_zP
Read and write ZIP files.

XXX references to utf-8 need further investigation.
�N)
�
BadZipFile�
BadZipfile�error�
ZIP_STORED�ZIP_DEFLATED�	ZIP_BZIP2�ZIP_LZMA�
is_zipfile�ZipInfo�ZipFile�	PyZipFile�LargeZipFile�Pathc��\rSrSrSrg)r�'�N)�__name__�
__module__�__qualname__�__firstlineno__�__static_attributes__r��7/opt/alt/python313/lib64/python3.13/zipfile/__init__.pyrr's��rrc��\rSrSrSrSrg)r�+zi
Raised when writing a zipfile, the zipfile requires ZIP64 extensions
and those extensions are disabled.
rN)rrrr�__doc__rrrrrr+s��rri���������-�.�?s<4s4H2LHsPK��������	z<4s4B4HL2L5H2LsPK�
��
����� �@iz<4s2B4HL2L2HsPKz<4sLQLsPKz
<4sQ2H2L4QsPKiPKc�^�\rSrSr\R
"S5rS	U4SjjrS	Sjr\	S5r
\	S5r\	S5rSr
U=r$)
�_Extra��<HHc�">�[TU]X5$�N)�super�__new__)�cls�val�id�	__class__s   �rr=�_Extra.__new__�s����w��s�(�(rc��X lgr;�r@)�selfr?r@s   r�__init__�_Extra.__init__�s���rc��URRUSS5up#U"USSU-U5USU-S4$![Ra SnSnN1f=f)Nr(r)�FIELD_STRUCT�unpack�structr)r>�raw�xid�xlens    r�read_one�_Extra.read_one�sl��	��(�(�/�/��B�Q��8�I�C��3�w��$��<��%�s�1�T�6�7�|�3�3���|�|�	��C��D�	�s� 9�A�Ac#�z# �[U5nU(a%[RU5up2Uv� U(aM$gg7fr;)�
memoryviewr7rO)r>�data�rest�extras    r�split�_Extra.split�s0����$���� �/�/�$�/�K�E��K��d�s�5;�;c�X^�SRU4SjURU555$)z'Remove Extra fields with specified IDs.rc3�L># �UHnURT;dMUv� M g7fr;rD)�.0�ex�xidss  �r�	<genexpr>�_Extra.strip.<locals>.<genexpr>�s&����
�%���u�u�D� �
�B�%�s�$�	$)�joinrV)r>rSr\s  `r�strip�_Extra.strip�s+����x�x�
��i�i��o�
�
�	
rrDr;)rrrrrK�StructrIr=rF�classmethodrOrVr`r�
__classcell__�rAs@rr7r7�sW����=�=��'�L�)���4��4������
��
rr7c�J�[U5(agg![a gf=f)NTF)�_EndRecData�OSError��fps r�_check_zipfilerk�s4��
��r�?�?������
���
�s��
"�"c���Sn[US5(a[US9nU$[US5n[U5nSSS5 U$!,(df   U$=f![a U$f=f)z�Quickly see if a file is a ZIP file by checking the magic number.

The filename argument may be a file or file-like object too.
F�readri�rbN)�hasattrrk�openrh)�filename�resultrjs   rr
r
�sx��
�F�
��8�V�$�$�#�x�0�F��M�	�h��%��'��+��&��M�	&�%��M���
���M�
�s2�A�A�A�A�
A�A�A�
A"�!A"c
��URU[-
S5 UR[5n[	U5[:waU$[
R"[U5upEpgU[:waU$US:wdUS:�a[S5eURU[-
[-
S5 UR[5n[	U5[:waU$[
R"[U5u
pHp�p�p�nnU[:waU$XB['X�['X�['X�[ 'X�["'X�[$'UU[&'U$![a Us$f=f)zE
Read the ZIP64 end-of-archive records and use that to update endrec
r&rr%z3zipfiles that span multiple disks are not supported)�seek�sizeEndCentDir64Locatorrhrm�lenrKrJ�structEndArchive64Locator�stringEndArchive64Locatorr�sizeEndCentDir64�structEndArchive64�stringEndArchive64�_ECD_SIGNATURE�_ECD_DISK_NUMBER�_ECD_DISK_START�_ECD_ENTRIES_THIS_DISK�_ECD_ENTRIES_TOTAL�	_ECD_SIZE�_ECD_OFFSET)�fpin�offset�endrecrS�sig�diskno�reloff�disks�sz�create_version�read_version�disk_num�disk_dir�dircount�	dircount2�dirsize�	diroffsets                 r�
_EndRecData64r��sF����	�	�&�2�2�A�6��9�9�,�-�D�
�4�y�+�+��
�!'���/H�$�!O��C��
�'�'��
�
��{�e�a�i��N�O�O�	�I�I�f�.�.�1A�A�1�E��9�9�%�&�D�
�4�y�$�$��
�	�
�
�(�$�/�0�C�^�8��W�i�
� � ��
�!�>��'���&�?��%-�!�"�!*����9��#�F�;���M��E���
��s�D9�9E�Ec���URSS5 UR5nUR[*S5 UR	[5n[U5[:XawUSS[:XajUSSS:Xaa[R"[U5n[U5nURS5 URU[-
5 [U[*U5$[U[-
[-
S5nURUS5 UR	[[-5nUR[5nUS:�a�X%U[-n[U5[:wag[[R"[U55nU[ nX%[-U[-U-nURU5 URXE-5 [XU-U-
U5$g![a gf=f)z�Return data from the "End of Central Directory" record, or None.

The data is a list of the nine items in the ZIP "End of central dir"
record followed by a tenth item, the file seek offset of this record.rr&Nr(���sr)rt�tell�sizeEndCentDirrhrmrv�stringEndArchiverKrJ�structEndArchive�list�appendr��max�ZIP_MAX_COMMENT�rfind�_ECD_COMMENT_SIZE)	r��filesizerSr��maxCommentStart�start�recData�commentSize�comments	         rrgrg's���	�I�I�a��O��y�y�{�H�
��	�	�>�/�1�%��9�9�^�$�D��D�	�^�#��Q�q�	�%�%��R�S�	�[� ����/��6���F�|��	�
�
�c���
�
�h��/�0��T�N�?�F�;�;��(�_�4�~�E�q�I�O��I�I�o�q�!��9�9�_�~�5�6�D��J�J�'�(�E���z��U�>�1�2���w�<�>�)���f�m�m�$4�g�>�?���.�/���^�+�E�.�,@��,L�M���
�
�g���
�
�o�-�.��T�U�#:�X�#E�#�%�	%���W����s�G�
G"�!G"c��UR[S55nUS:�aUSUn[RS:wa4[RU;a UR	[RS5n[R
(aH[R
S:wa4[R
U;a UR	[R
S5nU$)zvTerminate the file name at the first null byte and
ensure paths always use forward slashes as the directory separator.r�/)�find�chr�os�sep�replace�altsep)rq�	null_bytes  r�_sanitize_filenamer�cs����
�
�c�!�f�%�I��A�~��A�i�(��
�v�v��}����8�+��#�#�B�F�F�C�0��	�y�y�R�Y�Y�#�%�"�)�)�x�*?��#�#�B�I�I�s�3���Orc��\rSrSrSrSrSSjr\S5r\RS5rSr
SS	jrS
rSr
\SSS
.Sjj5rSrSrg)rivz>Class with attributes describing each file in the ZIP archive.)�
orig_filenamerq�	date_time�
compress_type�compress_levelr�rU�
create_systemr��extract_version�reserved�	flag_bits�volume�
internal_attr�
external_attr�
header_offset�CRC�
compress_size�	file_size�	_raw_time�_end_offsetc��Xl[U5nXlX lUSS:a[	S5e[
UlSUlSUlSUl	[RS:XaSUlOSUl[Ul[UlSUlSUlSUlSUlSUlSUlSUlSUlg)Nr�z+ZIP does not support timestamps before 1980r�win32r')r�r�rqr��
ValueErrorrr�r�r�rU�sys�platformr��DEFAULT_VERSIONr�r�r�r�r�r�r�r�r�r�)rErqr�s   rrF�ZipInfo.__init__�s���%��&�h�/�� �
�"���Q�<�$���J�K�K�(���"��������
��<�<�7�"�!"�D��"#�D��-���.�����
���������������������rc��UR$r;�r��rEs r�_compresslevel�ZipInfo._compresslevel�s���"�"�"rc��Xlgr;r�)rE�values  rr�r��s��#�rc�\�SURR<SUR<3/nUR[:wa<URS[RURUR5-5 URS-	nURS-nU(a(URS[R"U5-5 U(aURSU-5 UR5nU(aUR(aURSUR-5 U(aUR(aLUR[:wdURUR:waURS	UR-5 URS
5 SRU5$)N�<z
 filename=� compress_type=%sr1rz filemode=%rz external_attr=%#xz
 file_size=%rz compress_size=%r�>�)rArrqr�rr��compressor_names�getr��stat�filemode�is_dirr�r�r_)rErr�hi�lo�isdirs     r�__repr__�ZipInfo.__repr__�s;��'+�~�~�'>�'>��
�
�N�O������+��M�M�-�*�.�.�t�/A�/A�/3�/A�/A�C�C�
D��
�
�2�
%��
�
�
�&�
(��
��M�M�.�4�=�=��+<�<�=�
��M�M�.��3�4����
�������M�M�/�D�N�N�:�;��$�,�,�
�
�
�:�
-�
�^�^�t�1�1�
1��M�M�-��0B�0B�B�C��
�
�c���w�w�v��rNc���URnUSS-
S-USS--US-nUSS-US	S--USS--nUR[-(aS=n=pgO$URnURnUR
nURnSn	UcU[:�=(d	 U[:�nU(a?S
n
U[R"U
S[R"U
5S	-
Xv5-nSnSn[n	UR[:Xa[[U	5n	O$UR[ :Xa[["U	5n	[X�R$5Ul[X�R&5UlUR)5up�[R"[*[,UR$UR.UURXCUXg[1U5[1U55
n
X�-U-$)z�Return the per-file header as a bytes object.

When the optional zip64 arg is None rather than a bool, we will
decide based upon the file_size and compress_size, if known,
False otherwise.
rr�r,r%r)r&r'r.r(z<HHQQ���)r�r��_MASK_USE_DATA_DESCRIPTORr�r�r�rU�ZIP64_LIMITrK�pack�calcsize�
ZIP64_VERSIONr�rr��
BZIP2_VERSIONr	�LZMA_VERSIONr�r��_encodeFilenameFlags�structFileHeader�stringFileHeaderr�rv)rE�zip64�dt�dosdate�dostimer�r�r�rU�min_version�fmtrqr��headers              r�
FileHeader�ZipInfo.FileHeader�s����^�^���a�5�4�<�A�%��1���
�2�R��U�:���Q�%�2�+��1���
�*�b��e�q�j�9���>�>�5�5�./�/�C�/�-�)��(�(�C� �.�.�M����I��
�
�����=���+�J�}�{�/J�E���C��F�K�K��()�6�?�?�3�+?��+A�9�]�]�E�"�I�&�M�'�K�����*��m�[�9�K�
�
�
�8�
+��l�K�8�K�"�;�0D�0D�E���!�+�/B�/B�C���"�7�7�9������-�/?�!�1�1�4�=�=�)�!�/�/��3�*� ��]�C��J�	8��
� �5�(�(rc���URRS5UR4$![a1 URRS5UR[-4s$f=f)N�ascii�utf-8)rq�encoder��UnicodeEncodeError�_MASK_UTF_FILENAMEr�s rr��ZipInfo._encodeFilenameFlagss[��	V��=�=�'�'��0�$�.�.�@�@��!�	V��=�=�'�'��0�$�.�.�CU�2U�U�U�	V�s�&)�8A$�#A$c��URn[Rn[U5S:�Ga:U"SUSS5upEUS-[U5:�a[	SXE4-5eUS:Xa�USUS-nUR
S;aSnU"SUSS5uUlUSSnURS	:XaS
nU"SUSS5uUlUSSnURS	:XaSnU"SUSS5uUlOhUS:XabUSUS-nU"SUSS5up�US:XaEX�:Xa@USSRS5n
U
(a[U
5UlOSSKnURSSS9 X%S-Sn[U5S:�aGM9gg![Ra [	SWS
35Sef=f![Ran[	S5UeSnAf[an[	S5UeSnAff=f)Nr(r9z"Corrupt extra field %04x (size=%d)r%)l����r�z	File sizez<Qrr�z
Compress sizez
Header offsetzCorrupt zip64 extra field. z not found.iupz<BLr)r�rz'Empty unicode path extra field (0x7075)r&��
stacklevelz)Corrupt unicode path extra field (0x7075)z>Corrupt unicode path extra field (0x7075): invalid utf-8 bytes)rUrKrJrvrr�r�r�r�decoder�rq�warnings�warn�UnicodeDecodeError)
rE�filename_crcrUrJ�tp�lnrS�field�
up_version�up_name_crc�up_unicode_namer�es
             r�_decodeExtra�ZipInfo._decodeExtras���
�
�������%�j�A�o��E�5��!�9�-�F�B��!�t�c�%�j� � �!E���!P�Q�Q��V�|��Q�r�!�t�}��F��~�~�)M�M� +��*0��t�B�Q�x�*@����#�A�B�x���)�)�[�8� /��.4�T�4���8�.D�+��*�#�A�B�x���)�)�[�8� /��.4�T�4���8�.D�+��*���v���Q�r�!�t�}��n�.4�U�D��!�H�.E�+�J�!�Q��;�+F�*.�q�r�(�/�/�'�*B��*�,>��,O�D�M�+�$�M�M�*S�`a�M�b��Q�$�%�L�E�O�%�j�A�o�o��&�|�|�F�$�'B�(-�w�k�&;�<�AE�F�F���|�|�Y�$�%P�Q�WX�X��)�n�$�%e�f�lm�m��n�s8�+A9E(�4AF�9F�(%F
�G�$F0�0
G�=G	�	GT��strict_timestampsc�d�[U[R5(a[R"U5n[R"U5n[R
"UR5n[R"UR5nUSSnU(dUSS:aSnOU(dUSS:�aSnUcUn[RR[RRU5S5nUS[R[R4;a.USSnUS[R[R4;aM.U(aUS	-
nU"X'5nURS
-S-UlU(aSUlU=RS-slU$UR"UlU$)a7Construct an appropriate ZipInfo for a file on the filesystem.

filename should be the path to a file or directory on the filesystem.

arcname is the name which it will have within the archive (by default,
this will be the same as filename, but without a drive letter and with
leading path separators removed).
rr*r��r�r%r%rrr�;)rr���;rNr%r�rr1)�
isinstancer��PathLike�fspathr��S_ISDIR�st_mode�time�	localtime�st_mtime�path�normpath�
splitdriver�r�r�r��st_size)	r>rq�arcnamer�str��mtimer��zinfos	         r�	from_file�ZipInfo.from_file8sW���h����,�,��y�y��*�H�
�W�W�X�
�����R�Z�Z�(�����r�{�{�+���!�A�J�	� �Y�q�\�D�%8�-�I�"�y��|�d�':�2�I��?��G��'�'�"�"�2�7�7�#5�#5�g�#>�q�#A�B���a�j�R�V�V�R�Y�Y�/�/��a�b�k�G��a�j�R�V�V�R�Y�Y�/�/���s�N�G��G�'��!�z�z�F�2�r�9�����E�O����4�'����!�j�j�E�O��rc��URRS5(ag[RR(aMURR[RR
[RR45$g)z2Return True if this archive member is a directory.r�TF)rq�endswithr�rr�r�r�s rr��ZipInfo.is_dir^sT���=�=�!�!�#�&�&��
�7�7�>�>��=�=�)�)�2�7�7�;�;������*G�H�H�r)r�r�r�r�r�r�r�r�r�rUr�r�rqr�r�r�r�r�r�)�NoNamerr;)rrrrr�	__slots__rF�propertyr��setterr�r�r�rrcr%r�rrrrrrvsx��H��I�0  �L�#��#����$��$��,.)�`V�+!�Z�#�D�#��#�J
rrc�\�[S5HnUS-(a
US-	S-nMUS-nM U$)Nrr%l q[)�range)�crc�js  r�_gen_crcr2ps5��
�1�X����7��!�8�z�)�C��A�I�C�	�
�Jrc��^^^^^^�SmSmSm[c"[[[[	S555q[mU4SjmUUUU4SjmUHnT"U5 M
 UU4SjnU$)NixV4i�gE#i�xV4�c�$>�US-	TX-S--$)z(Compute the CRC32 primitive on one byte.r�r)�chr0�crctables  �r�crc32�_ZipDecrypter.<locals>.crc32�s����q��H�c�h�$�%6�7�7�7rc�\>�T"UT5mTTS--S-mTS-S-S-mT"TS-	T5mg)Nr6r�i�r%�r)�cr9�key0�key1�key2s ����r�update_keys�"_ZipDecrypter.<locals>.update_keys�sE����Q��~����t��$�
�2���y� �1�$�
�2���T�R�Z��&�rc�>�[5nURnUH(nTS-nX4US--S-	S--nT"U5 U"U5 M* [U5$)zDecrypt a bytes object.r&r%rr6)�	bytearrayr��bytes)rSrrr�r=�kr@rAs     ��r�	decrypter� _ZipDecrypter.<locals>.decrypter�sZ�����������A��q��A�
��!��9��"�d�*�*�A���N��1�I�	�
�V�}�r)�	_crctabler��mapr2r/)	�pwd�prGr9r8r>r?r@rAs	   @@@@@@r�
_ZipDecrypterrM�sc����D��D��D�����X�u�S�z�2�3�	��H�8�'�'����A���	��rc�,�\rSrSrSrSrSrSrSrg)�LZMACompressori�c��SUlgr;��_compr�s rrF�LZMACompressor.__init__�s	����
rc�0�[R"S[R05n[R"[R[R
"[RU5/S9Ul[R"SSS[U55U-$)Nr@��filtersz<BBHr,r()
�lzma�_encode_filter_properties�FILTER_LZMA1rO�
FORMAT_RAW�_decode_filter_propertiesrRrKr�rv)rE�propss  r�_init�LZMACompressor._init�sq���.�.��d�6G�6G�/H�I���(�(�����*�*�4�+<�+<�e�D�C
���
��{�{�6�1�a��U��4�u�<�<rc��URc,UR5URRU5-$URRU5$r;)rRr]�compress�rErSs  rr`�LZMACompressor.compress�sA���:�:���:�:�<�$�*�*�"5�"5�d�";�;�;��z�z�"�"�4�(�(rc��URc+UR5URR5-$URR5$r;)rRr]�flushr�s rrd�LZMACompressor.flush�s=���:�:���:�:�<�$�*�*�"2�"2�"4�4�4��z�z���!�!rrQN)	rrrrrFr]r`rdrrrrrOrO�s���=�)�
"rrOc� �\rSrSrSrSrSrg)�LZMADecompressori�c�.�SUlSUlSUlg)NrF��_decomp�_unconsumed�eofr�s rrF�LZMADecompressor.__init__�s����������rc
�P�URc�U=RU-
sl[UR5S::ag[R"SURSS5un[UR5SU-::ag[
R"[
R[
R"[
RURSSU-5/S9UlURSU-SnU?URRU5nURRUlU$)Nr(rz<Hr&rU)rjrkrvrKrJrWrgrZr[rY�
decompressrl)rErS�psizerrs    rro�LZMADecompressor.decompress�s����<�<������$���4�#�#�$��)���]�]�4��)9�)9�!�A�)>�?�F�E��4�#�#�$��E�	�1���0�0�����.�.�t�/@�/@�/3�/?�/?��!�e�)�/L�N�K��D�L��#�#�A��I�J�/�D�� ����(�(��.���<�<�#�#����
rriN)rrrrrFrorrrrrgrg�s���
rrg�store�shrink�reduce�implode�tokenize�deflate�	deflate64�bzip2rW�terse��lz77�a�wavpack�b�ppmdc���U[:XagU[:Xa[(d[S5egU[:Xa[
(d[S5egU[:Xa[(d[S5eg[S5e)Nz.Compression requires the (missing) zlib modulez-Compression requires the (missing) bz2 modulez.Compression requires the (missing) lzma modulez(That compression method is not supported)	rr�zlib�RuntimeErrorr�bz2r	rW�NotImplementedError)�compressions r�_check_compressionr��s����j� ��	��	$��t��@�B�
B��
�	�	!��s��?�A�
A��
��	 ��t��@�B�
B��"�"L�M�Mrc�j�U[:Xa]Ub&[R"U[RS5$[R"[R[RS5$U[
:Xa.Ub[R"U5$[R"5$U[:Xa
[5$g)N��)
rr��compressobj�DEFLATED�Z_DEFAULT_COMPRESSIONrr��
BZ2Compressorr	rO)r��
compresslevels  r�_get_compressorr�s�����$��$��#�#�M�4�=�=�#�F�F����� :� :�D�M�M�3�O�O�	�)�	#��$��$�$�]�3�3�� � �"�"�	�(�	"����rc�H�[U5 U[:XagU[:Xa[R"S5$U[
:Xa[R"5$U[:Xa
[5$[RU5nU(a[SX4-5e[SU4-5e)Nr�zcompression type %d (%s)zcompression type %d)
r�rrr��
decompressobjrr��BZ2Decompressorr	rgr�r�r�)r��descrs  r�_get_decompressorr�s����}�%��
�"��	�,�	&��!�!�#�&�&�	�)�	#��"�"�$�$�	�(�	"��!�!� �$�$�]�3���%�&@�M�CY�&Y�Z�Z�%�&;�}�>N�&N�O�Orc�:�\rSrSrSrSrS	SjrS
SjrSrSr	g)�_SharedFilei"c�b�XlX lX0lX@lXPlUR
Ulgr;)�_file�_pos�_close�_lock�_writing�seekable)rE�file�pos�close�lock�writings      rrF�_SharedFile.__init__#s&���
��	����
��
��
�
��
rc��UR$r;)r�r�s rr��_SharedFile.tell+s���y�y�rc��UR UR5(a[S5eURR	X5 URR5UlURsSSS5 $!,(df   g=f)Nz}Can't reposition in the ZIP file while there is an open writing handle on it. Close the writing handle before trying to read.)r�r�r�r�rtr�r�)rEr��whences   rrt�_SharedFile.seek.s^��
�Z�Z��}�}��� �"J�K�K�
�J�J�O�O�F�+��
�
���)�D�I��9�9��Z�Z�s�A&A=�=
Bc�R�UR UR5(a[S5eURR	UR
5 URR
U5nURR5UlUsSSS5 $!,(df   g=f)N�yCan't read from the ZIP file while there is an open writing handle on it. Close the writing handle before trying to read.)r�r�r�r�rtr�rmr��rE�nrSs   rrm�_SharedFile.read8sp��
�Z�Z��}�}��� �"J�K�K�
�J�J�O�O�D�I�I�&��:�:�?�?�1�%�D��
�
���)�D�I���Z�Z�s�BB�
B&c�h�URb%URnSUlURU5 ggr;)r�r�)rE�fileobjs  rr��_SharedFile.closeCs-���:�:�!��j�j�G��D�J��K�K�� �"r)r�r�r�r�r�r�N)r����)
rrrrrFr�rtrmr�rrrrr�r�"s��&���	�!rr�c�2�\rSrSrSrSrSrSrSrSr	g)	�	_TellableiJc��XlSUlg�Nr�rjr��rErjs  rrF�_Tellable.__init__Ks������rc�f�URRU5nU=RU-
slU$r;)rj�writer�)rErSr�s   rr��_Tellable.writeOs'���G�G�M�M�$������q����rc��UR$r;)r�r�s rr��_Tellable.tellTs���{�{�rc�8�URR5 gr;)rjrdr�s rrd�_Tellable.flushW������
�
�rc�8�URR5 gr;)rjr�r�s rr��_Tellable.closeZr�rr�N)
rrrrrFr�r�rdr�rrrrr�r�Js����
��rr�c�^�\rSrSrSrSrSrSrSSjrSr	Sr
SS	jrSS
jrSr
SSjrS
rSrSrSrU4SjrSr\R,4SjrSrSrU=r$)�
ZipExtFilei^zOFile-like object for reading an archive member.
Is returned by ZipFile.open().
i@iic��XlX@lXPlURUlUR
UlURUl[UR5Ul
SUlSUlSUl
SUlX lUR Ul[%US5(a"UR&Ul[+S5UlOSUlSUlUR15(a`UR35UlUR
UlURUlUR,UlUR(UlSUlSUl U(akURB[D-(aURFS-	S-nOUR&S-	S-nURI5nXv:wa[KS	URL-5egg![>a N�f=f)
NFrrr�Trr6r<zBad password for file %r)'�_fileobj�_pwd�_close_fileobjr��_compress_typer��_compress_leftr��_leftr��
_decompressor�_eof�_readbuffer�_offset�newlines�moderq�nameror��
_expected_crcr9�_running_crc�	_seekabler�r��_orig_compress_start�_orig_compress_size�_orig_file_size�_orig_start_crc�	_orig_crc�AttributeError�
_decrypterr�r�r��_init_decrypterr�r�)rEr�r��zipinforK�
close_fileobj�
check_byte�hs        rrF�ZipExtFile.__init__ls����
��	�+��%�3�3���%�3�3����&�&��
�.�t�/B�/B�C�����	���������
��	��$�$��	��7�E�"�"�!(���D�� %�c�
�D��!%�D�����		����!�!�,3�L�L�N��)�+2�+@�+@��(�'.�'8�'8��$�'+�'8�'8��$�!%�!3�!3���!%�������� � �#<�<�%�/�/�1�4��<�
�&�k�k�R�/�4�7�
��$�$�&�A���"�#=��@U�@U�#U�V�V����	�	��	�s�A5G�
G�Gc��[UR5UlURR	S5nU=R
S-slURU5S$)Nrr.)rMr�r�r�rmr�)rEr�s  rr��ZipExtFile._init_decrypter�sM��'��	�	�2������#�#�B�'�����r�!�����v�&�r�*�*rc���SURR<SURR<3/nUR(dpUR	SUR
<35 UR[:wa<UR	S[RURUR5-5 OUR	S5 UR	S5 SRU5$)Nr��.z name=r��	 [closed]r�r�)rArr�closedr�r�r�rr�r�r_�rErrs  rr��ZipExtFile.__repr__�s���"�n�n�7�7�"�n�n�9�9�;�<���{�{��M�M��	�	�3�4��"�"�j�0��
�
�1�.�2�2�4�3F�3F�37�3F�3F�H�H�I��
�M�M�+�&��
�
�c���w�w�v��rc���US:aPURRSUR5S-nUS:�a!URURUnX lU$[RRX5$)zbRead and return a line from the stream.

If limit is specified, at most limit bytes will be read.
r�
r%)r�r�r��io�BufferedIOBase�readline)rE�limit�i�lines    rr��ZipExtFile.readline�sj���1�9�� � �%�%�e�T�\�\�:�Q�>�A��1�u��'�'����a�8�� ����� � �)�)�$�6�6rc�z�U[UR5UR-
:�apURU5n[U5UR:�a(X RURS-UlSUlOU=R[U5-slURURURS-$)z6Returns buffered bytes without advancing the position.Nri)rvr�r�rm)rEr��chunks   r�peek�ZipExtFile.peek�s����s�4�#�#�$�t�|�|�3�3��I�I�a�L�E��5�z�D�L�L�(�#(�+;�+;�D�L�L�M�+J�#J�� � �������E�
�*��������d�l�l�S�.@�A�Arc�<�UR(a[S5eg)N�I/O operation on closed file.T)r�r�r�s r�readable�ZipExtFile.readable�s���;�;��<�=�=�rc�"�UR(a[S5eUbUS:ajURURSnSUlSUlUR(d0X RUR5-
nUR(dM0U$XR-nU[UR5:a!URURUnX0lU$U[UR5-
nURURSnSUlSUlUS:�arUR(daURU5nU[U5:aX@lXlX$SU-
nU$X$-
nU[U5-nUS:�aUR(dMaU$)z~Read and return up to n bytes.
If the argument is omitted, None, or negative, data is read and returned until EOF is reached.
zread from closed file.Nrr)r�r�r�r�r��_read1�MAX_Nrv)rEr��buf�endrSs     rrm�ZipExtFile.read�sa���;�;��5�6�6��9��A���"�"�4�<�<�=�1�C�"�D���D�L��i�i��{�{�4�:�:�.�.���i�i�i��J��,�,�����T�%�%�&�&��"�"�4�<�<��4�C��L��J��#�d�&�&�'�'�����t�|�|�}�-���������!�e�D�I�I��;�;�q�>�D��3�t�9�}�#'� � ���B�Q�x�����
�
�K�C�
��T��N�A��!�e�D�I�I�I��
rc���URcg[XR5UlUR(a3URUR:wa[	SUR
-5egg)NzBad CRC-32 for file %r)r�r9r�r�rr�)rE�newdatas  r�_update_crc�ZipExtFile._update_crc�s[�����%��!�'�+<�+<�=����9�9��*�*�d�.@�.@�@��5��	�	�A�B�B�A�9rc���UbUS:avURURSnSUlSUlUR(d<URUR5nU(aX#-
nU$UR(dM<U$XR-nU[UR5:a!URURUnX@lU$U[UR5-
nURURSnSUlSUlUS:�ahUR(dWURU5nU[U5:aX0lXlX#SU-
nU$U(aX#-
nU$UR(dMWU$)z7Read up to n bytes with at most one read() system call.Nrr)r�r�r�r�r�rv)rEr�rrSrs     r�read1�ZipExtFile.read1sX��
�9��A���"�"�4�<�<�=�1�C�"�D���D�L��i�i��{�{�4�:�:�.����K�C���J��i�i�i�
�J��,�,�����T�%�%�&�&��"�"�4�<�<��4�C��L��J��#�d�&�&�'�'�����t�|�|�}�-���������q�5��i�i��{�{�1�~���s�4�y�=�'+�$�#$�L����8�O�C���
���K�C���
��i�i�i��
rc�*�UR(dUS::agUR[:XaEURRnU[U5:�aX R
U[U5-
5-
nOUR
U5nUR[:XaURS:*UlGOUR[:Xa�[XR5nURRX!5nURR=(d1 URS:*=(a URR(+UlUR(aX RR5-
nOLURRU5nURR=(d URS:*UlUSURnU=R[U5-slURS::aSUlURU5 U$)NrrT)r�r�rr��unconsumed_tailrv�_read2rr�r��
MIN_READ_SIZErorlrdr�rr�s   rr��ZipExtFile._read1-s����9�9��Q������,�.��%�%�5�5�D��3�t�9�}����A��D�	�M�2�2����;�;�q�>�D����*�,��+�+�q�0�D�I�
�
 �
 �L�
0��A�)�)�*�A��%�%�0�0��9�D��+�+�/�/�@��,�,��1�@�!�/�/�?�?�?�
�I��y�y��*�*�0�0�2�2����%�%�0�0��6�D��*�*�.�.�J�$�2E�2E��2J�D�I��K�T�Z�Z� ���
�
�c�$�i��
��:�:��?��D�I�������rc�D�URS::ag[XR5n[XR5nURRU5nU=R[
U5-slU(d[eURbURU5nU$)Nrr)	r�r�r
�minr�rmrv�EOFErrorr�r�s   rr�ZipExtFile._read2Qs������!�#����%�%�&����&�&�'���}�}�!�!�!�$�����s�4�y�(����N��?�?�&��?�?�4�(�D��rc�>�UR(aURR5 [TU]	5 g![TU]	5 f=fr;)r�r�r�r<)rErAs �rr��ZipExtFile.closeas4���	��"�"��
�
�#�#�%��G�M�O��E�G�M�O�s	�+=�A
c�R�UR(a[S5eUR$�Nr�)r�r�r�r�s rr��ZipExtFile.seekablehs���;�;��<�=�=��~�~�rc�t�UR(a[S5eUR(d[R"S5eUR5nU[R:XaUnOHU[R:XaX1-nO/U[R:XaURU-nO[S5eX@R:�aURnUS:aSnXC-
nXPR-nUS:�a#U[UR5:a
X`lSnGO`UR[:Xa�UR c�US:�a|SUlU[UR5UR-
-nUR$R'U[R5 U=R(U-slSnSUl
SUlO�US:a�UR$R'UR*5 UR,UlUR0UlUR2UlURUlSUl
SUl[7UR5UlSUlUnUR bUR=5 US:�a3[?UR@U5nURCU5 XW-nUS:�aM3UR5$)Nzseek on closed file.�!underlying stream is not seekablezCwhence must be os.SEEK_SET (0), os.SEEK_CUR (1), or os.SEEK_END (2)rrF)"r�r�r�r��UnsupportedOperationr�r��SEEK_SET�SEEK_CUR�SEEK_ENDr�r�rvr�r�rr�r�r�rtr�r�r�r�r�r�r�r�r�r�r�r�
MAX_SEEK_READrm)rEr�r��curr_pos�new_pos�read_offset�buff_offset�read_lens        rrt�ZipExtFile.seekmsF���;�;��3�4�4��~�~��)�)�*M�N�N��9�9�;���R�[�[� ��G�
�r�{�{�
"��'�G�
�r�{�{�
"��*�*�V�3�G��C�D�
D��)�)�)��*�*�G��Q�;��G��(��!�L�L�0���!���c�$�2B�2B�.C� C�&�L��K�
�
 �
 �J�
.�4�?�?�3J�{�]^��!%�D���3�t�/�/�0�4�<�<�?�?�K��M�M���{�B�K�K�8��J�J�+�%�J��K�"�D���D�L�
�1�_��M�M���t�8�8�9� $� 4� 4�D��!%���D��"&�":�":�D���-�-�D�J�"�D���D�L�!2�4�3F�3F�!G�D���D�I�!�K����*��$�$�&��A�o��4�-�-�{�;�H��I�I�h���#�K��A�o�
�y�y�{�rc��UR(a[S5eUR(d[R"S5eUR
UR-
[UR5-
UR-nU$)Nztell on closed file.r)
r�r�r�r�rr�r�rvr�r�)rE�fileposs  rr��ZipExtFile.tell�s`���;�;��3�4�4��~�~��)�)�*M�N�N��&�&����3�c�$�:J�:J�6K�K�d�l�l�Z���r)r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�)NFr��r%)rrrrrr�r
rrFr�r�r�r�r�rmrrr�rr�r�r�rrtr�rrdres@rr�r�^s�����

�E��M��M�37�$�1W�h	+��7� B��
!�FC�#�J"�H� ��
#%�+�+�=�~�rr�c�j^�\rSrSrSr\S5r\S5r\S5rSr	Sr
U4SjrS	rU=r
$)
�
_ZipWriteFilei�c��X lX0lXl[URUR
5UlSUlSUlSUl	gr�)
�_zinfo�_zip64�_zipfiler�r�r��_compressor�
_file_size�_compress_size�_crc)rE�zfr$r�s    rrF�_ZipWriteFile.__init__�sF�������
�*�5�+>�+>�+0�+?�+?�A�����������	rc�.�URR$r;)r.rjr�s rr��_ZipWriteFile._fileobj�s���}�}���rc�.�URR$r;)r,rqr�s rr��_ZipWriteFile.name�s���{�{�#�#�#rc��g)N�wbrr�s rr��_ZipWriteFile.mode�s��rc��g)NTrr�s r�writable�_ZipWriteFile.writable�s��rc���UR(a[S5e[U[[45(a[U5nO[
U5nURnU=RU-
sl[XR5Ul
UR(a9URRU5nU=R[U5-
sl
URRU5 U$r)r�r�rrErDrvrR�nbytesr0r9r2r/r`r1r�r�)rErSr@s   rr��_ZipWriteFile.write�s����;�;��<�=�=��d�U�I�.�/�/���Y�F��d�#�D��[�[�F����6�!���$�	�	�*��	�����#�#�,�,�T�2�D����3�t�9�,���
�
���D�!��
rc	��>�UR(ag[TU]	5 UR(aoURR	5nU=R
[
U5-
slURRU5 UR
URl
OURURl
URURl
URURlUR(d>UR[ :�a[#S5eUR
[ :�a[#S5eURR$[&-(a�UR(aSOSnURR[(R*"U[,URRURRURR55 URR/5UR0lO�URR/5UR0lURR5URR65 URRURR9UR55 URR5UR0R25 UR0R:R=UR5 URUR0R>URR@'SUR0l!g!SUR0l!f=f)Nz*File size too large, try using force_zip64z0Compressed size too large, try using force_zip64z<LLQQz<LLLLF)"r�r<r�r/rdr1rvr�r�r,r�r0r2r�r�r-r�r�r�r�rKr��
_DD_SIGNATUREr�r.�	start_dirrtr�r��filelistr��
NameToInforqr�)rErr�rAs   �rr��_ZipWriteFile.close�s+����;�;��(	+��G�M�O�����&�&�,�,�.���#�#�s�3�x�/�#��
�
�#�#�C�(�,0�,?�,?����)�,0�O�O����)�"�i�i�D�K�K�O�$(�O�O�D�K�K�!��;�;��?�?�[�0�&�'S�T�T��&�&��4�&�'Y�Z�Z��{�{�$�$�'@�@�!%���g�'���
�
�#�#�F�K�K��]�D�K�K�O�O��K�K�-�-�t�{�{�/D�/D�%F�G�*.�-�-�*<�*<�*>��
�
�'�+/�-�-�*<�*<�*>��
�
�'��
�
�"�"�4�;�;�#<�#<�=��
�
�#�#�D�K�K�$:�$:�4�;�;�$G�H��
�
�"�"�4�=�=�#:�#:�;�
�M�M�"�"�)�)�$�+�+�6�=A�[�[�D�M�M�$�$�T�[�[�%9�%9�:�%*�D�M�M�"��U�D�M�M�"�s�L-M�M')r1r/r2r0r,r-r.)rrrrrFr,r�r�r�r=r�r�rrdres@rr*r*�sX����� �� ��$��$�������&++�++rr*c�B�\rSrSrSrSrSrS\SS4SSS.SjjrSr	S	r
S
rSrSr
S
rS&SjrSrSrSr\S5r\R*S5rS&SjrS'SS.SjjrS(SjrS)SjrS*Sjr\S5rSrSrS*SjrS)Sjr S+S jr!S!r"S"r#S#r$S$r%S%r&g),ria$Class with methods to open, read, write, close, list zip files.

z = ZipFile(file, mode="r", compression=ZIP_STORED, allowZip64=True,
            compresslevel=None)

file: Either the path to the file, or a file-like object.
      If it is a path, the file will be opened and closed by ZipFile.
mode: The mode can be either read 'r', write 'w', exclusive create 'x',
      or append 'a'.
compression: ZIP_STORED (no compression), ZIP_DEFLATED (requires zlib),
             ZIP_BZIP2 (requires bz2) or ZIP_LZMA (requires lzma).
allowZip64: if True ZipFile will create files with ZIP64 extensions when
            needed, otherwise it will raise an exception when this would
            be necessary.
compresslevel: None (default for the given compression type) or an integer
               specifying the level to pass to the compressor.
               When using ZIP_STORED or ZIP_LZMA this keyword has no effect.
               When using ZIP_DEFLATED integers 0 through 9 are accepted.
               When using ZIP_BZIP2 integers 1 through 9 are accepted.

N�rT)r�metadata_encodingc�
�US;a[S5e[U5 X@lSUlSUl0Ul/UlX0lXPlX l	SUl
SUlX`lXpl
UR(aUS:wa[S5e[U[R 5(a[R""U5n[U[$5(a9SUlXlS	S
SSS
S
SS.nX�n	[*R,"X5UlOSUlXl[3USS5UlSUl[6R8"5UlSUlSUlUS:XaURA5 gUS;aNSUlUR.RC5Ul"UR.RGURD5 gUS:Xa7URA5 UR.RGURD5 g[S5e![0a X�;aX�n	GM7ef=f![H[04a
 SUlgf=f![H[04a+ [KUR.5UlSUl"SUlgf=f![LaE UR.RGSS5 SUlUR.RC5Ul"gf=f! UR.n
SUlUROU
5 e=f)zUOpen the ZIP file with mode read 'r', write 'w', exclusive create 'x',
or append 'a'.)rI�w�x�az+ZipFile requires mode 'r', 'w', 'x', or 'a'FrNrrIz5metadata_encoding is only supported for reading filesrn�w+b�x+b�r+br:�xb)rIrLrMrNrQrOrPTr%r�)rLrMrNr&z"Mode must be 'r', 'w', 'x', or 'a')(r�r��_allowZip64�
_didModify�debugrFrEr�r�r�rK�_comment�_strict_timestampsrJrr�rr�str�_filePassedrqr�rprjrh�getattr�_fileRefCnt�	threading�RLockr�r�r��_RealGetContentsr�rDrtr�r�r�_fpclose)rEr�r�r��
allowZip64r�rrJ�modeDictr�rjs           rrF�ZipFile.__init__+s����+�+��J�K�K��;�'�%�������
������
�&��*���	������
�"3��!2���!�!�d�c�k��G�I�
I��d�B�K�K�(�(��9�9�T�?�D��d�C� � � �D�� �M�"��U�%�$�T�$�@�H��~�H��� �g�g�d�5�D�G�� �D���G�#�D�&�$�7�D�M�����_�_�&��
������
�'	��s�{��%�%�'���#�#'���/�%)�W�W�\�\�^�D�N�/������T�^�^�4����4��)�)�+��G�G�L�L����0�!�!E�F�F��c���+�#+�#5�� ��	��@+�G�4�/�).���/��'��0�+�'����0�D�G�%&�D�N�%*�D�N�+�� "�4��G�G�L�L��A�&�'+�D�O�%)�W�W�\�\�^�D�N�4��	����B��D�G��M�M�"���s��4H�K�6
K�I�$%H.�
K�5J	�K�H+�)H+�.I�K�I�K�8J�K�J�K�	AK�K�K�K�'Lc��U$r;rr�s r�	__enter__�ZipFile.__enter__�s���rc�$�UR5 gr;�r�)rE�typer��	tracebacks    r�__exit__�ZipFile.__exit__�s���
�
�rc���SURR<SURR<3/nURbzUR(aURSUR-5 O+URbURSUR-5 URSUR-5 OURS5 URS5 SRU5$)	Nr�r�z file=%rz filename=%rz mode=%rr�r�r�)	rArrrjrYr�rqr�r_r�s  rr��ZipFile.__repr__�s���"�n�n�7�7�"�n�n�9�9�;�<���7�7������
�
�j�4�7�7�2�3����*��
�
�n�t�}�}�<�=��M�M�*�t�y�y�0�1��M�M�+�&��
�
�c���w�w�v��rc�8�URn[U5nU(d[S5eURS:�a[U5 U[nU[nU[Ul	U[U-
U-
nU[[:XaU[[--nURS:�aXT-n[SXFU5 XE-UlURS:a[S5eUR!URS5 UR#U5n[$R&"U5nSnX�:Ga�UR#[(5n	[+U	5[(:wa[S5e[,R."[0U	5n	U	[2[4:wa[S5eURS:�a[U	5 UR#U	[65n
[9U
5nU	[:nU[<-(aU
R?S	5n
O$U
R?UR@=(d S
5n
[CU
5n
UR#U	[D5U
l#UR#U	[H5U
l%U	[LU
l'U	SSuU
l(U
l)U
l*U
l+U
l,U
l-p�U
l.U
l/U
l0U
RT[b:�aSU
RTS
--5eU	SSuU
l3U
l4U
l5X�l6US-	S-US-	S-US-US-	US-	S-US-S-4U
l7U
RqU5 U
RNU-U
l'URrRuU
5 X�RvU
Rx'U[(-U	[6-U	[D-U	[H-nURS:�a[SU5 X�:aGM�URn[{URrSSS9HnUUl>URNnM g![a [S5ef=f)z/Read in the table of contents for the ZIP file.zFile is not a zip filer%r&zgiven, inferred, offsetrz Bad offset for central directoryzTruncated central directoryz&Bad magic number for central directoryr��cp437rzzip file version %.1fr-r0r3r,r�r)rr.r$�totalc��UR$r;)r�)r$s r�<lambda>�*ZipFile._RealGetContents.<locals>.<lambda>�s
��e�.A�.ArT)�key�reverseN)?rjrgrhrrU�printr�r��_ECD_COMMENTrV�
_ECD_LOCATIONr|r{ryrurDrtrmr��BytesIO�sizeCentralDirrvrKrJ�structCentralDir�
_CD_SIGNATURE�stringCentralDir�_CD_FILENAME_LENGTHr9�
_CD_FLAG_BITSr�r�rJr�_CD_EXTRA_FIELD_LENGTHrU�_CD_COMMENT_LENGTHr��_CD_LOCAL_HEADER_OFFSETr�r�r�r�r�r�r�r�r�r��MAX_EXTRACT_VERSIONr�r�r�r�r�r�rrEr�rFrq�sortedr�)rErjr��size_cd�	offset_cd�concat�inferredrSrp�centdirrq�orig_filename_crc�flagsrM�t�d�
end_offsetr$s                  rr^�ZipFile._RealGetContents�s���
�W�W��	7� ��_�F���5�6�6��:�:��>��&�M���#���;�'�	��|�,��
��
�&��0�9�<���.�!�%7�7��'�*A�A�B�F��:�:��>��)�H��+�Y�&�I�"�+����>�>�A���?�@�@�
�������"��w�w�w���
�Z�Z��
�����o��g�g�n�-�G��7�|�~�-� �!>�?�?��m�m�$4�g�>�G��}�%�)9�9� �!I�J�J��z�z�A�~��g���w�w�w�':�;�<�H� %�h����M�*�E��)�)�#�?�?�7�3��$�?�?�4�+A�+A�+L�W�M����!�A��g�g�g�&<�=�>�A�G�����(:� ;�<�A�I�%�&=�>�A�O�5<�A�b�M�
2�Q�
�q���0A�1�:�
�[�!�/�1�
�U�A�O�Q�[�� � �#6�6�)�*A�+,�+<�+<�r�+A�+C�D�D�9@��B��6�A�H�a�o�q���K���T�4�K�!�Q�$���Q�t�V��r�E�A�q�D�$�;��4��1��?�A�K�
�N�N�,�-��o�o��6�A�O��M�M� � ��#�*+�O�O�A�J�J�'��^�+�g�6I�.J�J��5�6�7��1�2�3�E��z�z�A�~��g�u�%�[�o�^�^�^�
��D�M�M� A�$(�*�E�!+�E���,�,�J�	*��W�	7��5�6�6�	7�s�P�Pc�X�URVs/sHoRPM sn$s snf)z+Return a list of file names in the archive.)rErqras  r�namelist�ZipFile.namelist�s ��*.�-�-�8�-�$�
�
�-�8�8��8s�'c��UR$)zBReturn a list of class ZipInfo instances for files in the
archive.)rEr�s r�infolist�ZipFile.infolist�����}�}�rc��[SS-US9 URH8nSURSS-n[SURX2R4-US9 M: g)z+Print a table of contents for the zip file.z%-46s %19s %12s)z	File NamezModified    �Size�r�z%d-%02d-%02d %02d:%02d:%02dNr*z
%-46s %s %12d)rvrEr�rqr�)rEr�r$�dates    r�printdir�ZipFile.printdir�sX��
��"G�G��	��]�]�E�0�5�?�?�2�A�3F�F�D��/�U�^�^�T�?�?�$K�K��
�#rc�8�SnURHXnURURS5nURU5(aURU5(aMSSS5 MZ g!,(df   Ml=f![a URss $f=f)z�Read all the files and check the CRC.

Return None if all files could be read successfully, or the name
of the offending file otherwise.irIN)rErprqrmr)rE�
chunk_sizer$�fs    r�testzip�ZipFile.testzips���
�
��]�]�E�
&��Y�Y�u�~�~�s�3�q��&�&��,�,���&�&��,�,�4�3�	#�4�3���
&��~�~�%�
&�s.�A>�.A,�A>�,
A;	�6A>�;A>�>B�Bc�^�URRU5nUc[SU-5eU$)z,Return the instance of ZipInfo given 'name'.z(There is no item named %r in the archive)rFr��KeyError)rEr��infos   r�getinfo�ZipFile.getinfos9�����"�"�4�(���<��:�T�A�C�
C��rc��U(a6[U[5(d![S[U5R-5eU(aXlgSUlg)z)Set default password for encrypted files.�pwd: expected bytes, got %sN)rrE�	TypeErrorrhrrK)rErKs  r�setpassword�ZipFile.setpassword s;���z�#�u�-�-��9�D��I�<N�<N�N�O�O���H��D�Hrc��UR$)z.The comment text associated with the ZIP file.)rVr�s rr��ZipFile.comment)r�rc��[U[5(d![S[U5R-5e[U5[:�a$SSKnURS[-SS9 US[nXl	SUl
g)Nzcomment: expected bytes, got %srz3Archive comment is too long; truncating to %d bytesr&r�T)rrEr�rhrrvr�rrrVrT)rEr�rs   rr�r�.sq���'�5�)�)��=��W�
�@V�@V�V�W�W��w�<�/�)���M�M�O�+�,�89�
�
;��.��/�G��
���rc�~�URUSU5nUR5sSSS5 $!,(df   g=f)zMReturn file bytes for name. 'pwd' is the password to decrypt
encrypted files.rIN)rprm)rEr�rKrjs    rrm�ZipFile.read;s+���Y�Y�t�S�#�
&�"��7�7�9�'�
&�
&�s�.�
<F��force_zip64c�
^�US;a[S5eU(aUS:Xa[S5eTR(d[S5e[U[5(aUnOEUS:Xa.[U5nTRUlTRUlOTRU5nUS:XaTRXTS9$TR(a[S5eT=RS-
sl[TRURTRTRU4S	j5nUR!["5n[%U5[":wa['S
5e[(R*"[,U5nU[.[0:wa['S5eUR!U[25nU[4(aUR7U[4SS9 UR8[:-(a[=S
5eUR8[>-(a[=S5eU[@[B-(aURES5n	O$URETRF=(d S5n	X�RH:wa['SURH<SU<S35eURJbEURM5URN-URJ:�a['SURH<S35eUR8[P-n
U
(afU(dTRRnU(a6[U[T5(d![WS[YU5RZ-5eU(d[]SU-5eOSn[_XbS-XSS5$! URa5 e=f)a%Return file-like object for 'name'.

name is a string for the file name within the ZIP file, or a ZipInfo
object.

mode should be 'r' to read a file already in the ZIP file, or 'w' to
write to a file newly added to the archive.

pwd is the password to decrypt files (only used for reading).

When writing, if the file size is not known in advance but may exceed
2 GiB, pass force_zip64 to use the ZIP64 format, which can handle large
files.  If the size is known in advance, it is best to pass a ZipInfo
instance for name, with zinfo.file_size set.
>rIrLzopen() requires mode "r" or "w"rLz'pwd is only supported for reading filesz2Attempt to use ZIP archive that was already closedr�r�r%c�>�TR$r;)r�r�s�rrr�ZipFile.open.<locals>.<lambda>ps	���$�-�-rzTruncated file headerz Bad magic number for file header)r�z$compressed patched data (flag bit 5)zstrong encryption (flag bit 6)r�rozFile name in directory z and header z differ.NzOverlapped entries: z (possible zip bomb)r�z6File %r is encrypted, password required for extraction�bT)1r�rjrrr�r�r�r�r��_open_to_writer�r[r�r�r_r�rm�sizeFileHeaderrvrrKrJr��
_FH_SIGNATUREr��_FH_FILENAME_LENGTH�_FH_EXTRA_FIELD_LENGTHrtr��_MASK_COMPRESSED_PATCHr��_MASK_STRONG_ENCRYPTION�_FH_GENERAL_PURPOSE_FLAG_BITSr�r�rJr�r�r�r��_MASK_ENCRYPTEDrKrEr�rhrr�r�r�)rEr�r�rKr�r$�zef_file�fheader�fname�	fname_str�is_encrypteds`          rrp�ZipFile.openAs��� �z�!��>�?�?��D�C�K��F�G�G��w�w��D�F�
F��d�G�$�$��E�
�S�[��D�M�E�"&�"2�"2�E��#'�#5�#5�E� ��L�L��&�E��3�;��&�&�u�&�F�F��=�=��F�G�
G�
	
���A����t�w�w��(;�(;�#�}�}�d�j�j�:O�Q��4	��m�m�N�3�G��7�|�~�-� �!8�9�9��m�m�$4�g�>�G��}�%�)9�9� �!C�D�D��M�M�'�*=�">�?�E��-�.��
�
�g�&<�=�a�
�H����!7�7�)�*P�Q�Q����!8�8�)�*J�K�K��4�5�8J�J�!�L�L��1�	�!�L�L��)?�)?�)J�7�K�	��/�/�/� ��*�*�E�3�4�4��!�!�-��
�
��%�"5�"5�5��8I�8I�I� �#7��8K�8K�7N�Nb�!c�d�d�!�?�?�_�<�L����(�(�C��z�#�u�5�5�#�$A�D��I�DV�DV�$V�W�W��&�(A�CG�(H�I�I�����h�s�
�E��E�E��	��N�N���s
�&IM/�/Nc�`�U(aUR(d[S5eUR(a[S5eSUlSUlSUlUR[:XaU=R
[-slUR(dU=R
[-slUR(dSUlU=(d URS-[:�nUR(dU(a[S5eUR(a%URR!UR"5 URR%5UlUR)U5 SUlURR-UR/U55 SUl[1XU5$)NzHforce_zip64 is True, but allowZip64 was False when opening the ZIP file.zzCan't write to the ZIP file while there is another write handle open on it. Close the first handle before opening another.r��g�������?z'Filesize would require ZIP64 extensionsT)rSr�r�r�r�r�r�r	�_MASK_COMPRESS_OPTION_1r�r�r�r�r�rrjrtrDr�r��_writecheckrTr�r�r*)rEr$r�r�s    rr��ZipFile._open_to_write�s;���t�/�/�� ��
��=�=��N�O�
O�
 �����	�������(�*��O�O�6�6�O��~�~��O�O�8�8�O��"�"�"-�E���E����$� 6�� D�����E��H�I�I��>�>��G�G�L�L����(�"�g�g�l�l�n��������������
�
�e�&�&�u�-�.���
��T�%�0�0rc��Uc[R"5nO[R"U5nURXU5$)a8Extract a member from the archive to the current working directory,
using its full name. Its file information is extracted as accurately
as possible. `member' may be a filename or a ZipInfo object. You can
specify a different directory using `path'. You can specify the
password to decrypt the file using 'pwd'.
)r��getcwdr�_extract_member)rE�memberrrKs    r�extract�ZipFile.extract�s4���<��9�9�;�D��9�9�T�?�D��#�#�F�#�6�6rc��UcUR5nUc[R"5nO[R"U5nUHnUR	XAU5 M g)aExtract all members from the archive to the current working
directory. `path' specifies a different directory to extract to.
`members' is optional and must be a subset of the list returned
by namelist(). You can specify the password to decrypt all files
using 'pwd'.
N)r�r�r�rr�)rEr�membersrKr�s     r�
extractall�ZipFile.extractall�sK���?��m�m�o�G��<��9�9�;�D��9�9�T�?�D��G�� � ���4�rc��URnU(d*Sn[RUS[U5-5nX0lUR	U5nSURU55nUR
SU55nU$)z;Replace bad characters and remove trailing dots from parts.z:<>|"?*�_c3�B# �UHoRS5v� M g7f)z .N)�rstrip�rZrMs  rr]�1ZipFile._sanitize_windows_name.<locals>.<genexpr>�s���B�+A�a�8�8�D�>�>�+A�s�c3�6# �UHo(dMUv� M g7fr;rr�s  rr]r��s���7�'�Q�Q�q�q�'�s�
�	)�!_windows_illegal_name_trans_tablerX�	maketransrv�	translaterVr_)r>r!�pathsep�table�illegals     r�_sanitize_windows_name�ZipFile._sanitize_windows_name�sr���5�5����G��M�M�'�3��W��+=�>�E�49�1��#�#�E�*��B�7�=�=��+A�B���,�,�7�'�7�7���rc��^�[U[5(dURU5nURR	S[
RR5n[
RR(aBUR	[
RR[
RR5n[
RRU5SnS[
RR[
RR4m[
RRRU4SjUR[
RR555n[
RRS:Xa*URU[
RR5nU(d UR5(d[!S5e[
RRX$5n[
RR#U5n[
RR%U5nU(a9[
RR'U5(d[
R("USS9 UR5(a?[
RR+U5(d[
R,"U5 U$U$UR1XS	9n[1US
5n[2R4"Xg5 SSS5 SSS5 U$![.a) [
RR+U5(deU$f=f!,(df   NN=f!,(df   U$=f)zOExtract the ZipInfo object 'member' to a physical
file on the path targetpath.
r�r%r�c3�8># �UHnUT;dMUv� M g7fr;r)rZrM�invalid_path_partss  �rr]�*ZipFile._extract_member.<locals>.<genexpr>s$����#C�.H��&'�/A�&A�$%�1�.H�s�
�	�\zEmpty filename.T)�exist_ok)rKr:N)rrr�rqr�r�rr�r�r�curdir�pardirr_rVr�r�r�r�dirname�exists�makedirsr��mkdir�FileExistsErrorrp�shutil�copyfileobj)	rEr��
targetpathrKr!�	upperdirs�source�targetr�s	        @rr��ZipFile._extract_members?����&�'�*�*��\�\�&�)�F��/�/�)�)�#�r�w�w�{�{�;��
�7�7�>�>��o�o�b�g�g�n�n�b�g�g�k�k�B�G��'�'�$�$�W�-�a�0�� �"�'�'�.�.�"�'�'�.�.�A���'�'�+�+�"�"�#C�g�m�m�B�G�G�K�K�.H�#C�C��
�7�7�;�;�$���1�1�'�2�7�7�;�;�G�G��v�}�}����.�/�/��W�W�\�\�*�6�
��W�W�%�%�j�1�
��G�G�O�O�J�/�	��R�W�W�^�^�I�6�6��K�K�	�D�1��=�=�?�?��7�7�=�=��,�,���H�H�Z�(���:��
�Y�Y�v�Y�
'�6�
�*�d�
#�v����v�.�$�(����'���7�7�=�=��4�4��5�����$�
#��(�
'���s6�4L�
M�*M	�M�/M�M�	
M	�M�
M)c��URUR;a!SSKnURSUR-SS9 URS;a[S5eUR(d[S5e[UR5 UR(deSn[UR5[:�aS	nO-UR[:�aS
nOUR[:�aSnU(a[!US-5egg)
z6Check for errors before writing a file to the archive.rNzDuplicate name: %rr'r��rLrMrNz&write() requires mode 'w', 'x', or 'a'z4Attempt to write ZIP archive that was already closed�Files count�FilesizezZipfile size� would require ZIP64 extensions)rqrFrrr�r�rjr�r�rSrvrE�ZIP_FILECOUNT_LIMITr�r�r�r)rEr$r�requires_zip64s    rr��ZipFile._writecheck1s����>�>�T�_�_�,���M�M�.����?�A�M�N��9�9�O�+��E�F�F��w�w��F�H�
H��5�.�.�/����!�N��4�=�=�!�%8�8�!.�����;�.�!+���$�$�{�2�!/���"�>�#D�$E�F�F�� rc�V�UR(d[S5eUR(a[S5e[R	XUR
S9nUR
5(a SUlSUlURU5 gUbX5l
OURUl
UbXElOURUl[US5o`RUS5n[R "XgS5 SSS5 SSS5 g!,(df   N=f!,(df   g=f)	zDPut the bytes from filename into the archive under the name
arcname.�7Attempt to write to ZIP archive that was already closedz>Can't write to ZIP archive while an open writing handle existsr
rNrnrLi )rjr�r�rr%rWr�r�r�r�r�r�r�r�rpr�r�)rErqr!r�r�r$�src�dests        rr��
ZipFile.writeHs����w�w��I�K�
K��=�=��P��
��!�!�(�48�4K�4K�"�M���<�<�>�>�"#�E���E�I��J�J�u���(�&3�#�&*�&6�&6��#��(�'4�$�'+�'9�'9��$��h��%��i�i��s�.C�t��"�"�3�f�5�/D�%�%�.C�.C��%�%�s$�D� D	�8D�	
D	�D�
D(c�*�[U[5(aURS5n[U[5(d�[U[R
"[R"55SSS9nURUlURUl	URRS5(aSUlU=RS-slO
SUlOUnUR(d[S	5eUR(a[S
5eUbX5lUbXEl	[!U5UlUR$ UR'USS9nUR)U5 SSS5 SSS5 g!,(df   N=f!,(df   g=f)
z�Write a file into the archive.  The contents is 'data', which
may be either a 'str' or a 'bytes' instance; if it is a 'str',
it is encoded as UTF-8 first.
'zinfo_or_arcname' is either a ZipInfo instance or
the name of the file in the archive.r�Nr*)rqr�r�i�Ar1r�rz?Can't write to ZIP archive while an open writing handle exists.rL)r�)rrXr�rrrr�r�r�r�rqr(r�rjr�r�rvr�r�rpr�)rE�zinfo_or_arcnamerSr�r�r$rs       r�writestr�ZipFile.writestris@���d�C� � ��;�;�w�'�D��*�G�4�4��%5�&*�n�n�T�Y�Y�[�&A�"�1�&E�G�E�"&�"2�"2�E��#'�#5�#5�E� ��~�~�&�&�s�+�+�&3��#��#�#�t�+�#�&1��#�$�E��w�w��I�K�
K��=�=��Q��
��$�"/���$�#0� ��d�)���
�Z�Z����5�s��+�t��
�
�4� �,��Z�+�+���Z�s$�?F�E3�"F�3
F	�=F�
Fc���[U[5(a#UnUR5(d[S5eO�[U[5(acUnURS5(dUS-
n[U5nSUlSUlSU-S-S-UlSUl	U=RS-slO[S5eUR UR(a%URRUR5 URR!5UlUR$[&:XaU=R([*-slUR-U5 SUlUR0R3U5 X0R4UR6'URR9UR;S	55 URR!5UlS
S
S
5 g
!,(df   g
=f)z+Creates a directory inside the zip archive.z/The given ZipInfo does not describe a directoryr�ri@rr1zExpected type str or ZipInfoTFN)rrr�r�rXr(r�r�r�r�r�r�r�rjrtrDr�r�r�r	r�r�r�rTrEr�rFrqr�r�)rE�zinfo_or_directory_namer�r$�directory_names     rr��
ZipFile.mkdir�sp���-�w�7�7�+�E��<�<�>�>� �!R�S�S�"�
�/��
5�
5�4�N�!�*�*�3�/�/��#�%���N�+�E�"#�E���E�I�$+�d�N�f�#<��"C�E���E�O����4�'���:�;�;�
�Z�Z��~�~������T�^�^�,�"&�'�'�,�,�.�E���"�"�h�.����#:�:�����U�#�"�D�O��M�M� � ��'�.3�O�O�E�N�N�+��G�G�M�M�%�*�*�5�1�2�!�W�W�\�\�^�D�N��Z�Z�s
�DG(�(
G6c�$�UR5 g)z2Call the "close()" method in case the user forgot.Nrgr�s r�__del__�ZipFile.__del__�s���
�
�rc��URcgUR(a[S5eURS;alUR(a[UR
 UR(a%URRUR5 UR5 SSS5 URnSUlURU5 g!,(df   N3=f!URnSUlURU5 f=f)zGClose the file, and for mode 'w', 'x' and 'a' write the ending
records.NzvCan't close the ZIP file while there is an open writing handle on it. Close the writing handle before closing the zip.r�)rjr�r�r�rTr�r�rtrD�_write_end_recordr_r�s  rr��
ZipFile.close�s����7�7�?���=�=��P�Q�
Q�		��y�y�O�+�����Z�Z��~�~������T�^�^�4��*�*�,� �
���B��D�G��M�M�"�� �Z��
���B��D�G��M�M�"��s$�-C�AC
� C�
C�C�&Dc�	�URGH�nURnUSS-
S-USS--US-nUSS-US	S--USS--n/nUR[:�dUR[:�a;URUR5 URUR5 S
nS
nOURnURnUR[:�aURUR5 S
nOURnURn	Sn
U(aS[RU	S5n	[R"SS
[U5--SS[U5-/UQ76U	-n	[n
UR[:Xa[!["U
5n
O$UR[$:Xa[![&U
5n
[!X�R(5n[!X�R*5nUR-5up�[R"[.[0UUR2X�R4X�RXCUR6Xv[U
5[U	5[UR85SUR:UR<U5nUR>RAU5 UR>RAU
5 UR>RAU	5 UR>RAUR85 GM� UR>RC5n[UR5nUURD-
nURDnSnU[F:�aSnOU[:�aSnOU[:�aSnU(a�URH(d[KUS-5e[R"[L[NSSSSSUUUU5nUR>RAU5 [R"[P[RSUS5nUR>RAU5 [UUS5n[UUS
5n[UUS
5n[R"[V[XSSUUUU[URZ55	nUR>RAU5 UR>RAURZ5 UR\S:XaUR>R_5 UR>Ra5 g)Nrr�r,r%r)r&r'r.r(r�r(r9�Qrr�zCentral directory offsetzCentral directory sizer��,r"rrN)1rEr�r�r�r�r�r�rUr7r`rKr�rvr�r�rr�r�r	r�r�r�r�r{r}r�r�r�r�r�r�rjr�r�rDr�rSrrzr{rwrxrr�r�rVr��truncaterd)rEr$r�r�r�rUr�r�r��
extra_datar�r�r�rqr�r��pos2�centDirCount�centDirSize�
centDirOffsetr��zip64endrec�zip64locrecr�s                        rr�ZipFile._write_end_record�s����]�]�E����B��!�u�t�|��)�B�q�E�Q�J�6��A��>�G���e�r�k�B�q�E�Q�J�.�"�Q�%�1�*�=�G��E�����,��%�%��3����U�_�_�-����U�0�0�1�&�	� *�
�!�O�O�	� %� 3� 3�
��"�"�[�0����U�0�0�1� *�
� %� 3� 3�
����J��K��#�\�\�*�d�;�
�#�[�[��C��E�
�N�*��q��U��|�-�&+�-�/9�:�
�,���"�"�i�/�!�-��=���$�$��0�!�,��<��!�+�/D�/D�E�O� ��.B�.B�C�N�"'�"<�"<�">��H��k�k�"2�"2�N�"'�"5�"5����"+�-@�-@�'�"'�)�)�]�"%�h�-��Z��#�e�m�m�BT�"#�U�%8�%8�%�:M�:M�"/�1�G�
�G�G�M�M�'�"��G�G�M�M�(�#��G�G�M�M�*�%��G�G�M�M�%�-�-�(�g#�j�w�w�|�|�~���4�=�=�)���T�^�^�+�����
����-�-�*�N�
�[�
(�7�N�
�;�
&�5�N���#�#�"�>�#D�$E�F�F� �+�+�"�$6��B��A�q�,���]�,�K�
�G�G�M�M�+�&� �+�+�)�)�1�d�A�7�K�
�G�G�M�M�+�&��|�V�4�L��k�:�6�K��
�z�:�M����-�/?���<��(�-��T�]�]�9K�M��	
���
�
�f�����
�
�d�m�m�$��9�9����G�G�������
�
�rc��URS:�deU=RS-slUR(d#UR(dUR5 ggg)Nrr%)r[rYr�r�s  rr_�ZipFile._fpclose-sI�����!�#�#�#����A�������(8�(8��H�H�J�)9�r)rFrSrVrTrYr[r�r�rWr�r�r�rUrErqrjrJr�rKrDr;)rIN)F)NN)NNN)i�)'rrrrrrjr�rrFrdrjr�r^r�r�r�r�r�r�r,r�r-rmrpr�r�r�rcr�r�r�r�rr�rr�rr_rrrrrrs
���,
�B�(,�%�"%�:�$�#�^�:>�RV�^�@���T-�l9��
�&� ������
�^�^�
��
��d�E�d�L(1�T7�5�$����/�bF�.'+�04�6�D48�'!�R!,�F��,\�|rrc�:�\rSrSrSrS\SS4SjrSSjrS	rS
r	g)r
i4zDClass to create ZIP archives with Python library files and packages.rITr�c�:�[RXX#US9 XPlg)N)r�r�r`)rrF�	_optimize)rEr�r�r�r`�optimizes      rrF�PyZipFile.__init__7s!������$�$.�	�	0�!�rNc��[R"U5nU(aZU"U5(dMUR(a;[RR	U5(aSOSn[U<SU<S35 g[RR
U5upV[RR	U5(Ga:[RRUS5n[RRU5(Ga�U(a
U<SU<3nOUnUR(a[SUS	U5 URUS
SU5up�UR(a[SU	5 URX�5 [[R"U55n
U
RS5 U
GH@n[RRX5n[RRU5up�[RR	U5(aV[RR[RRUS55(aURX�US
9 M�M�US:XdM�U(a.U"U5(d!UR(a[SU-5 M�URUS
SU5up�UR(a[SU	5 URX�5 GMC gUR(a[SU5 [[R"U55H�n[RRX5n[RRU5up�US:XdMKU(a.U"U5(d!UR(a[SU-5 M�URUS
SU5up�UR(a[SU	5 URX�5 M� gUSSS:wa[!S5eURUS
SU5up�UR(a[SU	5 URX�5 g)aNAdd all files from "pathname" to the ZIP archive.

If pathname is a package directory, search the directory and
all package subdirectories recursively for all *.py and enter
the modules into the archive.  If pathname is a plain
directory, listdir *.py and enter all modules.  Else, pathname
must be a Python *.py file and the module will be put into the
archive.  Added modules are always module.pyc.
This method will compile the module.py into module.pyc if
necessary.
If filterfunc(pathname) is given, it is called with every argument.
When it is False, the file or directory is skipped.
rr�� z skipped by filterfuncNz__init__.pyr�zAdding package in�asr����Adding)�
filterfunc�.pyzfile %r skipped by filterfunczAdding files from directoryz.Files added with writepy() must end with ".py"zAdding file)r�rrUrr�rvrVr_�isfile�
_get_codenamer�r��listdir�remove�splitext�writepyr�)rE�pathname�basenamer+�label�dirr��initnamer�r!�dirlistrqr�root�exts               rr2�PyZipFile.writepy=s���9�9�X�&���j��2�2��z�z�"$�'�'�-�-��"9�"9��v���u�h�G�H���G�G�M�M�(�+�	��
�7�7�=�=��"�"��w�w�|�|�H�m�<�H��w�w�~�~�h�'�'��*2�D�9�H�#�H��:�:��-�x��x�H�!%�!3�!3�H�Q�r�N�H�!M����:�:��(�G�,��
�
�5�*� ����H�!5�6�����}�-� '�H��7�7�<�<��;�D� "��� 0� 0�� :�I�D��w�w�}�}�T�*�*��7�7�>�>�"�'�'�,�,�t�]�*K�L�L� �L�L��4>�)�@�M����%�j��.>�.>�#�z�z� %�&E��&L� M�$�)-�);�);�D��2�J�<D�*F����:�:�!�(�G�4��
�
�5�2�#!(�(�:�:��7��B� &�r�z�z�(�';� <�H��7�7�<�<��;�D� "��� 0� 0�� :�I�D��e�|�%�j��.>�.>�#�z�z� %�&E��&L� M�$�)-�);�);�D��2�J�<D�*F����:�:�!�(�G�4��
�
�5�2�!=����}��%�"�D�F�F�!�/�/���2���I�N�E��z�z��m�W�-��J�J�u�&rc�:^�S
U4SjjnUS-nUS-n[RRUSS9n[RRUSS9n[RRUSS9nTRS:XGa[R
R
U5(aG[R"U5R[R"U5R:�aU=p�GO~[R
R
U5(aH[R"U5R[R"U5R:�aUn
Un	GO[R
R
U5(aH[R"U5R[R"U5R:�aUn
Un	GO�[R
R
U5(aH[R"U5R[R"U5R:�aUn
Un	GO:U"U5(aG[RRS	:XaUn
O#[RRS:XaUn
OUn
Un	O�U=p�O�TRS	:XaUn
Un	ONUn	TRS:XaUn
O9TRS:XaUn
O&S
RTR5n[U5e[R
R
U
5(aB[R"U
5R[R"U5R:�dU"UTRS9(dU=p�[R
RU	5SnU(a	U<SU<3nX�4$)z�Return (filename, archivename) for the path.

Given a module name path, return the correct file path and
archive name, compiling if necessary.  For example, given
/python/lib/string, return (/python/lib/string.pyc, string).
r�c��>�SSKnTR(a[SU5 URUSUS9 g!URan[UR
5 SnAgSnAff=f)Nr�	CompilingT)�doraiser$F)�
py_compilerUrv�compile�PyCompileError�msg)r�r$r@�errrEs    �r�_compile�)PyZipFile._get_codename.<locals>._compile�s\�����z�z��k�4�(�
��"�"�4���"�I����,�,�
��c�g�g����
�s�6�A%�A � A%r,z.pycr�)�optimizationr%r&rz"invalid value for 'optimize': {!r})r$r�r�)�	importlib�util�cache_from_sourcer#r�rr-r�rr�r�r$�formatr�rV)
rEr3r4rE�file_py�file_pyc�pycache_opt0�pycache_opt1�pycache_opt2r!r�rC�archivenames
`            rr.�PyZipFile._get_codename�s����		��e�#���f�$�� �~�~�7�7��b�7�Q�� �~�~�7�7��a�7�P�� �~�~�7�7��a�7�P���>�>�R�������x�(�(��'�'�(�#�,�,�����0@�0I�0I�I�"*�*��%��'�'�.�.��.�.��'�'�,�'�0�0�B�G�G�G�4D�4M�4M�M�%��"���'�'�.�.��.�.��'�'�,�'�0�0�B�G�G�G�4D�4M�4M�M�%��"���'�'�.�.��.�.��'�'�,�'�0�0�B�G�G�G�4D�4M�4M�M�%��"���G�$�$��y�y�)�)�Q�.� ,�����+�+�q�0� ,�� ,��&�G�&-�-�E�G��~�~��"�$��"��"���>�>�Q�&�(�E��^�^�q�(�(�E�>�E�E�d�n�n�U�C�$�S�/�)��G�G�N�N�5�)�)��G�G�E�N�+�+�r�w�w�w�/?�/H�/H�H���$�.�.�A�&-�-�E��g�g�m�m�G�,�Q�/���%-�{�;�K��#�#r)r#)r�N)
rrrrrrrFr2r.rrrrr
r
4s!��N�"%�:� �2�"�P'�dP$rr
c��^�SSKnSnURUS9nURSS9nURSSSS	S
9 URSSS
SSS9 URSSSSSS9 URSSSSS
9 URSSSS
9 UR	U5nUR
nURb]URn[USUS9nUR5nSSS5 W(a[SRU55 [S5 gURb1URn[USUS9nUR5 SSS5 gURb4URupi[USUS9nURU	5 SSS5 gURGbU(a.[S [ R"S!9 [ R$"S"5 URR'S5n
URnU4S#jm[U
S$5nUH�n[(R*R-U5n
U
(d<[(R*R-[(R*R/U55n
U
S%[(R0[(R24;aS%n
T"X|U
5 M� SSS5 gg!,(df   GN�=f!,(df   g=f!,(df   g=f!,(df   g=f)&Nrz3A simple command-line interface for zipfile module.)�descriptionT)�requiredz-lz--list�	<zipfile>zShow listing of a zipfile)�metavar�helpz-ez	--extractr&)rVz<output_dir>zExtract zipfile into target dir)�nargsrWrXz-cz--create�+)z<name>z<file>zCreate zipfile from sourcesz-tz--testzTest if a zipfile is validz--metadata-encodingz
<encoding>z2Specify encoding of member names for -l, -e and -trI)rJz.The following enclosed file is corrupted: {!r}zDone testingz/Non-conforming encodings not supported with -c.r�r%c	��>�[RRU5(aURX[5 g[RRU5(a�U(aURX5 [
[R"U55HGnT"U[RRX5[RRX#55 MI ggr;)	r�rr-r�rr�r�r/r_)r3r�zippath�nm�addToZips    �rr^�main.<locals>.addToZip	s�����w�w�~�~�d�#�#������5������t�$�$���H�H�T�+� ����D�!1�2�B��R��W�W�\�\�$�3�R�W�W�\�\�'�5N�P�3�%rrLr�)�argparse�ArgumentParser�add_mutually_exclusive_group�add_argument�
parse_argsrJ�testrr�rvrKr�r�r�r��creater��stderr�exit�popr�rr4r�r�r�)�argsr`rT�parser�group�encodingrr3�badfiler��zip_name�filesrr\r^s              @r�mainrq�s�����G�K�
�
$�
$��
$�
=�F��/�/��/�>�E�	���t�X�{�7��9�	���t�[��<�=��?�
���t�Z�s�3�9��;�
���t�X�{�8��:�
���-�|�Q��S����T�"�D��%�%�H��y�y���i�i��
�S�#��
:�b��j�j�l�G�;���B�I�I�'�R�S�
�n��	
���	��i�i��
�S�#��
:�b��K�K�M�;�
:�
���	!��l�l���
�S�#��
:�b��M�M�&�!�;�
:�
���	 ���C��z�z�
#��H�H�Q�K��;�;�?�?�1�%������	P��X�s�
#�r����'�'�*�*�4�0��� �g�g�.�.�r�w�w���t�/D�E�G��r�2�9�9�b�i�i�8�8� �G���7�+�
�$�
#�)
!�!;�
:��;�
:��
;�
:��.$�
#�s1�J)�,J;�,K�BK�)
J8�;
K	�
K�
K+)r�CompleteDirsr;)�r�binascii�importlib.utilrHr�r�r�r�rKr�r\rr�r9�ImportErrorr�rW�__all__�	Exceptionrrrrr�r�r�rrrr	r�r�r�r�r�r�r�r�r�r|r}r~rr�r�r�r�rwrxr{r}rzr|�_CD_CREATE_VERSION�_CD_CREATE_SYSTEM�_CD_EXTRACT_VERSION�_CD_EXTRACT_SYSTEMr�_CD_COMPRESS_TYPE�_CD_TIME�_CD_DATE�_CD_CRC�_CD_COMPRESSED_SIZE�_CD_UNCOMPRESSED_SIZEr~r�r��_CD_DISK_NUMBER_START�_CD_INTERNAL_FILE_ATTRIBUTES�_CD_EXTERNAL_FILE_ATTRIBUTESr�r�r�r�r�r�r�r�r�r�r��_FH_EXTRACT_VERSION�_FH_EXTRACT_SYSTEMr��_FH_COMPRESSION_METHOD�_FH_LAST_MOD_TIME�_FH_LAST_MOD_DATE�_FH_CRC�_FH_COMPRESSED_SIZE�_FH_UNCOMPRESSED_SIZEr�r�rwrxrurzr{ry�_CD64_SIGNATURE�_CD64_DIRECTORY_RECSIZE�_CD64_CREATE_VERSION�_CD64_EXTRACT_VERSION�_CD64_DISK_NUMBER�_CD64_DISK_NUMBER_START�_CD64_NUMBER_ENTRIES_THIS_DISK�_CD64_NUMBER_ENTRIES_TOTAL�_CD64_DIRECTORY_SIZE�_CD64_OFFSET_START_CENTDIRrCrEr7rkr
r�rgr�rrIr2rMrOrgr�r�r�r�r�r�r�r�r*rr
rq�_pathrrrrrr�<module>r�s����
��	�	�
��
�
������J�J�E�
������
	��	��9�� ���
���#�����
����	�
�����
��
������� �����!1�2������������
�	��������
�$�� �����!1�2���
����������
�������
��������������!��!������ ��
#�� �� ��
��"�� �����!1�2���
����� !��������
����������%��)�� �/�/�*C�D��"��"���?�?�#5�6��������������!"���������
�!
�U�!
�H�� (�V:�x�&r�r�r
�	�� #�L"�"�.��8��w���x���x���x�	�
�x���x�
��y���z���y���{���	�������������� �	�!�"��#��(N�&
� P�$%!�%!�P��(T��"�"�T�n
X+�B�%�%�X+�x`�`�Fk$��k$�\C,�L���iH���D��N�N�E�����
�C���
���D��s4�I�I�I+�I�I�I(�'I(�+I7�6I7

?>