Server : LiteSpeed
System : Linux server51.dnsbootclub.com 4.18.0-553.62.1.lve.el8.x86_64 #1 SMP Mon Jul 21 17:50:35 UTC 2025 x86_64
User : nandedex ( 1060)
PHP Version : 8.1.33
Disable Function : NONE
Directory :  /opt/cppython/lib/python3.8/lib2to3/fixes/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]


Current File : //opt/cppython/lib/python3.8/lib2to3/fixes/__pycache__/fix_urllib.cpython-38.opt-2.pyc
U

?��g� �@s�ddlmZmZddlmZmZmZmZmZm	Z	m
Z
ddddddd	d
dgfdd
ddddddddddddddgfddgfgddddd d!d"d#d$d%d&d'd(d)d*d+d,d-d.d/d0d1d2d3d4gfdd5d6gfgd7�Zed8�ed9d:�d;d<�Z
Gd=d>�d>e�Zd?S)@�)�
alternates�
FixImports)�Name�Comma�
FromImport�Newline�find_indentation�Node�symszurllib.requestZ	URLopenerZFancyURLopener�urlretrieveZ
_urlopener�urlopen�
urlcleanup�pathname2url�url2pathnamezurllib.parse�quote�
quote_plus�unquote�unquote_plus�	urlencodeZ	splitattrZ	splithostZ
splitnportZsplitpasswdZ	splitportZ
splitqueryZsplittagZ	splittypeZ	splituserZ
splitvaluezurllib.error�ContentTooShortErrorZinstall_openerZbuild_openerZRequestZOpenerDirectorZBaseHandlerZHTTPDefaultErrorHandlerZHTTPRedirectHandlerZHTTPCookieProcessorZProxyHandlerZHTTPPasswordMgrZHTTPPasswordMgrWithDefaultRealmZAbstractBasicAuthHandlerZHTTPBasicAuthHandlerZProxyBasicAuthHandlerZAbstractDigestAuthHandlerZHTTPDigestAuthHandlerZProxyDigestAuthHandlerZHTTPHandlerZHTTPSHandler�FileHandlerZ
FTPHandlerZCacheFTPHandlerZUnknownHandler�URLError�	HTTPError)�urllib�urllib2rr�ccsvt�}t��D]b\}}|D]T}|\}}t|�}d||fVd|||fVd|Vd|Vd||fVqqdS)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!�7/opt/cppython/lib/python3.8/lib2to3/fixes/fix_urllib.py�
build_pattern0s(�����r#c@s4eZdZdd�Zdd�Zdd�Zdd�Zd	d
�ZdS)�	FixUrllibcCsd�t��S)N�|)�joinr#)�selfr!r!r"r#IszFixUrllib.build_patterncCsv|�d�}|j}g}t|jdd�D] }|�t|d|d�t�g�q&|�tt|jdd|d��|�|�dS)N�module���r��prefix)	�getr+r�value�extendrr�append�replace)r'�node�resultsZ
import_mod�pref�names�namer!r!r"�transform_importLs
 zFixUrllib.transform_importcCs&|�d�}|j}|�d�}|r�t|t�r0|d}d}t|jD]}|j|dkr>|d}q^q>|rv|�t||d��n|�|d��n�g}i}	|d}
|
D]�}|j	t
jkr�|jdj}|jdj}n
|j}d}|d	kr�t|jD]B}||dkr�|d|	k�r|�
|d�|	�|dg��
|�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)N�
mod_member�memberrrr*�!This is an invalid module elementr ��,TcSsX|jtjkrHt|jdj|d�|jd��|jd��g}ttj|�gSt|j|d�gS)Nrr*rr:)�typer
�import_as_namer�childrenr-Zcloner	)r5r+Zkidsr!r!r"�handle_name�s�z/FixUrllib.transform_member.<locals>.handle_namer)FzAll module elements are invalid)r,r+�
isinstance�listrr-r0r�cannot_convertr<r
r=r>r/�
setdefaultrr.rr�parent�endswithr)r'r1r2r7r3r8�new_namer�modulesZmod_dictr Zas_name�member_nameZ	new_nodesZindentation�firstr?r(Zeltsr4Zelt�newZnodesZnew_noder!r!r"�transform_member\sh




zFixUrllib.transform_membercCs~|�d�}|�d�}d}t|t�r*|d}t|jD]}|j|dkr4|d}qTq4|rn|�t||jd��n|�|d�dS)N�bare_with_attrr8rrr*r9)	r,r@rArr-r0rr+rB)r'r1r2Z
module_dotr8rFrr!r!r"�
transform_dot�s


�
zFixUrllib.transform_dotcCsz|�d�r|�||�n^|�d�r0|�||�nF|�d�rH|�||�n.|�d�r`|�|d�n|�d�rv|�|d�dS)Nr(r7rLZmodule_starzCannot handle star imports.Z	module_asz#This module is now multiple modules)r,r6rKrMrB)r'r1r2r!r!r"�	transform�s




zFixUrllib.transformN)�__name__�
__module__�__qualname__r#r6rKrMrNr!r!r!r"r$Gs
Lr$N)Zlib2to3.fixes.fix_importsrrZlib2to3.fixer_utilrrrrrr	r
rr/r#r$r!r!r!r"�<module>s|$������
�����!

F1le Man4ger