Your IP : 216.73.216.196
�
�#�j+$ � �� � d dl Zd dlZd dlZd dlZd dlZd dlZd dl Z d dl
mZ d dlm
Z
d dlmZ d dlmZ d dlmZ d dlmZ d dlZ d dlZd dlZd dlZd dlmZ d dlZej6 s e j8 d � �d
� Zdad/d�Zd� Z d0d
�Z! G d� de"� Z# G d� de"� Z$ G d� de jJ � Z& G d� de jJ � Z' G d� de jJ � Z( G d� de jJ e#e$� Z) G d� de jJ � Z* G d� de jJ � Z+ G d� de jJ e#� Z, G d � d!e jJ � Z- G d"� d#e jJ � Z. G d$� d%e jJ � Z/ G d&� d'e jJ � Z0 G d(� d)e jJ � Z1 G d*� d+e#e jJ � Z2 G d,� d-e jJ � Z3e4d.k( r e jj � yy# e$ r dZY ���w xY w)1� N)�patch)�support)� os_helper)�
socket_helper)�warnings_helper)�control_characters_c0)� b64encodeztest requires gethostname()c �~ � t t | � � dd j � }t |� dk( rd|z }d|z S )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 �� � |�!t j j |�� }nt s
t � }|ant }|�|j | � S |j | |� S )N)�proxies)�urllib�request�FancyURLopener�
_urlopener�open)�url�datar �openers r �urlopenr! + s\ � �8������.�.�w�.�?��
��!���
����|��{�{�3����{�{�3��%�%r c � � t j dt f� 5 t j j � cd d d � S # 1 sw Y y xY w)Nz8FancyURLopener style of invoking requests is deprecated.)r �check_warnings�DeprecationWarningr r r � r r r r ; s= � � � '� '�
G��
�
!� �~�~�,�,�.�
!�
!�
!�s �A�A
c � ���� G �fd�dt j � � G ��fd�dt j j � �| �_ �S )Nc �8 �� e Zd ZdZ� fd�Zd� Zdd�Zdd�Zd� Zy) �fakehttp.<locals>.FakeSocketr c � �� |�_ y �N)�buf)�selfr �FakeHTTPConnections �r �sendallz$fakehttp.<locals>.FakeSocket.sendallF s �� �%)��"r c �0 � | xj dz
c_ | S )Nr )�io_refs)r, �args�kwdss r �makefilez%fakehttp.<locals>.FakeSocket.makefileI s � ��L�L�A��L��Kr Nc �\ � | j ryt j j | |� S �Nr )�closed�io�BytesIO�read)r, �amts r r9 z!fakehttp.<locals>.FakeSocket.readM s! � ��{�{���:�:�?�?�4��-�-r c �\ � | j ryt j j | |� S r5 )r6 r7 r8 �readline)r, �lengths r r<