o
    é’Oj‚  ã                   @   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	Z
dZd dlmZ eedƒZe j d¡r:dd„ ZnejZd	d
„ Zdd„ Zdd„ ZdS )é    N)ÚPythonDeprecationWarning)ÚTransferConfigÚaÚUNSET_DEFAULTÚwinc              
   C   sR   zt  |¡ W n ty  } z|jtjks‚ W Y d }~nd }~ww t  | |¡ d S )N)ÚosÚremoveÚOSErrorÚerrnoÚENOENTÚrename)Úcurrent_filenameÚnew_filenameÚe© r   úR/var/www/html/pharmsmart-cdr-gen/venv/lib/python3.10/site-packages/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   sd   dddœ} d| i}t jdd… }||v r0|| }d |d |d	 |d
 |d ¡}t |t¡ dS dS )z=Use this template for future deprecation campaigns as needed.zApril 29, 2026z\https://aws.amazon.com/blogs/developer/python-support-policy-updates-for-aws-sdks-and-tools/)ÚdateÚ	blog_link)é   é	   Né   zÌBoto3 will no longer support Python {}.{} starting {}. To continue receiving service updates, bug fixes, and security updates please upgrade to Python 3.10 or later. More information can be found here: {}r   é   r   r   )ÚsysÚversion_infoÚformatr   Úwarnr   )Úpy_39_paramsÚdeprecated_versionsÚ
py_versionÚparamsÚwarningr   r   r   Ú_warn_deprecated_pythonB   s   ý	þûør)   c                 C   s    t | dƒot| jtƒot| jv S )NÚmode)ÚhasattrÚ
isinstancer*   ÚstrÚ_APPEND_MODE_CHAR)Úfileobjr   r   r   Úis_append_mode\   s
   

ÿýr0   )r    r   r
   Úsocketr   Úboto3.exceptionsr   Ús3transfer.managerr   ÚConnectionErrorÚSOCKET_ERRORr.   Úcollections.abcÚabcÚcollections_abcr+   ÚTRANSFER_CONFIG_SUPPORTS_CRTÚplatformÚ
startswithr   r   r   r)   r0   r   r   r   r   Ú<module>   s"   

