o
    ™©ZhÓ  ã                   @   sN   d Z ddlZddlZddlZddlmZ G dd„ dejƒZdd„ Zdd	„ ZdS )
zc
This module is here to ensure compatibility of Windows/Linux/MacOS and
different Python versions.
é    N)ÚAnyc                       s*   e Zd Zdededef‡ fdd„Z‡  ZS )Ú	UnpicklerÚmoduleÚnameÚreturnc                    s   |dkrd}t ƒ  ||¡S )Nzpathlib._localÚpathlib)ÚsuperÚ
find_class)Úselfr   r   ©Ú	__class__© úJ/var/www/html/lang_env/lib/python3.10/site-packages/jedi/_compatibility.pyr	      s   zUnpickler.find_class)Ú__name__Ú
__module__Ú__qualname__Ústrr   r	   Ú__classcell__r   r   r   r   r      s    "r   c                 C   s0   zt | ƒ ¡ W S  ty   tjdkrtƒ ‚‚ w )NÚwin32)r   ÚloadÚOSErrorÚsysÚplatformÚEOFError)Úfiler   r   r   Úpickle_load   s   
ýr   c                 C   sD   zt  | ||¡ | ¡  W d S  ty!   tjdkr ttjdƒ‚‚ w )Nr   zBroken pipe)	ÚpickleÚdumpÚflushr   r   r   ÚIOErrorÚerrnoÚEPIPE)Údatar   Úprotocolr   r   r   Úpickle_dump"   s   
ýr$   )	Ú__doc__r    r   r   Útypingr   r   r   r$   r   r   r   r   Ú<module>   s    