U
    ´.¬bì  ã                   @   sž   d dl Z d dlZd dlZd dlZd dlZd dlmZ d dlmZ ej	rLe
ZnejZej	rfd dlmZ nd dlZe j d¡r„dd„ ZnejZdd„ Zd	d
„ ZdS )é    N)Úsix)ÚPythonDeprecationWarningÚwinc              
   C   sP   zt  |¡ W n0 tk
r> } z|jtjks.‚ W 5 d }~X Y nX t  | |¡ d S )N)ÚosÚremoveÚOSErrorÚerrnoÚENOENTÚrename)Zcurrent_filenameZnew_filenameÚe© r   ú0/tmp/pip-unpacked-wheel-7h_bjh9e/boto3/compat.pyÚrename_file&   s    r   c                   C   s   t jddtdd� dS )z–
    Invoking this filter acknowledges your runtime will soon be deprecated
    at which time you will stop receiving all updates to your client.
    Úignorez'.*Boto3 will no longer support Python.*z.*boto3\.compat)ÚmessageÚcategoryÚmoduleN)ÚwarningsÚfilterwarningsr   r   r   r   r   Ú"filter_python_deprecation_warnings5   s    ür   c                  C   s\   dddœ} i }t jdd… }||krX|| }d |d |d |d	 |d
 ¡}t |t¡ dS )z=Use this template for future deprecation campaigns as needed.zMay 30, 2022z\https://aws.amazon.com/blogs/developer/python-support-policy-updates-for-aws-sdks-and-tools/)ÚdateÚ	blog_linkNé   zËBoto3 will no longer support Python {}.{} starting {}. To continue receiving service updates, bug fixes, and security updates please upgrade to Python 3.7 or later. More information can be found here: {}r   é   r   r   )ÚsysÚversion_infoÚformatr   Úwarnr   )Zpy_36_paramsZdeprecated_versionsÚ
py_versionÚparamsÚwarningr   r   r   Ú_warn_deprecated_pythonB   s    ýÿ   ûr!   )r   r   r   Úsocketr   Zbotocore.vendoredr   Zboto3.exceptionsr   ÚPY3ÚConnectionErrorZSOCKET_ERRORÚerrorÚcollections.abcÚabcÚcollections_abcÚcollectionsÚplatformÚ
startswithr   r
   r   r!   r   r   r   r   Ú<module>   s"   
