
­­­­­­­­­­­­­­­­­­
<!DOCTYPE html>
<html>
U
    #IGZ                     @   s   d dl mZmZmZ d dlZd dlZd dlZd dlZejd  dkZ	e
 dkZe	rd dlmZ dd ZdZd	d
 ZG dd deZdd Zndd ZdZdd
 Zdd Zdd Ze	sdd Zndd Zdd Ze ZdS )    )absolute_importdivisionprint_functionN   PyPy)IterableUserDictc                 C   s   t | ttjfS N)
isinstancetypetypesZ	ClassTypeklass r   =/opt/alt/python38/lib/python3.8/site-packages/attr/_compat.pyisclass   s    r   r
   c                 C   s   |   S r   )	iteritemsdr   r   r   r      s    r   c                   @   sT   e Zd ZdZdd Zdd Zdd Zdd	 ZdddZdd Z	dddZ
dd Zd
S )ReadOnlyDictz5
        Best-effort read-only dict wrapper.
        c                 C   s   t dd S )Nz6'mappingproxy' object does not support item assignment	TypeError)selfkeyvalr   r   r   __setitem__!   s    zReadOnlyDict.__setitem__c                 C   s   t dd S )Nz/'mappingproxy' object has no attribute 'update'AttributeErrorr   _r   r   r   update&   s    zReadOnlyDict.updatec                 C   s   t dd S )Nz4'mappingproxy' object does not support item deletionr   r   r   r   r   __delitem__+   s    zReadOnlyDict.__delitem__c                 C   s   t dd S )Nz.'mappingproxy' object has no attribute 'clear'r   r   r   r   r   clear0   s    zReadOnlyDict.clearNc                 C   s   t dd S )Nz,'mappingproxy' object has no attribute 'pop'r   r   r   defaultr   r   r   pop5   s    zReadOnlyDict.popc                 C   s   t dd S )Nz0'mappingproxy' object has no attribute 'popitem'r   r!   r   r   r   popitem:   s    zReadOnlyDict.popitemc                 C   s   t dd S )Nz3'mappingproxy' object has no attribute 'setdefault'r   r#   r   r   r   
setdefault?   s    zReadOnlyDict.setdefaultc                 C   s   dt | j d S )Nzmappingproxy())reprdatar!   r   r   r   __repr__D   s    zReadOnlyDict.__repr__)N)N)__name__
__module____qualname____doc__r   r   r    r"   r%   r&   r'   r+   r   r   r   r   r      s   

r   c                 C   s   t  }|j|  |S r   )r   r*   r   )r   resr   r   r   metadata_proxyH   s    r1   c                 C   s
   t | tS r   )r	   r
   r   r   r   r   r   N   s    classc                 C   s   |   S r   )itemsr   r   r   r   r   S   s    c                 C   s   t t| S r   )r   MappingProxyTypedictr   r   r   r   r1   V   s    c                  C   s*   zddl } | W S  tk
r$   Y dS X dS )0
    Moved into a function for testability.
    r   N)ctypesImportError)r7   r   r   r   import_ctypesZ   s
    r9   c                  O   s   t jdtdd dS )
        We only warn on Python 3 because we are not aware of any concrete
        consequences of not setting the cell on Python 2.
        ziMissing ctypes.  Some features like bare super() or accessing __class__ will not work with slots classes.r   )
stacklevelN)warningswarnRuntimeWarningargskwr   r   r   	just_warnf   s
    rB   c                  O   s   dS )r:   Nr   r?   r   r   r   rB   r   s    c                  C   sD   t rdd } n2t }|dk	r<|jj} |j|jf| _|j| _nt} | S )r6   c                 S   s   |  |f d S r   )__setstate__)cellvaluer   r   r   set_closure_cell~   s    z/make_set_closure_cell.<locals>.set_closure_cellN)	PYPYr9   	pythonapiZ
PyCell_Set	py_objectargtypesc_intrestyperB   )rF   r7   r   r   r   make_set_closure_celly   s    

rM   )
__future__r   r   r   platformsysr   r<   version_infoPY2python_implementationrG   UserDictr   r   ZTYPEr   r   r1   r9   rB   rM   rF   r   r   r   r   <module>   s.   ,

