Sh3ll
OdayForums


Server : LiteSpeed
System : Linux premium163.web-hosting.com 4.18.0-513.18.1.lve.el8.x86_64 #1 SMP Thu Feb 22 12:55:50 UTC 2024 x86_64
User : infihsqw ( 644)
PHP Version : 8.1.29
Disable Function : NONE
Directory :  /usr/lib64/python3.8/distutils/command/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //usr/lib64/python3.8/distutils/command/__pycache__/register.cpython-38.opt-2.pyc
U

e5d�-�@s`ddlZddlZddlZddlZddlmZddlmZddl	Tddl
mZGdd�de�ZdS)�N)�warn)�
PyPIRCCommand)�*)�logc@s�eZdZdZejddgZejdddgZddd	�fgZd
d�Zdd
�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zdd�Zdd�Zddd�ZdS) �registerz7register the distribution with the Python package index)�list-classifiersNz list the valid Trove classifiers)�strictNzBWill stop the registering if the meta-data are not fully compliant�verifyrr�checkcCsdS)NT���selfrr�2/usr/lib64/python3.8/distutils/command/register.py�<lambda>�zregister.<lambda>cCst�|�d|_d|_dS)Nr)r�initialize_options�list_classifiersrrrrrrs
zregister.initialize_optionscCs*t�|�d|jfdd�}||jjd<dS)Nr)r�)r�restructuredtextr
)r�finalize_optionsr�distributionZcommand_options)r
Z
check_optionsrrrr$s

�zregister.finalize_optionscCsT|��|��|��D]}|�|�q|jr8|��n|jrH|��n|��dS)N)	r�_set_configZget_sub_commandsZrun_commandZdry_run�verify_metadatar�classifiers�
send_metadata)r
Zcmd_namerrr�run+s

zregister.runcCs8tdt�|j�d�}|��|j|_d|_|��dS)Nzddistutils.command.register.check_metadata is deprecated,               use the check command insteadr
r)r�PendingDeprecationWarningrZget_command_objZensure_finalizedrrr)r
r
rrr�check_metadata:s�zregister.check_metadatacCsz|��}|ikr@|d|_|d|_|d|_|d|_d|_n6|jd|jfkr^td|j��|jdkrp|j|_d|_dS)	N�username�password�
repository�realmTZpypiz%s not found in .pypircF)Z_read_pypircrrr r!�
has_configZDEFAULT_REPOSITORY�
ValueError)r
ZconfigrrrrDs




zregister._set_configcCs*|jd}tj�|�}t�|�|��dS)Nz?:action=list_classifiers)r �urllib�requestZurlopenr�info�_read_pypi_response)r
ZurlZresponserrrrUs
zregister.classifierscCs&|�|�d��\}}t�d||�dS)Nr	�Server response (%s): %s)�post_to_server�build_post_datarr&)r
�code�resultrrrr\szregister.verify_metadatac
Cs�|jrd}|j}|j}nd}d}}d��}||krd|�dtj�t�}|sRd}q,||kr,td�q,|dk�rl|s|td�}qn|s�t	�	d�}q|t
j��}t
j
�|j�d	}|�|j|||�|�|�d
�|�\}}|�d||ftj�|dk�r�|j�r||j_nf|�d
tj�|�d|��tj�d}|��dk�rNtd�}|�s*d}�q*|��dk�r�|�||��nl|dk�r�ddi}	d|	d<|	d<|	d<d|	d<|	d�s�td�|	d<�q�|	d|	dk�r0|	d�s�t	�	d�|	d<�q�|	d�st	�	d�|	d<�q�|	d|	dk�r�d|	d<d|	d<td��q�|	d�sJtd�|	d<�q0|�|	�\}}|dk�rrt�d||�nt�d�t�d�nP|d k�r�dd!i}	d|	d<|	d�s�td"�|	d<�q�|�|	�\}}t�d||�dS)#N�1�x�z1 2 3 4z�We need to know who you are, so please choose either:
 1. use your existing login,
 2. register as a new user,
 3. have the server generate a new password for you (and email it to you), or
 4. quit
Your selection [default 1]: z&Please choose one of the four options!z
Username: z
Password: rZsubmitr(��zAI can store your PyPI login so future submissions will be faster.z (the login will be stored in %s)�XZynzSave your login (y/N)?�n�y�2�:action�user�namerZemailZconfirmz
 Confirm: z!Password and confirm don't match!z
   EMail: z"You will receive an email shortly.z7Follow the instructions in it to complete registration.�3Zpassword_resetzYour email address: )r"rr�split�announcer�INFO�input�print�getpassr$r%ZHTTPPasswordMgr�parseZurlparser Zadd_passwordr!r)r*rZ_get_rc_file�lowerZ
_store_pypircr&)
r
Zchoicerr�choices�authZhostr+r,�datarrrrcs��



��

���








zregister.send_metadatacCs�|jj}|d|��|��|��|��|��|��|��|�	�|�
�|��|��|�
�|��|��|��d�}|ds�|ds�|dr�d|d<|S)Nz1.0)r5�metadata_versionr7�versionZsummaryZ	home_pageZauthorZauthor_email�license�description�keywords�platformrZdownload_url�provides�requires�	obsoletesrJrKrLz1.1rD)rZmetadataZget_nameZget_versionZget_descriptionZget_urlZget_contactZget_contact_emailZget_licenceZget_long_descriptionZget_keywordsZ
get_platformsZget_classifiersZget_download_urlZget_providesZget_requiresZ
get_obsoletes)r
�action�metarCrrrr*�s,�zregister.build_post_dataNc
Cs�d|kr$|�d|d|jftj�d}d|}|d}t��}|��D]~\}}t|�tg�td�fkrn|g}|D]R}t|�}|�	|�|�	d|�|�	d�|�	|�|rr|d	d
krr|�	d�qrqH|�	|�|�	d�|�
��d�}d
|tt|��d�}	t
j�|j||	�}
t
j�t
jj|d��}d}z|�|
�}Wnxt
jjk
�r�}
z"|j�rd|
j��}|
j|
jf}W5d}
~
XYnJt
jjk
�r�}
zdt|
�f}W5d}
~
XYnX|j�r�|�|�}d}|j�r�d�d|df�}|�|tj�|S)Nr7zRegistering %s to %sz3--------------GHSKFJDLGDS7543FJKLFHRE75642756743254z
--z--rz*
Content-Disposition: form-data; name="%s"z

����
�
zutf-8z/multipart/form-data; boundary=%s; charset=utf-8)zContent-typezContent-length)Zpassword_mgrr/i�)r0ZOKzK---------------------------------------------------------------------------)r:r rr;�io�StringIO�items�type�str�write�getvalue�encode�lenr$r%ZRequestZbuild_openerZHTTPBasicAuthHandler�open�errorZ	HTTPErrorZ
show_response�fp�readr+�msgZURLErrorr'�join)r
rCrB�boundaryZsep_boundaryZend_boundaryZbody�key�valueZheadersZreqZopenerr,�er_rrrr)�s^��





��

zregister.post_to_server)N)�__name__�
__module__�__qualname__rGrZuser_optionsZboolean_optionsZsub_commandsrrrrrrrrr*r)rrrrrs*��
zr)
r>rRZurllib.parser$Zurllib.request�warningsrZdistutils.corerZdistutils.errorsZ	distutilsrrrrrr�<module>s

ZeroDay Forums Mini