⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.118
Server IP:
97.74.87.16
Server:
Linux 16.87.74.97.host.secureserver.net 5.14.0-503.38.1.el9_5.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Apr 18 08:52:10 EDT 2025 x86_64
Server Software:
Apache
PHP Version:
8.2.28
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
usr
/
lib64
/
python3.9
/
lib2to3
/
fixes
/
__pycache__
/
View File Name :
fix_urllib.cpython-39.opt-1.pyc
a �����DOg� ����������������������@���s����d�Z�ddlmZmZ�ddlmZmZmZmZm Z m Z mZ�dg�d�fdg�d�fdd gfgdg�d �fdddgfgd �Zed�� ed�d���dd��ZG�dd��de�ZdS�)z�Fix changes imports of urllib which are now incompatible. This is rather similar to fix_imports, but because of the more complex nature of the fixing for urllib, it has its own fixer. �����)� alternates� FixImports)�Name�Comma� FromImport�Newline�find_indentation�Node�symszurllib.request) Z URLopenerZFancyURLopener�urlretrieveZ _urlopener�urlopen� urlcleanup�pathname2url�url2pathname� getproxieszurllib.parse)�quote� quote_plus�unquote�unquote_plus� urlencode� splitattr� splithost� splitnport�splitpasswd� splitport� splitquery�splittag� splittype� splituser� splitvaluezurllib.error�ContentTooShortError)r���Zinstall_openerZbuild_openerZRequestZOpenerDirectorZBaseHandlerZHTTPDefaultErrorHandlerZHTTPRedirectHandlerZHTTPCookieProcessorZProxyHandlerZHTTPPasswordMgrZHTTPPasswordMgrWithDefaultRealmZAbstractBasicAuthHandlerZHTTPBasicAuthHandlerZProxyBasicAuthHandlerZAbstractDigestAuthHandlerZHTTPDigestAuthHandlerZProxyDigestAuthHandlerZHTTPHandlerZHTTPSHandler�FileHandlerZ FTPHandlerZCacheFTPHandlerZUnknownHandler�URLError� HTTPError)�urllib�urllib2r%���r$�������c������������������c���sv���t���}�t���D�]b\}}|D�]T}|\}}t|�}d||f�V��d|||f�V��d|�V��d|�V��d||f�V��qqd�S�)Nz�import_name< 'import' (module=%r | dotted_as_names< any* module=%r any* >) > z�import_from< 'from' mod_member=%r 'import' ( member=%s | import_as_name< member=%s 'as' any > | import_as_names< members=any* >) > zIimport_from< 'from' module_star=%r 'import' star='*' > ztimport_name< 'import' dotted_as_name< module_as=%r 'as' any > > zKpower< bare_with_attr=%r trailer< '.' member=%s > any* > )�set�MAPPING�itemsr���)ZbareZ old_moduleZchanges�changeZ new_module�members��r,����0/usr/lib64/python3.9/lib2to3/fixes/fix_urllib.py� build_pattern0���s(���������r.���c�������������������@���s4���e�Zd�Zdd��Zdd��Zdd��Zdd��Zd d ��ZdS�)� FixUrllibc�����������������C���s���d��t���S�)N�|)�joinr.���)�selfr,���r,���r-���r.���I���s����zFixUrllib.build_patternc�����������������C���sv���|��d�}|j}g�}t|j�dd��D�] }|�t|d�|d�t��g��q&|�tt|j�d�d�|d���|�|��dS�)z�Transform for the basic import case. Replaces the old import name with a comma separated list of its replacements. �moduleN���r�����prefix) �getr6���r(����value�extendr���r����append�replace)r2����node�resultsZ import_mod�pref�names�namer,���r,���r-����transform_importL���s���� zFixUrllib.transform_importc�����������������C���s&��|��d�}|j}|��d�}|r�t|t�r0|d�}d}t|j�D�]}|j|d�v�r>|d�}�q^q>|rv|�t||d���n|��|d���n�g�}i�} |d�} | D�]�}|j t jkr�|jd �j}|jd�j}n |j}d}|d kr�t|j�D�]B}||d�v�r�|d�| v�r|� |d���| �|d�g��� |��q�q�g�} t|�}d}dd ��}|D�]�}| |�}g�}|dd��D�]"}|�|||���|� t�����q^|�||d�|���t||�}|�r�|jj�|��r�||_| � |��d}�qB| �rg�}| dd��D�]}|�|t��g���q�|� | d���|�|��n|��|d��dS�)z�Transform for imports of specific module elements. Replaces the module to be imported from with the appropriate new module. � mod_member�memberr���Nr&���r5����!This is an invalid module elementr+��������,Tc�����������������S���sX���|�j�tjkrHt|�jd�j|d�|�jd����|�jd����g}ttj|�gS�t|�j|d�gS�)Nr���r5���r&���rE���)�typer ����import_as_namer����childrenr8���Zcloner ���)r@���r6���Zkidsr,���r,���r-����handle_name����s�����z/FixUrllib.transform_member.<locals>.handle_namer4���FzAll module elements are invalid)r7���r6���� isinstance�listr(���r8���r;���r����cannot_convertrG���r ���rH���rI���r:���� setdefaultr���r9���r���r����parent�endswithr���)r2���r<���r=���rB���r>���rC����new_namer*����modulesZmod_dictr+���Zas_name�member_nameZ new_nodesZindentation�firstrJ���r3����eltsr?����elt�newZnodesZnew_noder,���r,���r-����transform_member\���sh���� zFixUrllib.transform_memberc�����������������C���s~���|��d�}|��d�}d}t|t�r*|d�}t|j�D�]}|j|d�v�r4|d�}�qTq4|rn|�t||jd���n|��|d��dS�)z.Transform for calls to module members in code.�bare_with_attrrC���Nr���r&���r5���rD���) r7���rK���rL���r(���r8���r;���r���r6���rM���)r2���r<���r=���Z module_dotrC���rQ���r*���r,���r,���r-���� transform_dot����s���� � zFixUrllib.transform_dotc�����������������C���sz���|��d�r|��||��n^|��d�r0|��||��nF|��d�rH|��||��n.|��d�r`|��|d��n|��d�rv|��|d��d�S�)Nr3���rB���rY���Zmodule_starzCannot handle star imports.Z module_asz#This module is now multiple modules)r7���rA���rX���rZ���rM���)r2���r<���r=���r,���r,���r-���� transform����s���� zFixUrllib.transformN)�__name__� __module__�__qualname__r.���rA���rX���rZ���r[���r,���r,���r,���r-���r/���G���s ���Lr/���N)�__doc__Zlib2to3.fixes.fix_importsr���r���Zlib2to3.fixer_utilr���r���r���r���r���r ���r ���r(���r:���r.���r/���r,���r,���r,���r-����<module>���s.���$���� ����!