Your IP : 216.73.216.196


Current Path : /opt/alt/python312/lib64/python3.12/test/__pycache__/
Upload File :
Current File : //opt/alt/python312/lib64/python3.12/test/__pycache__/test_urllib.cpython-312.opt-2.pyc

�

�#�j+$����	ddlZddlZddlZddlZddlZddlZddl	Z	ddl
mZddlm
Z
ddlmZddlmZddlmZddlmZddlZ	ddlZddlZddlZddlmZddlZej6se	j8d	��d
�Zdad/d�Zd�Z d0d
�Z!Gd�de"�Z#Gd�de"�Z$Gd�de	jJ�Z&Gd�de	jJ�Z'Gd�de	jJ�Z(Gd�de	jJe#e$�Z)Gd�de	jJ�Z*Gd�de	jJ�Z+Gd�de	jJe#�Z,Gd �d!e	jJ�Z-Gd"�d#e	jJ�Z.Gd$�d%e	jJ�Z/Gd&�d'e	jJ�Z0Gd(�d)e	jJ�Z1Gd*�d+e#e	jJ�Z2Gd,�d-e	jJ�Z3e4d.k(re	jj�yy#e$rdZY���wxYw)1�N)�patch)�support)�	os_helper)�
socket_helper)�warnings_helper)�control_characters_c0)�	b64encodeztest requires gethostname()c�~�	tt|��ddj�}t|�dk(rd|z}d|zS)N��z0%s�%)�hex�ord�upper�len)�char�hex_reprs  �7/opt/alt/python312/lib64/python3.12/test/test_urllib.py�	hexescaper sB��+��3�t�9�~�a�b�!�'�'�)�H�
�8�}����8�#����>��c���	|�!tjj|��}nts
t�}|ant}|�|j	|�S|j	||�S)N)�proxies)�urllib�request�FancyURLopener�
_urlopener�open)�url�datar�openers    r�urlopenr!+s\��8������.�.�w�.�?��
��!���
����|��{�{�3����{�{�3��%�%rc��tjdtf�5tjj�cddd�S#1swYyxYw)Nz8FancyURLopener style of invoking requests is deprecated.)r�check_warnings�DeprecationWarningrrr�rrrr;s=��	�	'�	'�
G��
 �
!��~�~�,�,�.�
!�
!�
!�s�A�A
c�����G�fd�dtj��G��fd�dtjj��|�_�S)Nc�8��eZdZdZ�fd�Zd�Zdd�Zdd�Zd�Zy)	�fakehttp.<locals>.FakeSocketrc���|�_y�N)�buf)�selfr�FakeHTTPConnections  �r�sendallz$fakehttp.<locals>.FakeSocket.sendallFs���%)��"rc�0�|xjdz
c_|S)Nr)�io_refs)r,�args�kwdss   r�makefilez%fakehttp.<locals>.FakeSocket.makefileIs���L�L�A��L��KrNc�\�|jrytjj||�S�Nr)�closed�io�BytesIO�read)r,�amts  rr9z!fakehttp.<locals>.FakeSocket.readMs!���{�{���:�:�?�?�4��-�-rc�\�|jrytjj||�Sr5)r6r7r8�readline)r,�lengths  rr<z%fakehttp.<locals>.FakeSocket.readlineRs#���{�{���:�:�&�&�t�V�4�4rc��|xjdzc_|jdk(r tjj|�yy)Nrr)r0r7r8�close�r,s rr?z"fakehttp.<locals>.FakeSocket.closeWs3���L�L�A��L��|�|�q� ��
�
� � ��&�!rr*)	�__name__�
__module__�__qualname__r0r.r3r9r<r?)r-s�r�
FakeSocketr(Cs!�����	*�	�	.�
	5�
	'rrDc�*��eZdZdZ�fd�ZW�rd�Zyy)�$fakehttp.<locals>.FakeHTTPConnectionNc�h���|j�|_|jt|�_yr*)�fakedata�sock�type�fakesock)r,rDs �r�connectz,fakehttp.<locals>.FakeHTTPConnection.connectas#���"�4�=�=�1�D�I�"&�)�)�D��J�rc��yr*r%r@s rr?z*fakehttp.<locals>.FakeHTTPConnection.closej���r)rArBrCr+rLr?)rD�
mock_closes��rr-rF\s�����	,��

�rr-)r7r8�http�client�HTTPConnectionrH)rHrOr-rDs `@@r�fakehttprSBs:���'�R�Z�Z�'�2�T�[�[�7�7�� #+����rc��eZdZdd�Zd�Zy)�
FakeHTTPMixinc��t||��}tjj|_|tj_y)N�rO)rSrPrQrR�_connection_class)r,rHrO�fake_http_classs    rrSzFakeHTTPMixin.fakehttprs,��"�8�
�C��!%���!;�!;���%4����"rc�B�|jtj_yr*)rXrPrQrRr@s r�
unfakehttpzFakeHTTPMixin.unfakehttpws��%)�%;�%;����"rN�F)rArBrCrSr[r%rrrUrUqs��5�
<rrUc��eZdZd�Zd�Zy)�FakeFTPMixinc��Gd�dt�}tjj|_|tj_y)Nc�$�eZdZ		dd�Zd�Zd�Zy)�,FakeFTPMixin.fakeftp.<locals>.FakeFtpWrapperNc��yr*r%)r,�user�passwd�host�port�dirs�timeout�
persistents        r�__init__z5FakeFTPMixin.fakeftp.<locals>.FakeFtpWrapper.__init__~s��rc�.�tj�dfS)Nr)r7r8)r,�filerJs   r�retrfilez5FakeFTPMixin.fakeftp.<locals>.FakeFtpWrapper.retrfile�s���z�z�|�Q��&rc��yr*r%r@s rr?z2FakeFTPMixin.fakeftp.<locals>.FakeFtpWrapper.close�rNr)NT)rArBrCrjrmr?r%rr�FakeFtpWrapperra}s��HL� $�
�
'�
rro)�objectrr�
ftpwrapper�_ftpwrapper_class)r,ros  r�fakeftpzFakeFTPMixin.fakeftp|s.��		�V�		�"(���!:�!:���$2����!rc�B�|jtj_yr*)rrrrrqr@s r�	unfakeftpzFakeFTPMixin.unfakeftp�s��$(�$:�$:����!rN)rArBrCrsrur%rrr^r^{s��
3�;rr^c�n�eZdZ	d�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
d�Zd
�Zd�Zd�Zd�Zy)�urlopen_FileTestsc���td|jjzd�|_t	t
jd�}	|j|j�|j�t
j|_	tjj|j�|_
td|jz�|_y#|j�wxYw)Nztest_urllib: %s
�ascii�wb�file:%s)�bytes�	__class__rA�textrr�TESTFN�writer?�pathnamer�parse�quote�quoted_pathnamer!�returned_obj)r,�fs  r�setUpzurlopen_FileTests.setUp�s����-����0G�0G�G�!�#��	���!�!�4�(��	�
�G�G�D�I�I��
�G�G�I�!�(�(��
�%�|�|�1�1�$�-�-�@���#�I��0D�0D�$D�E����
�G�G�I�s�C�C"c��	|jj�tjtj
�yr*)r�r?�os�removerrr@s r�tearDownzurlopen_FileTests.tearDown�s)��'������!�
�	�	�)�"�"�#rc�d�dD]+}|jt|j|�d|z��-y)N)	r9r<�	readlines�filenor?�info�geturl�getcode�__iter__�/object returned by urlopen() lacks %s attribute)�
assertTrue�hasattrr��r,�attrs  r�test_interfacez urlopen_FileTests.test_interface�s6��G�D��O�O�G�D�$5�$5�t�<�J���
�Grc�l�|j|j|jj��yr*)�assertEqualr~r�r9r@s r�	test_readzurlopen_FileTests.test_read�s%��������D�$5�$5�$:�$:�$<�=rc���|j|j|jj��|jd|jj�d�y)NrzKcalling readline() after exhausting the file did not return an empty string)r�r~r�r<r@s r�
test_readlinezurlopen_FileTests.test_readline�sK��������D�$5�$5�$>�$>�$@�A�����d�/�/�8�8�:�3�	4rc��|jj�}|jt|�dd�|j|d|jd�y)Nrz.readlines() returned the wrong number of linesrz"readlines() returned improper text)r�r�r�rr~)r,�
lines_lists  r�test_readlinesz urlopen_FileTests.test_readlines�sM���&�&�0�0�2�
�����Z��!�I�	K�����A���	�	�=�	?rc���|jj�}|j|td�|j	tj|t|j��|jd�y)Nzfileno() did not return an intzTReading on the file descriptor returned by fileno() did not return the expected text)	r�r��assertIsInstance�intr�r�r9rr~)r,�file_nums  r�test_filenozurlopen_FileTests.test_fileno�sW���$�$�+�+�-�����h��-M�N��������3�t�y�y�>�:�D�I�I�<�	=rc�8�|jj�yr*)r�r?r@s r�
test_closezurlopen_FileTests.test_close�s��	
�����!rc��|j|jjtjj
�yr*)r�r��headers�email�message�Messager@s r�test_headerszurlopen_FileTests.test_headers�s(�����d�/�/�7�7����9N�9N�Orc�d�|j|jj|j�yr*)r�r�rr�r@s r�test_urlzurlopen_FileTests.test_url�s$������*�*�.�.��0D�0D�Erc�N�|j|jj�yr*)�assertIsNoner��statusr@s r�test_statuszurlopen_FileTests.test_status�s�����$�+�+�2�2�3rc��|j|jj�tjj
�yr*)r�r�r�r�r�r�r@s r�	test_infozurlopen_FileTests.test_info�s+�����d�/�/�4�4�6��
�
�8M�8M�Nrc�l�|j|jj�|j�yr*)r�r�r�r�r@s r�test_geturlzurlopen_FileTests.test_geturl�s'������*�*�1�1�3�T�5I�5I�Jrc�V�|j|jj��yr*)r�r�r�r@s r�test_getcodezurlopen_FileTests.test_getcode�s�����$�+�+�3�3�5�6rc�^�|jD]}|j||j�� yr*)r�r�r~)r,�lines  r�	test_iterzurlopen_FileTests.test_iter�s(���%�%�D����T�4�9�9�-�&rc�|�|jttjjd|j
z�y)Nz./)�assertRaises�
ValueErrorrrr!r�r@s r�test_relativelocalfilez(urlopen_FileTests.test_relativelocalfile�s'�����*�V�^�^�%;�%;�D�4�=�=�<P�QrN)rArBrCr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r%rrrwrw�s]���F�$�
�>�4�?�=�"�
P�F�4�O�K�7�.�Rrrwc�0�eZdZd�Zd�Zd�Zd�Zd�Zd�Zy)�
ProxyTestsc���|jtj��|_t	t
j�D]0}d|j�vs�|jj|��2y)N�proxy)	�enterContextr�EnvironmentVarGuard�env�listr��environ�lower�unset)r,�ks  rr�zProxyTests.setUp�sN���$�$�Y�%B�%B�%D�E����b�j�j�!�A��!�'�'�)�#������q�!�"rc���|jjdd�tjj	�}|jd|d�|jjdd�|j
tjjd��|j
tjjd��|j
tjjd��y)N�NO_PROXY�	localhost�no�0localhost, anotherdomain.com, newdomain.com:1234�anotherdomain.com�anotherdomain.com:8888�newdomain.com:1234)r��setrr�getproxies_environmentr�r��proxy_bypass_environment�r,rs  r�+test_getproxies_environment_keep_no_proxiesz6ProxyTests.test_getproxies_environment_keep_no_proxies�s��������Z��-��.�.�7�7�9������g�d�m�4������Z�!S�T�������?�?�@S�T�U�������?�?�@X�Y�Z�������?�?�@T�U�Vrc��	|jjdd�tjj	�}|jd|d�|jjdd�tjj	�}|j
d|�|jjd�|jjd�y#|jjd�|jjd�wxYw)N�
HTTP_PROXY�http://somewhere:3128rP�REQUEST_METHOD�GET)r�r�rrr�r��assertNotInr�r�s  r�test_proxy_cgi_ignorez ProxyTests.test_proxy_cgi_ignores���		)��H�H�L�L��'>�?��n�n�;�;�=�G����4�g�f�o�F��H�H�L�L�)�5�1��n�n�;�;�=�G����V�W�-��H�H�N�N�+�,��H�H�N�N�<�(��
�H�H�N�N�+�,��H�H�N�N�<�(�s�BC�8Dc���tjj}|jj	dd�|j|d��|j|d��|j|d��|j|d��|j|d��|j|d��|j|d	��|j|d
��|j|d��|j|d��|j|d
��|j
|d��|j
|d��|j
|d��y)Nr�z8localhost, anotherdomain.com, newdomain.com:1234, .d.o.tr��	LocalHost�	LOCALHOSTz
.localhostr�z.newdomain.com:1234z	foo.d.o.tzd.o.tr�z.anotherdomain.com:8888zwww.newdomain.com:1234�prelocalhost�
newdomain.comznewdomain.com:1235�rrr�r�r�r��assertFalse�r,�bypasss  r�(test_proxy_bypass_environment_host_matchz3ProxyTests.test_proxy_bypass_environment_host_match
s �����8�8�������Z�O�	Q�����{�+�,�����{�+�,�����{�+�,�����|�,�-�����3�4�5�����4�5�6�����{�+�,�����w��(�����7�8�9�����8�9�:�����7�8�9������/�0������0�1����� 4�5�6rc��tjj}|jj	dd�|j|d��|j|d��|jj	dd�|j|d��|j
|d��|j
|d��y)Nr��*r�r�z*, anotherdomain.comr�r�r�s  r�*test_proxy_bypass_environment_always_matchz5ProxyTests.test_proxy_bypass_environment_always_match s������8�8�������Z��%������/�0�����3�4�5������Z�!7�8�����2�3�4������0�1����� 4�5�6rc��tjj}|jj	dd�|j|d��|j|d��|j|d��y)Nr�r�z
localhost
zanotherdomain.com:8888
znewdomain.com:1234
)rrr�r�r�r�r�s  r�%test_proxy_bypass_environment_newlinez0ProxyTests.test_proxy_bypass_environment_newline*sb�����8�8�������Z�G�	I�����
�.�/����� :�;�<����� 6�7�8rN)	rArBrCr�r�r�r�r�r�r%rrr�r��s!��"�	W�
)�7�&7�9rr�c��eZdZd�Zd�Zd�Zy)�ProxyTests_withOrderedEnvc�h�tj|_tj�t_yr*)r�r��
_saved_env�collections�OrderedDictr@s rr�zProxyTests_withOrderedEnv.setUp5s���*�*��� �,�,�.��
rc�.�|jt_yr*)r�r�r�r@s rr�z"ProxyTests_withOrderedEnv.tearDown;s
���_�_��
rc�~�dtjd<dtjd<|jtjjd��|jtjjd��dtjd<dtjd<tjj
�}|ji|�d	tjd<d
tjd<|jtjjd��|jtjjd��|jtjjd��|jtjjd
��|jtjjd��dtjd<dtjd<tjj
�}|jd|d�y)N��no_proxyr��No_Proxy�	arbitrary�
http_proxyr�r�z%localhost, noproxy.com, my.proxy:1234zxyz.comznoproxy.com:5678z
my.proxy:1234zmy.proxyzhttp://somewhereelse:3128�
Http_ProxyrP)	r�r�r�rrr�r�r�r�r�s  r�,test_getproxies_environment_prefer_lowercasezFProxyTests_withOrderedEnv.test_getproxies_environment_prefer_lowercase>s���!#��
�
�:��!,��
�
�:��������@�@��M�N�������@�@��M�N�#%��
�
�<� �#:��
�
�<� ��.�.�7�7�9������W�%�!H��
�
�:��!*��
�
�:��������?�?��L�M�������?�?�@R�S�T�������?�?��P�Q�������@�@��L�M�������@�@��M�N�#:��
�
�<� �#>��
�
�<� ��.�.�7�7�9�����0�'�&�/�BrN)rArBrCr�r�r�r%rrr�r�3s��/�%�Crr�c��eZdZ	d�Zd�Zd�Zejed�d��Z	ejed�d��Z
ejed�d��Zejed�d��Zd	�Z
d
�Zd�Zd�Zd
�Zd�Zd�Zd�Zd�Zd�Zd�Zej2ej6dd�d��Zd�Zd�Zd�Zejed�d��Z y)�urlopen_HttpTestsc��|jd|zdz�	td�}|j|j�d�|j|j�d�|j|j	�d�|j|j�d�|j
�y#|j
�wxYw)NsHTTP/s 200 OK

Hello!�http://python.org/�Hello!r���rSr!r�r<r�r�r[)r,�ver�fps   r�
check_readzurlopen_HttpTests.check_readZs����
�
�h��n�'?�?�@�	��-�.�B����R�[�[�]�I�6����R�[�[�]�C�0����R�Y�Y�[�*>�?����R�Z�Z�\�3�/��O�O���D�O�O��s�BB5�5Cc���d}|jd�	tjj|�}|j	|j�|�|j
�y#|j
�wxYw)Nz-http://docs.python.org/library/urllib.html#OK�HTTP/1.1 200 OK

Hello!)rSrrr!r�r�r[)r,rrs   r�test_url_fragmentz#urlopen_HttpTests.test_url_fragmentesX��=���
�
�6�7�	����'�'��,�B����R�Y�Y�[�#�.��O�O���D�O�O��s�?A%�%A7c���|jd�	td�}|j|jj�|j�y#|j�wxYw)Nr
�http://www.python.org)rSr!r�r�
will_closer[)r,�resps  r�test_willclosez urlopen_HttpTests.test_willcloseosJ���
�
�6�7�	��2�3�D��O�O�D�G�G�.�.�/��O�O���D�O�O��s�0A�A&zssl module requiredc���ttdd��dgzD�]}t|�}d|�d�}|jd�	t	|�jdd�}tjj}|j|d	|���5tjjd
|���ddd�|j|d	|���5tjjd|���ddd�td
|���}|j||j��|j���y#1swY��xYw#1swY�WxYw#|j�wxYw)Nr�!�z//localhost:7777/test�/�HTTP/1.1 200 OK

Hello.�\�\\�contain control.*�http:�https:)r��range�chrrS�repr�replacerPrQ�
InvalidURL�assertRaisesRegexrrr!r�r�r[)r,�char_nor�schemeless_url�escaped_char_reprrrs       r�(test_url_path_with_control_char_rejectedz:urlopen_HttpTests.test_url_path_with_control_char_rejectedwsH���E�!�T�N�+�t�f�4�G��w�<�D�4�T�F�!�<�N��M�M�:�;�
"�%)��J�$6�$6�t�U�$C�!�!�[�[�3�3�
��+�+��"3�4E�3F� G�I��N�N�*�*�U�>�2B�+C�D�I��+�+��"3�4E�3F� G�I��N�N�*�*�V�N�3C�+D�E�I���~�&6�7�8��� � ��t�{�{�}�5����!�/5�I�I��I�I�����!�s=�A
E�#D8�.E�#E�.6E�8E	�=E�E
	�	E�E"c��|jd�d}d|zdz}	tjj}|j	|d�5t
jjd|���ddd�|j	|d�5t
jjd|���ddd�td|���}|jd	|j��|jd
|j��|jd|j��|j�y#1swY��xYw#1swY��xYw#|j�wxYw)Nrz:localhost:7777?a=1 HTTP/1.1
X-injected: header
TEST: 123�//�:8080/test/?test=az*contain control.*\\r.*(found at least . .)r�contain control.*\\nr� �
�
)rSrPrQrr rrr!r�r�r[)r,rer"rrs     r�4test_url_path_with_newline_header_injection_rejectedzFurlopen_HttpTests.test_url_path_with_newline_header_injection_rejected�s%���
�
�6�7�O�����';�;��	����/�/�J��'�'��I�K����&�&��~�.>�'?�@�K��'�'�
�4K�L����&�&���/?�'@�A�M��U�>�"2�3�4�D����S�$�+�+�-�0����T�4�;�;�=�1����T�4�;�;�=�1��O�O��K�K��M�L��
�O�O��s<�,E�	#D0�,E�#D<�)A6E�0D9�5E�<E�E�Ec��ttdd��dgzD]�}t|�}d|�d�}|jd�	t	|�jdd�}tjj}|j|d	|���5td
|���ddd�|j|d	|���5td|���ddd�|j���y#1swY�HxYw#1swY�(xYw#|j�wxYw)Nrrrz//localhostz/test/rrrrrr)r�rrrSrrrPrQrr r!r[)r,r!rr"r#rs      r�(test_url_host_with_control_char_rejectedz:urlopen_HttpTests.test_url_host_with_control_char_rejected�s���E�!�T�N�+�t�f�4�G��w�<�D�*�4�&��7�N��M�M�:�;�	
"�$(��J�$6�$6�t�U�$C�!�!�[�[�3�3�
��+�+��"3�4E�3F� G�I��e�N�#3�4�5�I��+�+�J�:K�L]�K^�8_�`��f�^�$4�5�6�a����!�5�I�I��a�`�����!�s=�A
C8�
C �C8�6C,�C8� C)	�%C8�,C5	�1C8�8D
c��|jd�d}d|zdz}	tjj}|j	|d�5td|���ddd�|j	|d�5td|���ddd�|j
�y#1swY�CxYw#1swY�&xYw#|j
�wxYw)	Nrzlocalhost
X-injected: header
r&r'zcontain control.*\\rrr(r)rSrPrQrr r!r[)r,rer"rs    r�4test_url_host_with_newline_header_injection_rejectedzFurlopen_HttpTests.test_url_host_with_newline_header_injection_rejected�s����
�
�6�7�4�����';�;��	����/�/�J��'�'��3�5��%��/�0�1�5��'�'�
�4K�L��&�� 0�1�2�M�
�O�O��
5�5��M�L��
�O�O��s;�,B2�	B�B2�2B&�B2�B#�B2�&B/�+B2�2Cc�&�|jd�y)Ns0.9�rr@s r�
test_read_0_9zurlopen_HttpTests.test_read_0_9�s��	
����rc�&�|jd�y)Ns1.0r2r@s r�
test_read_1_0zurlopen_HttpTests.test_read_1_0��������rc�&�|jd�y)Ns1.1r2r@s r�
test_read_1_1zurlopen_HttpTests.test_read_1_1�r6rc�d�|jdd��	|jtjj�5}tj
j
d�ddd�jj�|j�y#1swY�4xYw#|j�wxYw)Ns�HTTP/1.1 401 Authentication Required
Date: Wed, 02 Jan 2008 03:03:54 GMT
Server: Apache/1.3.33 (Debian GNU/Linux) mod_ssl/2.8.22 OpenSSL/0.9.7e
Connection: close
Content-Type: text/html; charset=iso-8859-1
TrWr)
rSr�r�error�	HTTPErrorrr!�	exceptionr?r[)r,�cms  r�test_read_bogusz!urlopen_HttpTests.test_read_bogus�s����
�
��
�	�	�	��"�"�6�<�<�#9�#9�:�b����&�&�';�<�;��L�L��� ��O�O��	;�:��
�O�O��s"�)B� B�"B�B�B�B/c�j�|jdd��	d}|jtjj|�5}tj
j
d�ddd�jj�|j�y#1swY�4xYw#|j�wxYw)Ns�HTTP/1.1 302 Found
Date: Wed, 02 Jan 2008 03:03:54 GMT
Server: Apache/1.3.33 (Debian GNU/Linux) mod_ssl/2.8.22 OpenSSL/0.9.7e
Location: file://guidocomputer.athome.com:/python/license
Connection: close
Content-Type: text/html; charset=iso-8859-1
TrWzRedirection to url 'file:r)
rSr rr:r;rr!r<r?r[)r,�msgr=s   r�test_invalid_redirectz'urlopen_HttpTests.test_invalid_redirect�s����
�
���
	�	�	�-�C��'�'����(>�(>��D�����&�&�';�<�E��L�L��� ��O�O��	E�D��
�O�O��s#�,B � B�!"B �B�B � B2c��tt�j�D]U}|jdd��	|j	t
jjtd�|j��Wy#|j�wxYw)Ns_HTTP/1.1 302 Found
Location: file://guidocomputer.athome.com:/python/license
Connection: close
TrW�http://something)
rr�maxtriesrSr�rr:r;r!r[)r,�is  r�test_redirect_limit_independentz1urlopen_HttpTests.test_redirect_limit_independent�su���~�'�0�0�1�A��M�M���
�
�
"��!�!�&�,�,�"8�"8�'�&�(����!�2�����!�s�/A7�7B	c��|jd�	|jttd�|j	�y#|j	�wxYw)NrrC)rSr��OSErrorr!r[r@s r�test_empty_socketz#urlopen_HttpTests.test_empty_sockets=��	
�
�
�c��	����g�w�0B�C��O�O���D�O�O��s	�?�Ac�*�|jtjj�5}t	d�ddd�|jjj�|j|jj�y#1swY�TxYw)Nz/file://localhost/a/file/which/doesnot/exists.py)	r�rr:�URLErrorr!r�r<�filename�reason�r,�es  r�test_missing_localfilez(urlopen_HttpTests.test_missing_localfiles_��
�
�
�v�|�|�4�4�
5���E�F�6�������,�,�-�������*�*�+�6�
5���B	�	Bc���tj�\}}d|jtjj
d�z}	|j
tjj|��t|�5}|j
|�ddd�tj|�tj|�|jtjj|��|jtjj�5t|�ddd�y#1swY��xYw#tj|�tj|�wxYw#1swYyxYw)Nzfile://localhost/r)�tempfile�mkstemprr��path�sepr��existsr!r?�unlinkr�r�rr:rK)r,�fd�tmp_file�tmp_fileurl�fobjs     r�test_file_notexistsz%urlopen_HttpTests.test_file_notexistss����'�'�)���H�)�H�,<�,<�R�W�W�[�[�#�,N�N��	 ��O�O�B�G�G�N�N�8�4�5���%������%�&�
�H�H�R�L��I�I�h�����������1�2�
�
�
�v�|�|�4�4�
5��K� �6�
5�
&�%��
�H�H�R�L��I�I�h���
5�
5�s0�9D;�?D/�D;�E*�/D8�4D;�;,E'�*E3c�.�d}|jtjj�5}t	|�ddd�|jjj�|j|jj�y#1swY�TxYw)Nzftp:///path�
r�rr:rKr!r�r<rLr�rM)r,�test_ftp_urlrOs   r�test_ftp_nohostz!urlopen_HttpTests.test_ftp_nohost#se��$��
�
�
�v�|�|�4�4�
5���L�!�6�������-�-�.�������*�*�+�6�
5�s�B�Bc�*�|jtjj�5}t	d�ddd�|jjj�|j|jj�y#1swY�TxYw)Nz.ftp://localhost/a/file/which/doesnot/exists.pyr_rNs  r�test_ftp_nonexistingz&urlopen_HttpTests.test_ftp_nonexisting*sa��
�
�
�v�|�|�4�4�
5���D�E�6�������-�-�.�������*�*�+�6�
5�rQ�MAXFTPCACHErc��|j�	tjjddddg�tjjd<td�|j
�y#|j
�wxYw)Nrc�passr���testzftp://localhost)rsrrrq�ftpcacher!rur@s r�test_ftp_cache_pruningz(urlopen_HttpTests.test_ftp_cache_pruning0s]������	�.4�n�n�.G�.G��PV�Xc�eg�ik�.l�F�N�N�#�#�F�+��%�&��N�N���D�N�N��s�A	A,�,A>c��|jd�	td�}|j|j�d�|j|j�d�|j|j	�d�|j|j�d�|j
�y#|j
�wxYw)N�HTTP/1.0 200 OK

Hello!zhttp://user:pass@python.org/rrrr)r,rs  r�test_userpass_inurlz%urlopen_HttpTests.test_userpass_inurl9s����
�
�6�7�	��7�8�B����R�[�[�]�I�6����R�[�[�]�C�0����R�Y�Y�[�*H�I����R�Z�Z�\�3�/��O�O���D�O�O��s�BB/�/Cc��|jd�	d}dj|�}tjj}dt|j
d��jd�z}t|�}|j||jjd��|j|j�d�|j|j�d�|j|j�|�|j|j�d	�|j!�y#|j!�wxYw)
Nrlza b:c dzhttp://{}@python.org/zAuthorization: Basic %s
�ASCIIzUTF-8rrr)rS�formatrPrQrRr	�encode�decoder!�assertInr+r�r<�assertNotEqualr�r�r[)r,�userpassr�fakehttp_wrapper�
authorizationrs      r�test_userpass_inurl_w_spacesz.urlopen_HttpTests.test_userpass_inurl_w_spacesDs����
�
�6�7�	� �H�)�0�0��:�C�#�{�{�9�9��:�&�x���w�'?�@�G�G��P�Q�M����B��M�M�-�)9�)=�)=�)D�)D�W�)M�N����R�[�[�]�I�6����R�[�[�]�C�0�����	�	��S�1����R�Z�Z�\�3�/��O�O���D�O�O��s�DD3�3Ec��tjdtf�5tjj�ddd�y#1swYyxYw�Nr�)rr#r$rr�	URLopenerr@s r�test_URLopener_deprecationz,urlopen_HttpTests.test_URLopener_deprecationWs3��
�
+�
+�R�0B�,C�
D��N�N�$�$�&�E�
D�
D�s�A�A
c�$�tj�}tjdtf�5|jt�5tjjdd|��ddd�ddd�y#1swY�xYw#1swYyxYw)Nr�zhttps://localhostz/nonexistent/path)�cafile�context)
�ssl�create_default_contextrr#r$r�r�rrr!)r,rs  r�test_cafile_and_contextz)urlopen_HttpTests.test_cafile_and_context[sp���,�,�.��
�
+�
+�R�1C�,D�
E��"�"�:�.����&�&�'�0C�W�'��/�F�
E�.�.��F�
E�s#�B�#A:�)B�:B	�?B�BN)!rArBrCrrr�unittest�
skipUnlessr�r$r,r.r0r3r5r8r>rArFrIrPr]rarcrrprrrjrmrxr|r�r%rrrrWs5��8�	����X����3�4�"�5�"�4�X����3�4��5��2�X����3�4�"�5�"� �X����3�4��5�� �
 � �
��""��,�!�,�,��U�\�\�&�.�.�-��3��4��	��&'��X����3�4��5�rrc�J�eZdZ	d�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zy)�urlopen_DataTestsc�
�|jtjj�d|_d|_d|_d|_d|_|jtjj|j��|_|jtjj|j��|_|jtjj|j��|_
y)Nutest data URLs :;,%=& ö Ä sU�PNG


IHDR{@��sRGB���IDAT�c```���?�
o/IEND�B`�zZdata:text/plain;charset=UTF-8,test%20data%20URLs%20%3A%3B%2C%25%3D%26%20%C3%B6%20%C3%84%20zPdata:text/plain;charset=ISO-8859-1;base64,dGVzdCBkYXRhIFVSTHMgOjssJT0mIPYgxCA%3Dz�data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAABCAIAAAB7
QOjdAAAAAXNSR0IArs4c6QAAAA9JREFUCNdj%0AYGBg%2BP//PwAGAQL%2BCm8 vHgAAAABJRU5ErkJggg%3D%3D%0A%20)�
addCleanuprr�
urlcleanupr~�image�text_url�text_url_base64�	image_urlr�r!�
text_url_resp�text_url_base64_resp�image_url_respr@s rr�zurlopen_DataTests.setUphs���������1�1�2�;��	�
F�	
�
�
(�	
�
�
�	
��
.�	
��
"�.�.��N�N�"�"�4�=�=�1�3���$(�$5�$5��N�N�"�"�4�#7�#7�8�%:��!�"�/�/����0F�0F�t�~�~�0V�W��rc�d�dD]+}|jt|j|�d|z��-y)N)r9r<r�r?r�r�r�r�r�)r�r�r�r�s  rr�z urlopen_DataTests.test_interface�s6��G�D��O�O�G�D�$6�$6��=�J���
�Grc�L�|j|jj�tjj
�|j
|jj�j�ddg�|j
|jj�dtt|j���tjjd�}|j
|j�j�ddg�|j!�y)N)z
text/plainr�)�charsetz
ISO-8859-1zcontent-lengthzdata:,)r�zUS-ASCII)r�r�r�r�r�r�r�r��
get_paramsr��strrr�rrr!r?)r,�rs  rr�zurlopen_DataTests.test_info�s������d�0�0�5�5�7����9N�9N�O�����2�2�7�7�9�D�D�F�
�!:�;�	=�����,�,�1�1�3�4D�E���D�J�J�� �	"��N�N�"�"�8�,���������,�,�.�
�!8�9�	;�	���	rc�<�|j|jj�|j�|j|jj�|j
�|j|jj�|j�yr*)r�r�r�r�r�r�r�r�r@s rr�zurlopen_DataTests.test_geturl�sp������+�+�2�2�4�d�m�m�D�����2�2�9�9�;�� � �	"�����,�,�3�3�5�t�~�~�Frc���|j|jj�jt	|jj�j
��d�|j�y�Nr�)r�r�r9rr�dictr�r�r~r@s r�test_read_textz urlopen_DataTests.test_read_text�sZ������+�+�0�0�2�9�9���#�#�(�(�*�5�5�7�8��C�E�FJ�i�i�	Qrc���|j|jj�jt	|jj�j
��d�|j�yr�)r�r�r9rrr�r�r�r~r@s r�test_read_text_base64z'urlopen_DataTests.test_read_text_base64�sY������2�2�7�7�9�@�@���*�*�/�/�1�<�<�>�?�	�J�L��I�I�	rc�l�|j|jj�|j�yr*)r�r�r9r�r@s r�test_read_imagez!urlopen_DataTests.test_read_image�s%������,�,�1�1�3�T�Z�Z�@rc�b�|jttjjd�y)Nzdata:text/plain�r�r�rrr!r@s r�test_missing_commaz$urlopen_DataTests.test_missing_comma�s�����*�V�^�^�%;�%;�<M�Nrc�b�|jttjjd�y)Nzdata:;base64,Cg=r�r@s r�test_invalid_base64_dataz*urlopen_DataTests.test_invalid_base64_data�s�����*�V�^�^�%;�%;�<N�Orc��t�D]5}|jttjj
d|�d���7t�D]5}|jttjj
d|�d���7y)Nzdata:text/html;z,datazdata:text/htmlz;base64,ZGF0YQ==)rr�r�rrr!)r,�c0s  r�test_invalid_mediatypez(urlopen_DataTests.test_invalid_mediatype�sp��'�)�B����j����)?�)?� /��t�5�9�
;�*�(�)�B����j����)?�)?� .�r�d�2B�C�
E�*rN)
rArBrCr�r�r�r�r�r�r�r�r�r�r%rrr�r�es?��,�X�@�	�G�Q��
A�O�P�Err�c�R�eZdZ	d�Zd�Zd�Zd
d�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
y)�urlretrieve_FileTestsc��|jtjj�g|_|jtj�d|_	ttjd�}|j|j�|j�|j�y#YyxYw#j�w#YwxYwxYw)Nstesting urllib.urlretrieverz)r�rrr��	tempFiles�registerFileForCleanUprrr~rr�r?)r,�FILEs  rr�zurlretrieve_FileTests.setUp�s���������1�1�2����	
�#�#�I�$4�$4�5�1��	�	��	�(�(�$�/�D��J�J�t�y�y�!��J�J�L�������D��������D�s1�AB5�B.�.B2�5C�6C�C�C�	Cc�^�|jD]}tj|��y#Y�xYwr*)r�r�r�)r,�eachs  rr�zurlretrieve_FileTests.tearDown�s"���N�N�D����4��#���D�s�(�,c��tjj|�}dtjj|�zS)Nz	file://%s)r�rU�abspathrr�pathname2url)r,�filePaths  r�constructLocalFileUrlz+urlretrieve_FileTests.constructLocalFileUrl�s.���7�7�?�?�8�,���V�^�^�8�8��B�B�Brc�0�	tj�\}}	|j|�tj|d�}|j|�|j
�|j
�|S#Y|SxYw#j
�w#YwxYwxYw)Nrz)rSrTr�r��fdopenr�r?)r,r�newFd�newFilePath�newFiles     r�createNewTempFilez'urlretrieve_FileTests.createNewTempFile�s���	2�&�-�-�/���{�	��'�'��4��i�i��t�,�G��M�M�$���M�M�O��������
�D����������D�s0�AA<�"A4�4A9�<B�=B�
B�B�Bc�:�|jj|�yr*)r��append)r,�fileNames  rr�z,urlretrieve_FileTests.registerFileForCleanUp�s�������h�'rc��tjjdtjz�}|j|dtj�|j
|dtjjd�y)Nr{rrzFdid not get an email.message.Message instance as second returned value)
rr�urlretrieverrr�r�r�r�r�)r,�results  r�
test_basicz urlretrieve_FileTests.test_basic�sb�����+�+�I�	�8H�8H�,H�I��������I�$4�$4�5����f�Q�i����)>�)>�9�	:rc�F�dtjz}|j|�tjj|j
tj�|�}|j||d�|jtjj|�d�t|d�}	|j�}|j�|j�|j|j|�y#Y�!xYw#|j�w#YwxYwxYw)N�%s.2rzcopy of the file was not made�rb)rrr�rrr�r�r�r�r�rUrWrr9r?r~)r,�second_tempr�r�r~s     r�	test_copyzurlretrieve_FileTests.test_copy�s����y�/�/�/���#�#�K�0����+�+�D�,F�,F����-�*�,������f�Q�i�0���������{�3�69�	:��K��&��	��9�9�;�D��J�J�L�����������D�)��
�D��������D�s0�3 D�D�D�D �D�D �D�D c����dgf�fd�	}dtjz}�j|�tjj�j
tj�||�y)Nrc�����j|t��j|t��j|t��j||d�|ddz|d<y)Nrr)r�r�r�)�block_count�block_read_size�	file_size�count_holderr,s    �r�
hooktesterz9urlretrieve_FileTests.test_reporthook.<locals>.hooktestersY����!�!�+�s�3��!�!�/�3�7��!�!�)�S�1����[�,�q�/�:�*�1�o��1�L��Orr�)rrr�rrr�r�)r,r�r�s`  r�test_reporthookz%urlretrieve_FileTests.test_reporthooksX���NO�S�	2��y�/�/�/���#�#�K�0����"�"��&�&�y�'7�'7�8���	%rc��g}|fd�}|j�}tjj|j	|�t
j|�|jt|�d�|j|ddd�y)Nc�,�|j|||f�yr*�r��r�r�r��_reports    rr�zAurlretrieve_FileTests.test_reporthook_0_bytes.<locals>.hooktester ����N�N�K��)�D�Errrr�	r�rrr�r�rrr�r�r,�reportr��srcFileNames    r�test_reporthook_0_bytesz-urlretrieve_FileTests.test_reporthook_0_bytesst����HN�	F��,�,�.�����"�"�4�#=�#=�k�#J����j�	*�����V��a�(�������1��q�)rc�F�g}|fd�}|jd�}tjj|j	|�t
j|�|jt|�d�|j|ddd�|j|ddd�y)Nc�,�|j|||f�yr*r�r�s    rr�zAurlretrieve_FileTests.test_reporthook_5_bytes.<locals>.hooktester-r�rsxxxxxrr�rr�r�s    r�test_reporthook_5_bytesz-urlretrieve_FileTests.test_reporthook_5_bytes(s�����HN�	F��,�,�X�6�����"�"�4�#=�#=�k�#J����j�	*�����V��a�(�������1��q�)�������1��q�)rc��g}|fd�}|jddz�}tjj|j	|�t
j|�|jt|�d�|j|ddd�|j|ddd�|j|ddd�|j|ddd�y)	Nc�,�|j|||f�yr*r�r�s    rr�zDurlretrieve_FileTests.test_reporthook_8193_bytes.<locals>.hooktester;r�r�xi �rrri r�r�s    r�test_reporthook_8193_bytesz0urlretrieve_FileTests.test_reporthook_8193_bytes6s�����HN�	F��,�,�T�D�[�9�����"�"�4�#=�#=�k�#J����j�	*�����V��a�(�������1��t�,�������1��t�,�������1��t�,�������1��t�,rN)r)rArBrCr�r�r�r�r�r�r�r�r�r�r�r%rrr�r��s=��2��0�C�� (�:�*�$%�	*�*�-rr�c��eZdZ	d�Zd�Zy)�urlretrieve_HttpTestsc��|jtjj�|j	d�d�}|jtjj�5	tjjtj|��|j�	ddd�y#|j�wxYw#1swYyxYw)N��HTTP/1.1 200 OK
Date: Wed, 02 Jan 2008 03:03:54 GMT
Server: Apache/1.3.33 (Debian GNU/Linux) mod_ssl/2.8.22 OpenSSL/0.9.7e
Connection: close
Content-Length: 100
Content-Type: text/html; charset=iso-8859-1

FF
c��yr*r%)�par1�par2�par3s   r�_reporthookzYurlretrieve_HttpTests.test_short_content_raises_ContentTooShortError.<locals>._reporthookWs��r)�
reporthook�r�rrr�rSr�r:�ContentTooShortErrorr�r�
TEST_HTTP_URLr[)r,r�s  r�.test_short_content_raises_ContentTooShortErrorzDurlretrieve_HttpTests.test_short_content_raises_ContentTooShortErrorJs���������1�1�2��
�
��	�	��
�
�v�|�|�@�@�
A�
"����*�*�7�+@�+@�6A�+�C����!�B�
A��
���!��B�
A�s$�'C�)/B2�C�2C�C�Cc��|jtjj�|j	d�|jtjj�5	tjjtj�|j�	ddd�y#|j�wxYw#1swYyxYw)Nr�r�r@s r�Atest_short_content_raises_ContentTooShortError_without_reporthookzWurlretrieve_HttpTests.test_short_content_raises_ContentTooShortError_without_reporthookas���������1�1�2��
�
��	��
�
�v�|�|�@�@�
A�
"����*�*�7�+@�+@�A����!�	B�
A�����!��	B�
A�s$�$C�&-B-�C�-B?�?C�CN)rArBrCr�r�r%rrr�r�Gs��?�"�."rr�c�D�eZdZ	d�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zy
)�QuotingTestsc�
�djgd��}tjj|�}|j	||d|�d|���tjj|�}|j	||d|�d|���y)Nr�)�ABCDEFGHIJKLMNOPQRSTUVWXYZ�abcdefghijklmnopqrstuvwxyz�
0123456789z_.-~�using quote(): � != �using quote_plus(): )�joinrr�r�r��
quote_plus)r,�do_not_quoter�s   r�test_never_quotezQuotingTests.test_never_quote�su���x�x�!)�*�����#�#�L�1������v�6B�F�K�	M����(�(��6������v�:F��O�	Qrc�r�|jtjjjdd�y)Nrr)r�rr�r��__defaults__r@s r�test_default_safezQuotingTests.test_default_safe�s'��������+�+�8�8��;�S�Arc���d}tjj||��}|j||d|�d|���tjj	||��}|j||d|�d|���tjj|d��}|j||d|�d|���tjjddd	�
�}tjjddd�
�}|j||d|�d|���tjjddd�
�}tjjddd�
�}|j||d|�d|���y)
Nz<>��safer�r�r�s<>uaüb�latin-1�ü)�encodingrr���)rr�r�r�r�)r,�quote_by_defaultr��expects    r�	test_safezQuotingTests.test_safe�s\�������#�#�$4�;K�#�L�����)�6�6F��O�	Q����(�(�)9�.>�)�@�����)�6�*�F�4�	5����#�#�$4�5�#�A�����)�6�6F��O�	Q����#�#�H�y�v�#�N�����#�#�H�y�r�#�J������� �&�*�	+����#�#�H�y�w�#�O�����#�#�H�y�r�#�J������� �&�*�	+rc���td�D�cgc]
}t|���}}|jd�|jtd��dj|�}|D]�}tj
j
|�}|jt|�|d|�dt|��d|���tj
j|�}|jt|�|d|�d	t|��d|�����~d
}d}tj
j
|�}|j||d|�d|���tj
j|�}|j||d|�d|���ycc}w)
N� z
<>#%"{}|\^[]`rr�r�z should be escaped to z, not r�z should be escapes to zab[]cdz
ab%5B%5Dcdr�)
rrr�r�rr�r�r�rr�)r,�num�should_quoterr��
partial_quote�expecteds       r�test_default_quotingz!QuotingTests.test_default_quoting�sE��-2�"�I�6�I�S��C��I��6����,�-����C��H�%��w�w�|�,�� �D��\�\�'�'��-�F����Y�t�_�f�#�I�d�O�V�=�
>��\�\�,�,�T�2�F����Y�t�_�f�#�I�d�O�V�=�
>�!�
� �
������#�#�M�2������6�6>��G�	I����(�(��7������6�;C�V�L�	N��-7s�E5c
�@�tjjd�}|j|t	d�d|�dt	d����tjjd�}|j|dd|z�d}|j
dt	d��}tjj|�}|j||d|�d|���|j
dd�}tjj|�}|j||d|�d|���y)Nr)r�r��+zusing quote_plus(): %r != +z
a b cd e fr�)rr�r�r�rr�r)r,r��givenrs    r�test_quoting_spacezQuotingTests.test_quoting_space�s������#�#�C�(�������3��6<�i��n�M�	O����(�(��-�������6��?�	A������s�I�c�N�3�����#�#�E�*�������6<�f�E�	G����s�C�(�����(�(��/�������;A�6�J�	Lrc��|jtjjd�d�|jtjjdd�d�|jtjjd�d�|jtjjdd�d�y)Nzalpha+beta gammazalpha%2Bbeta+gammarzalpha+beta+gammasalpha+beta gamma�+)r�rr�r�r@s r�test_quoting_pluszQuotingTests.test_quoting_plus�s���������0�0�1C�D�-�	/�������0�0�1C�S�I�+�	-�	
������0�0�1D�E�-�	/�	
������0�0�1C�T�J�+�	-rc�N�d}d}tjj|�}|j||d|�d|���|j	t
tjj|d��tjj
|�}|j||d|�d|���y)N���ab��%A2%D8ab%FFr�r�r�rzusing quote_from_bytes(): )rr�r�r�r��	TypeError�quote_from_bytes�r,rrr�s    r�test_quote_byteszQuotingTests.test_quote_bytes�s���!�������#�#�E�*�������6<�f�E�	G�	
���)�V�\�\�%7�%7��%.�	�	0����.�.�u�5�������"�F�,�	-rc�H�d}d}tjj|�}|j||d|�d|���tjj|dd��}|j||d|�d|���d}d}tjj|d��}|j||d|�d|���d	}d
}tjj|�}|j||d|�d|���d	}|j	t
tjj|d��d	}d}tjj|dd��}|j||d|�d|���d	}d
}tjj|dd��}|j||d|�d|���y)Nu¢Øabÿz%C2%A2%C3%98ab%C3%BFr�r��r�errorsrrr�漢字�%E6%BC%A2%E5%AD%97z%3F%3Frz%26%2328450%3B%26%2323383%3B�xmlcharrefreplace)rr�r�r�r��UnicodeEncodeErrorr!s    r�test_quote_with_unicodez$QuotingTests.test_quote_with_unicodes��� ��'�����#�#�E�*�������6<�f�E�	G����#�#�E�D��#�F�������6<�f�E�	G�!�������#�#�E�I�#�>�������6<�f�E�	G���%�����#�#�E�*�������6<�f�E�	G������,�f�l�l�.@�.@�%�-6�	�	8��������#�#�E�I�+4�$�6�������6<�f�E�	G���/�����#�#�E�I�+>�$�@�������6<�f�E�	Grc��d}d}tjj|d��}|j||d|�d|���d}d}tjj|dd	�
�}|j||d|�d|���y)Nu¢Ø ÿz
%A2%D8+%FFrrr�r�uab漢字 cdzab%3F%3F+cdrr$)rr�r�r�r!s    r�test_quote_plus_with_unicodez)QuotingTests.test_quote_plus_with_unicode1s����������(�(���(�C�������;A�6�J�	L�$�������(�(���09�)�;�������;A�6�J�	LrN)rArBrCr�rrrrrr"r*r,r%rrr�r�ts;���2Q�B�+�:N�8L�&
-�-� (G�T
Lrr�c�D�eZdZ	d�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zy
)�UnquotingTestsc	��g}td�D]�}tt|��}t|�}tjj|�}|j
||d|�d|���tjj|�}|j
||d|�d|���|j|���dj|�}~tjj|�}|j
|jd�dd|z�y)	N��using unquote(): r��using unquote_plus(): r�r
rz/using unquote(): not all characters escaped: %s)rrrrr��unquoter��unquote_plusr�r��count)r,�escape_listrrrr��
escape_strings       r�test_unquotingzUnquotingTests.test_unquotingHs�������:�C��c�#�h�'�E���X�F��\�\�)�)�%�0�F����V�V�<B�F�K�
M��\�\�.�.�u�5�F����V�V�$�f�.�
/�
���u�%������,�
�����%�%�m�4��������c�*�A�� &�'�	(rc���|jttftjj
d�|jttftjj
d�y)Nr%)r�r�AttributeErrorrr�r3r@s r�#test_unquote_rejects_none_and_tuplez2UnquotingTests.test_unquote_rejects_none_and_tuple]sD�����9�n�5�v�|�|�7K�7K�T�R����9�n�5�v�|�|�7K�7K�R�Prc���d}|}tjj|�}|j||d|�d|���d}|}tjj|�}|j||d|�d|���d}|}tjj|�}|j||d|�d|���d}t	|d�}tjj|�}|j||d|�d|���d}t	|d�}tjj|�}|j||d|�d|���d}t	|d�}tjj|�}|j||d|�d|���|j
ttftjj
d�|j
ttftjj
d�y)	Nz%xabr1r�z%xr
ry�using unquote_to_bytes(): r%)	rr�r3r�r|�unquote_to_bytesr�rr:r!s    r�test_unquoting_badpercentz(UnquotingTests.test_unquoting_badpercentas����������%�%�e�,�������"�F�*,�	-��������%�%�e�,�������"�F�*,�	-��������%�%�e�,�������"�F�*,�	-����u�g�&�����.�.�u�5�������"�F�*,�	-����u�g�&�����.�.�u�5�������"�F�*,�	-����u�g�&�����.�.�u�5�������"�F�*,�	-����9�n�5�v�|�|�7T�7T�VZ�[����9�n�5�v�|�|�7T�7T�VX�Yrc�|�d}d}tjj|�}|j||d|�d|���y)Nz%Ab%eAs��r=r��rr�r>r�r!s    r�test_unquoting_mixed_casez(UnquotingTests.test_unquoting_mixed_case�s<���������.�.�u�5�������"�F�,�	-rc��dtd�z}d}tjj|�}|j	||d|�d|���tjj|�}|j	||d|�d|���y)Nzab%sd�c�abcdr�r�r2)rrr�r3r�r4r!s    r�test_unquoting_partsz#UnquotingTests.test_unquoting_parts�su���)�C�.�(�������%�%�e�,�������6<�f�E�	G����*�*�5�1�������=C�V�L�	Nrc��d}|}tjj|�}|j||d|�d|���|j	dd�}tjj|�}|j||d|�d|���y)Nzare+there+spaces...r1r�rr)r2)rr�r3r�rr4r!s    r�test_unquoting_plusz"UnquotingTests.test_unquoting_plus�sz��%�������%�%�e�,�������8>��G�	I����s�C�(�����*�*�5�1�������=C�V�L�	Nrc���d}d}tjj|�}|j||d|�d|���tjjd�}d}|j||d|�d|���d}d}tjj|�}|j||d|�d|���d	}d}tjj|�}|j||d|�d|���y)
N�"br%C3%BCckner_sapporo_20050930.docsbrückner_sapporo_20050930.docr=r��	漢%C3%BCs漢üs%A2%D8ab%FFrs	%A2�ab%FFrAr!s    r�test_unquote_to_bytesz$UnquotingTests.test_unquote_to_bytes�s���4��8�����.�.�u�5�������"�F�,�	-����.�.�~�>��(�������"�F�,�	-���"�����.�.�u�5�������"�F�,�	-�
 ��"�����.�.�u�5�������"�F�,�	-rc�6�d}d}tjj|�}|j||d|�d|���tjj|dd��}|j||d|�d|���tjjdd��}d}|j||d|�d|���d	}d
}tjj|�}|j||d|�d|���d}d}tjj|�}|j||d|�d|���tjj|d
��}|j||d|�d|���d}d}tjj|d��}|j||d|�d|���tjjd�}d}|j||d|�d|���tjjdd��}d}|j||d|�d|���y)NrJubrückner_sapporo_20050930.docr1r�r$zbr%FCckner_sapporo_20050930.docrrr'r&z%F3%B1u�r)r%r��ignorerKu漢üu漢%FC�rr�r3r�r!s    r�test_unquote_with_unicodez(UnquotingTests.test_unquote_with_unicode�s��4��5�����%�%�e�,�������8>��G�	I����%�%�e�d�4�%�H�������8>��G�	I����%�%�&G�/8�&�:��5�������8>��G�	I�%�������%�%�e�,�������8>��G�	I��������%�%�e�,�������8>��G�	I����%�%�e�I�%�>�������8>��G�	I��������%�%�e�H�%�=�������8>��G�	I����%�%�n�5���������8>��G�	I�
���%�%�k�I�%�F���������8>��G�	Irc�l�d}d}tjj|�}|j||d|�d|���d}d}tjj|�}|j||d|�d|���d}d}tjj|�}|j||d|�d|���y)	Nsblueberryjam�blueberryjamr1r�sblåbærsyltetøyublåbærsyltetøysbl%c3%a5b%c3%a6rsyltet%c3%b8jublåbærsyltetøjrOr!s    r�test_unquoting_with_bytes_inputz.UnquotingTests.test_unquoting_with_bytes_input�s����������%�%�e�,�������8>��G�	I�7��0�����%�%�e�,�������8>��G�	I�1��0�����%�%�e�,�������8>��G�	IrN)rArBrCr8r;r?rBrFrHrLrPrSr%rrr.r.As<���(�*Q�"Z�H-�
N�
N�-�>8I�tIrr.c�V�eZdZ	d�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
d�Zy
)�urlencode_Testsc��	gd�}tjj|�}|D]}|j||d|�d|�d|���� |j	|jd�dd|�d|jd����|j
d�}||dz
}||dz}|j|j�xr|j�d|�d	|���|j	t|�d
d|�dt|��dd
���y)
N)z1st=1z2nd=2z3rd=3ztesting z: z not found in �&rz: expected 2 '&'s; got rz%: '&' not located in proper place in �z#: unexpected number of characters: r�)
rr��	urlencodersr�r5�indexr��isdigitr)	r,r�	test_type�expect_somewherer�r�amp_location�on_amp_left�on_amp_rights	         r�help_inputtypezurlencode_Tests.help_inputtypes��
	�7�����'�'��.��(�H��M�M�(�F�#�X�v�7�
8�)�	
������c�*�A�#�V�\�\�#�%6�8�	9��|�|�C�(���\�A�-�.���l�Q�.�/������+�+�-�H�,�2F�2F�2H����)�	*�	
����V��k�$�S��[�+�?�	@rc�0�|jdddd�d�y)N�1�2�3)�1st�2nd�3rdzusing dict as input type�rar@s r�test_using_mappingz"urlencode_Tests.test_using_mapping9s�����3�c��=�6�	8rc�,�|jgd�d�y)N))rfrc)rgrd)rhrez*using sequence of two-item tuples as inputrir@s r�test_using_sequencez#urlencode_Tests.test_using_sequence>s�����F�H�	Jrc��ddi}td��dtd���}tjj|�}|j	||�ddi}d}tjj|�}|j	||�y)NrW�=zkey namezA bunch of pluseszkey+name=A+bunch+of+pluses)rrr�rYr�r!s    r�test_quotingzurlencode_Tests.test_quotingCsu���S�	��%�c�N�I�c�N�;�����'�'��.�������(��/�0��-�����'�'��.�������(rc��dgd�i}dtjjtgd���z}tjj	|�}|j||�tjj	|d�}|dD]}d|z}|j
||��|j|jd�dd|jd�z�y)N�sequence)rcrdrezsequence=%sTrWrzExpected 2 '&'s, got %s)rr�r�r�rYr�rsr5)r,rrr��values     r�
test_doseqzurlencode_Tests.test_doseqNs����O�,������!8�!8��_�9M�!N�N�����'�'��.�������(����'�'��t�4���:�&�E�"�U�*�F��M�M�&�&�)�'�	
������c�*�A�2�V�\�\�#�5F�F�	Hrc��|jdtjji��|jdtjjg��yrz�r�rr�rYr@s r�test_empty_sequencez#urlencode_Tests.test_empty_sequence[s@������V�\�\�3�3�B�7�8�����V�\�\�3�3�B�7�8rc���|jdtjjddi��|jdtjjddi��y)Nza=1�arza=Nonerur@s r�test_nonstring_valuesz%urlencode_Tests.test_nonstring_values_sH��������� 6� 6��Q�x� @�A�����6�<�<�#9�#9�3��+�#F�Grc�f�|jdtjjdddgid��|jdtjjdddgid��t	j
ddg�}|jd	tjjd|id��y)
Nza=1&a=2rxrrTz
a=None&a=a)rxr)�brza=a&a=b)r�rr�rYr�r�)r,rs  r�test_nonstring_seq_valuesz)urlencode_Tests.test_nonstring_seq_valuescs�������F�L�L�$:�$:�C�!�Q��=�$�$O�P��������/�/��t�S�k�0B�D�I�	K��&�&��(�';�<���������/�/��d��T�B�	Drc�L�d}d}tjj|dd��}|j||�d}d}tjj|�}|j||�d}d}tjj|d�	�}|j||�y)
N�)� �Á�%3F=%3Frorr$�
%C2%A0=%C3%81�%A0=%C1rr�rr�rYr�r!s    r�test_urlencode_encodingz'urlencode_Tests.test_urlencode_encodingks���'�������'�'���	�'�R�������(�(�� �����'�'��.�������(�(�������'�'��	�'�B�������(rc��d}d}tjj|ddd��}|j||�d}d}tjj|ddd�	�}|j||�d}d
}tjj|d�}|j||�d}d}tjj|d�}|j||�d}d
}tjj|dd��}|j||�d}d}tjj|dd��}|j||�y)Nr~r�Tror)�doseqrr%))r)rr�z
%3F=1&%3F=%3Fr$r�))r)�*r�z%C2%A0=42&%C2%A0=%C3%81r�rrz%A0=42&%A0=%C1r�r!s    r�test_urlencode_encoding_doseqz-urlencode_Tests.test_urlencode_encoding_doseq~sL��'�������'�'��T�18��(�L�������(�-�� �����'�'��t�18��(�L�������(�(�� �����'�'��t�4�������(�-��*�����'�'��t�4�������(�(�������'�'��t�i�'�H�������(�-��!�����'�'��t�i�'�H�������(rc�>�d}d}tjj|�}|j||�tjj|d�}|j||�d}d}tjj|d�}|j||�y)N�)��$��$z
%A0%24=%C1%24T))r�)r�r�z%A0%24=42&%A0%24=%C1%24r�r!s    r�test_urlencode_bytesz$urlencode_Tests.test_urlencode_bytes�s���-�� �����'�'��.�������(����'�'��t�4�������(�4��*�����'�'��t�4�������(rc��d}tjj|d��}d}|j||�d}tjj|dd��}d}|j||�d}d}tjj|dd��}|j||�d}tjj|dd	�
�}d}|j||�d}d}tjj|ddd	��}d}d}tjj|ddd	�
�}|j||�y)Nr�z:$rz	%A0$=%C1$T)r�r))r�)r��
r�z%A0$=%C1$&%A0$=13&%A0$=42r)rr)r�rrr�)r,rr�rs    r�&test_urlencode_encoding_safe_parameterz6urlencode_Tests.test_urlencode_encoding_safe_parameter�sI��
.�����'�'��D�'�9���������(�-�����'�'��T��'�E���������(�9��,�����'�'��t�$�'�?�������(�.�����'�'��D�1:�(�<���������(�-�������'�'��T��1:�(�<��9��,�����'�'��t�$�1:�(�<�������(rN)rArBrCrarjrlrorsrvryr|r�r�r�r�r%rrrUrUsH���@�@8�
J�
	)�H�9�H�D�)�&#)�J)�&)rrUc���eZdZ	d�Zd�Zejejdk(d�d��Z	ejejdk(d�d��Zejejd�d	��Zejejdk(d�d
