
    ,h                     \    d Z ddlmZ ddlZddlZd Zd Zde_        ej                  Z	d Z
y)a  
Work-around for Python Issue 5943 (http://bugs.python.org/issue5949).

This will patch imaplib's IMAP4_SSL.readline method with the fixed
verion in Python versions that are known to have the problem.

The problem definitely exists in Python 2.5 and 2.6 up until but not
including 2.6.5. It was also fixed in Python 2.7 alpha 2 so no attempt
is made to patch 2.7 versions.

Please let me know if there's more Python versions that should be
patched.

Efforts are made to only perform the patch once.
    )unicode_literalsNc                 &    | d d } | dk  ry| dk  ryy)N   )      r   F)r      r   T )sys_versions    \/var/www/html/Resume-Scraper/venv/lib/python3.12/site-packages/imapclient/imaplib_ssl_fix.py_is_affected_versionr      s(    bq/KY 	y	     c                     g }	 | j                   j                  d      }|j                  |       |dv rdj                  |      S B)zRead line from remote.   )
 r   )sslobjreadappendjoin)selflinechars      r   _fixed_readliner   &   sE    D
{{"D:774= 	 r   Tc                      t        t        j                        r+t        t        j
                  d      st        t        _        y y y )Npatched)r   sysversion_infohasattr	ssl_classreadliner   r	   r   r   apply_patchr!   4   s1    C,,-gi>P>PR[6\,	 7]-r   )__doc__
__future__r   r   imaplibr   r   r   	IMAP4_SSLr   r!   r	   r   r   <module>r&      s9   
  ( 
 !  	-r   