o ?Og4@s\ ddlmZddlmZdgZGdddZeddZGdddZdd lm Z m Z d S) )ref)contextmanagerlocalc@s*eZdZ dZddZddZddZdS) _localimpl)keydicts localargs locallock __weakref__cCsdtt||_i|_dS)Nz_threading_local._localimpl.)stridrr)selfr7/opt/alt/python310/lib64/python3.10/_threading_local.py__init__s z_localimpl.__init__cCs t}|jt|dS)N)current_threadrr )r threadrrrget_dictsz_localimpl.get_dictcsj i}|j}t}t|}|ffdd }|ffdd }t||t|||j|<|f|j|<|S)Ncs}|dur |j|=dSdSN)__dict__)_rr)wrthreadrr local_deleteds z-_localimpl.create_dict..local_deletedcs"}|dur|j|}dSdSr)rpop)ridtrdct)wrlocalrrthread_deletedsz._localimpl.create_dict..thread_deleted)rrr rrr)r Z localdictrrrrrr)rrr create_dicts   z_localimpl.create_dictN)__name__ __module__ __qualname__ __slots__rrrrrrrrs  rccst|d}z|}Wnty'|}|j\}}|j|i|Ynw|jt|d|dVWddS1sAwYdS)N _local__implr) object__getattribute__rKeyErrorrrrr __setattr__)r implrargskwrrr_patchs    "r,c@s0eZdZdZddZddZddZdd Zd S) r)r$rcOsX|s|r|jtjurtdt|}t}||f|_t|_t|d|| |S)Nz*Initialization arguments are not supportedr$) rr% TypeError__new__rrRLockr r(r)clsr*r+r r)rrrr.s  z local.__new__cCs8t|t||WdS1swYdSr)r,r%r&r namerrrr&s  $zlocal.__getattribute__cCsR|dkr td|jjt|t|||WdS1s"wYdSNrz+%r object attribute '__dict__' is read-only)AttributeError __class__r r,r%r()r r2valuerrrr(s  $zlocal.__setattr__cCsP|dkr td|jjt|t||WdS1s!wYdSr3)r4r5r r,r% __delattr__r1rrrr7s  $zlocal.__delattr__N)r r!r"r#r.r&r(r7rrrrrs  )rr/N) weakrefr contextlibr__all__rr,rZ threadingrr/rrrrs   ,  &