��Zejejdk(d�d��Zejejd�d��Zy
)�Pathname_Testsc�,�tjjdddd�}d}tjj|�}|j
||d|�d|���tjj|�}|j
||d|�d|���y)	N�parts�ofrxrUzparts/of/a/path�pathname2url() failed; r�zurl2pathame() failed; )r�rUr�rrr�r��url2pathname)r,�
expected_path�expected_urlr�s    rr�zPathname_Tests.test_basic�s��������W�d�C��@�
�(�����,�,�]�;������v� �,�0�	1����,�,�\�:������� �-�1�	2rc��tjjddd�}dtjjd�z}tjj|�}|j||d|�d|���|}tjj|�}|j||d|�d|���tjjdd	�}d
tjjd�z}tjj|�}|j||d|�d|���d}tjjdd
�}tjj|�}|j||d|�d|���y)N�needszquot=ing�herez
needs/%s/herer�r�zurl2pathname() failed; z	make sure�using_quotez%s/using_quotezmake+sure/using_unquotez	make+sure�
using_unquote)
r�rUr�rr�r�rr�r�r�r!s    rrozPathname_Tests.test_quoting�sD�������W�j�&�9�� �6�<�<�#5�#5�j�#A�A�����,�,�U�3������� �&�*�	+������,�,�V�4������� �&�*�	+������[�-�8��!�F�L�L�$6�$6�{�$C�C�����,�,�U�3������� �&�*�	+�*�������k�?�;�����,�,�U�3������� �&�*�	+r�win32z#test specific to Windows pathnames.c��tjj}|j|d�d�|j|d�d�|j|d�d�|j|d�d�|j|d	�d
�|j|d�d�|j|d
�d�|j|d�d�|j|d�d�|j|d�d�|j	t
|d�|j|d�d�|j|d�d�|j|d�d�|j|d�d�|j|d�d�|j|d �d!�|j|d"�d
�|j|d�d�|j|d#�d�|j|d$�d�gd%�}|D]7}|j|tjj
|��|��9y)&Nz
\\?\C:\dirz	///C:/dirz\\?\unc\server\share\dirz//server/share/dir�C:�///C:�C:\�///C:/zC:\a\b.cz///C:/a/b.cz	C:\a\b.c\z///C:/a/b.c/z	C:\a\\b.cz///C:/a//b.cz	C:\a\b%#cz///C:/a/b%25%23cuC:\a\béz///C:/a/b%C3%A9�C:\foo\bar\spam.foo�///C:/foo/bar/spam.foozXX:\z
\folder\test\�
/folder/test/z\\folder\test\z//folder/test/z\\\folder\test\z///folder/test/z
\\some\share\z
//some/share/z\\some\share\a\b.cz//some/share/a/b.cu\\some\share\a\b%#céz//some/share/a/b%25%23c%C3%A9zC:/a/b.cz
//?/C:/dirz//?/unc/server/share/dir)r�r�r�)rrr�r�r��IOErrorr�)r,�fn�urlsrs    r�test_pathname2url_winz$Pathname_Tests.test_pathname2url_wins���^�^�
(�
(������,�-�{�;�����<�=�?S�T�����D��7�+�����F��X�.�����L�)�=�9�����N�+�^�<�����N�+�^�<�����M�*�,>�?�����N�+�->�?�����4�5�7O�P����'�2�w�/�����.�/��A�����0�1�3C�D�����2�3�5F�G�����/�0�/�B�����5�6�8L�M�����:�;�=\�]�����J���7�����0�1�3G�H�����L�)�;�7�����6�7�9M�N�*���C����R���� ;� ;�C� @�A�3�G�rz test specific to POSIX pathnamesc�X�tjj}|j|d�d�|j|d�d�|j|d�d�|j|d�d�|j|d�d�|j|d�d	�y)
Nrz/a/b.cz//a/b.cz	////a/b.cz///a/b.cz
/////a/b.cz//////a/b.cz/a/b%#cz/a/b%25%23c)rrr�r��r,r�s  r�test_pathname2url_posixz&Pathname_Tests.test_pathname2url_posix(s����^�^�
(�
(������C��#�&�����H��x�0�����I���4�����J���6�����K��-�8�����I��
�6rzneed os_helper.FS_NONASCIIc�.�tj�}tj�}tjjtj||��}|jtjjtj�|�y�Nr$)�sys�getfilesystemencoding�getfilesystemencodeerrorsrr�r�r�FS_NONASCIIr�rr��r,rr%rs    r�test_pathname2url_nonasciiz)Pathname_Tests.test_pathname2url_nonascii3se���,�,�.���.�.�0���l�l� � ��!6�!6��RX� �Y��������4�4�Y�5J�5J�K�S�Qrc�f�tjj}|j|d�d�|j|d�d�|j|d�d�|j|d�d�|j|d�d�|j|d	�d
�|j|d�d�|j|d
�d�|j|d�d�|j|d�d�|j|d�d�|j|d�d�|j|d�d�|j|d�d�|j|d�d�|j	t
|d�|j|d�d�|j|d�d�|j|d�d�|j|d�d�|j|d �d�|j|d!�d"�|j|d#�d�|j|d$�d%�|j|d&�d'�gd(�}|D]7}|j|tjj
|��|��9y))Nz/C:/r�z///C|r�r�r�z/C|//zC:\\z
///C|/pathzC:\pathz
///C/test/z\C\test\z////C/test/z	\\C\test\zC:/path/to/filezC:\path\to\filezC:/path/to/file/zC:\path\to\file\zC:/path/to//filezC:\path\to\\filezC|/path/to/filez/C|/path/to/filez///C|/path/to/filez///C|/foo/bar/spam.foor�u///è|/z//server/path/to/filez\\server\path\to\filez////server/path/to/filez/////server/path/to/filez//localhost/C:/path/to/filez//localhost/C|/path/to/filez//localhost/path/to/filez
\path\to\filez //localhost//server/path/to/filezC:/foo%2fbarz
C:\foo/barz//server/share/foo%2fbarz\\server\share\foo/bar)r�z	\C\test\\r�)rrr�r�r�r�r�)r,r��pathsrUs    r�test_url2pathname_winz$Pathname_Tests.test_url2pathname_win:sm���^�^�
(�
(������F��V�,�����G��d�+�����G��d�+�����H��v�.�����G��h�/�����L�)�:�6�����L�)�=�9�����M�*�O�<�����-�.�0D�E�����.�/�1G�H�����.�/�1G�H�����-�.�0D�E�����.�/�1E�F�����0�1�3G�H�����4�5�7O�P����'�2�}�5�����3�4�6R�S�����5�6�8T�U�����6�7�9U�V�����9�:�<P�Q�����9�:�<P�Q�����6�7�9K�L�����>�?�A]�^�����N�+�]�;�����6�7�9U�V�)���D����R���� ;� ;�D� A�B�D�I�rc�(�tjj}|j|d�d�|j|d�d�|j|d�d�|j|d�d�|j|d�d�y)Nz/foo/barz	//foo/barz
///foo/barz////foo/barz//localhost/foo/bar)rrr�r�r�s  r�test_url2pathname_posixz&Pathname_Tests.test_url2pathname_posixds{���^�^�
(�
(������J���4�����K��+�6�����L�)�:�6�����M�*�K�8�����1�2�J�?rc��tj�}tj�}tj}|jtjj|�tj�tjj|||��}|jtjj|�tj�yr�)r�r�r�rr�r�rrr�r�r�r�s    r�test_url2pathname_nonasciiz)Pathname_Tests.test_url2pathname_nonasciins����,�,�.���.�.�0���#�#��������4�4�S�9�9�;P�;P�Q��l�l� � ��x�� �G��������4�4�S�9�9�;P�;P�QrN)rArBrCr�ror�r�r��platformr��skipIfr�rr�r�r�r�r�r%rrr�r��s-��0�2�+�6�X�������0�>�@� H�@� H�D�X�_�_�S�\�\�W�,�7�9�7�9�7��X����.�.�0L�M�R�N�R��X�������0�>�@�&J�@�&J�P�X�_�_�S�\�\�W�,�7�9�@�9�@��X����.�.�0L�M�R�N�Rrr�c��eZdZ	d�Zy)�
Utility_Testsc�j�	|jtjj�t�yr*)r�rr�thishost�tupler@s r�
test_thishostzUtility_Tests.test_thishostzs"��O����f�n�n�5�5�7��?rN)rArBrCr�r%rrr�r�ws��G�@rr�c��eZdZ	d�Zej
e��d��Zej
e��d��Zej
e��d��Z	y)�URLopener_Testsc�B�Gd�dtjj�}tjdt
f�5|j
|�jd�d�|j
|�jd�d�ddd�y#1swYyxYw)Nc��eZdZd�Zy)�8URLopener_Tests.test_quoted_open.<locals>.DummyURLopenerc��|Sr*r%�r,rs  r�	open_spamzBURLopener_Tests.test_quoted_open.<locals>.DummyURLopener.open_spam�����
rN)rArBrCr�r%rr�DummyURLopenerr�����
rr�z8DummyURLopener style of invoking requests is deprecated.zspam://example/ /z//example/%20/z,spam://c:|windows%/:=&?~#+!$,;'@()*[]|/path/z'//c:|windows%/:=&?~#+!$,;'@()*[]|/path/)rrr{rr#r$r�r)r,r�s  r�test_quoted_openz URLopener_Tests.test_quoted_open�s���	�V�^�^�5�5�	��
+�
+�K�"�$�%�
���^�-�2�2�#�%�%5�
7�
���^�-�2�2�>�@�9�
;�%�%�%�s�A
B�B)�categoryc���tj�5}tj|��\}}t	j
|�dtjj|�z}tjj�j|�\}}|jtjj|�tjj|��ddd�y#1swYyxYw)N)�dirzfile:)r�temp_dirrSrTr�r?rrr�r{�retriever�rU�normcase)r,�tmpdirrY�tmpfile�fileurlrL�_s       r�test_urlopener_retrieve_filez,URLopener_Tests.test_urlopener_retrieve_file�s���
�
�
�
!�V�"�*�*�v�6�K�B���H�H�R�L����� ;� ;�G� D�D�G� �.�.�2�2�4�=�=�g�F�K�H�a����R�W�W�-�-�h�7����9I�9I�'�9R�S�
"�
!�
!�s�C
C+�+C4c�$�d}|jd�|j|j�tjj�j
|�\}}|jtjj|�dd�y)Nzhttp://www.python.org/file.txtr
rz.txt)rSr�r[rrr{r�r�r�rU�splitext)r,rrLr�s    r�test_urlopener_retrieve_remotez.URLopener_Tests.test_urlopener_retrieve_remote�si��.���
�
�6�7�������(��n�n�.�.�0�9�9�#�>���!�������)�)�(�3�A�6��?rc�B�Gd�dtjj�}dD]�}|jttjj
|�|jttjj�j|�|jttjj�j|�|jt|�j|�|jt|�j|���y)Nc��eZdZd�Zy)�<URLopener_Tests.test_local_file_open.<locals>.DummyURLopenerc��|Sr*r%r�s  r�open_local_filezLURLopener_Tests.test_local_file_open.<locals>.DummyURLopener.open_local_file�r�rN)rArBrCr�r%rrr�r��r�rr�)zlocal_file://examplezlocal-file://example)rrr{r�rHr!rr�)r,r�rs   r�test_local_file_openz$URLopener_Tests.test_local_file_open�s���	�V�^�^�5�5�	�D�C����g�v�~�~�'=�'=�s�C����g�v�~�~�'?�'?�'A�'F�'F��L����g�v�~�~�'?�'?�'A�'J�'J�C�P����g�~�'7�'<�'<�c�B����g�~�'7�'@�'@�#�F�DrN)
rArBrCr�r�ignore_warningsr$r�r�r�r%rrr�r�sy��>�
;�%�_�$�$�.@�A�T�B�T�%�_�$�$�.@�A�@�B�@�%�_�$�$�.@�A�
G�B�
Grr�c��eZdZ	d�Zd�Zy)�RequestTestsc���tjj}|d�}|j|j	�d�|di�}|j|j	�d�y)Nr
r��POST)rr�Requestr��
get_method�r,r�rs   r�test_default_valuesz RequestTests.test_default_values�s[���.�.�(�(���1�2������+�+�-�u�5��1�2�6������+�+�-�v�6rc���tjj}|dd��}|j|jd�|j|j�d�|did��}|j|jd�|j|j�d�|dd��}|j|j�d�d|_|j|j�d�y)Nr
�HEAD)�methodr�)rrr�r�r�r�r�s   r�test_with_method_argz!RequestTests.test_with_method_arg�s����.�.�(�(���1�&�A���������0�����+�+�-�v�6��1�2�f�E���������0�����+�+�-�v�6��1�%�@������+�+�-�u�5��������+�+�-�v�6rN)rArBrCr�r�r%rrr�r��s��0�7�7rr��__main__)NNr\)6�urllib.parser�urllib.request�urllib.error�http.clientrP�
email.messager�r7r��
unittest.mockrrhr�test.supportrrrrr�r��ImportErrorr�rS�base64r	r��has_gethostname�SkipTestrrr!rrSrprUr^�TestCaserwr�r�rr�r�r�r�r.rUr�r�r�r�rA�mainr%rr�<module>rs���A������	����"�&�(�.�	��������$�$�
�(�
�
�9�
:�:���
�
&� /�,�^<�F�<�;�6�;�(ZR��)�)�ZR�zD9��"�"�D9�N!C�� 1� 1�!C�HK��)�)�=�,�K�\UE��)�)�UE�nH-�H�-�-�H-�V*"�H�-�-�}�*"�ZJL�8�$�$�JL�ZRI�X�&�&�RI�jA)�h�'�'�A)�F\R�X�&�&�\R�|@�H�%�%�@�/G�m�X�%6�%6�/G�d7�8�$�$�7�0�z���H�M�M�O���m5��
�C��s�G#�#G.�-G.