U a@sddlmZmZmZddlZddlZddlZddlZejddkZ e dkZ e sdejdddkrje Z nddlmZeZ e rddlmZmZddlmZd d Zd Zd d ZGdddeZddZddZn4ddlmZmZddZdd ZdZdd ZddZddZeZdS))absolute_importdivisionprint_functionNPyPy)) OrderedDict)MappingSequence)IterableUserDictcCst|ttjfSN) isinstancetypetypesZ ClassTypeklassr/Users/jalaguru/Documents/Proserv/artifacts/aws_dms_cdk_automation/aws-dms-cdk-automation/venv/lib/python3.8/site-packages/attr/_compat.pyisclasssrrcCs|Sr ) iteritemsdrrrr"src@sTeZdZdZddZddZddZdd Zdd d Zd dZ dddZ ddZ d S) ReadOnlyDictz5 Best-effort read-only dict wrapper. cCs tddS)Nz6'mappingproxy' object does not support item assignment TypeError)selfkeyvalrrr __setitem__+szReadOnlyDict.__setitem__cCs tddS)Nz/'mappingproxy' object has no attribute 'update'AttributeErrorr_rrrupdate1szReadOnlyDict.updatecCs tddS)Nz4'mappingproxy' object does not support item deletionrr"rrr __delitem__7szReadOnlyDict.__delitem__cCs tddS)Nz.'mappingproxy' object has no attribute 'clear'r rrrrclear=szReadOnlyDict.clearNcCs tddS)Nz,'mappingproxy' object has no attribute 'pop'r rrdefaultrrrpopCszReadOnlyDict.popcCs tddS)Nz0'mappingproxy' object has no attribute 'popitem'r r&rrrpopitemIszReadOnlyDict.popitemcCs tddS)Nz3'mappingproxy' object has no attribute 'setdefault'r r(rrr setdefaultOszReadOnlyDict.setdefaultcCsdt|jdS)Nz mappingproxy())reprdatar&rrr__repr__UszReadOnlyDict.__repr__)N)N) __name__ __module__ __qualname____doc__rr$r%r'r*r+r,r0rrrrr&s  rcCst}|j||Sr )rr/r$)rresrrrmetadata_proxyYs r6cOsdS) We only warn on Python 3 because we are not aware of any concrete consequences of not setting the cell on Python 2. Nrargskwrrr just_warn^sr;cOstjdtdddS)r7zRunning interpreter doesn't sufficiently support code object introspection. Some features like bare super() or accessing __class__ will not work with slotted classes.r) stacklevelN)warningswarnRuntimeWarningr8rrrr;hs cCs t|tSr )rrrrrrrusclasscCs|Sr )itemsrrrrrzscCstt|Sr )rMappingProxyTypedictrrrrr6}scs4trdd}|Sdd}ztr&|j}n|j}|jdks@|jdkrDttjdkrb|j |j|jdn`|j g}tsz| |j | |j|j|j|j|j|j|j|j|j|j|j|j|jg tj|fd d}d d }tr|jd }n |jd }||d |jd krtWntk r*tYSX|SdS)z|Return a function of two arguments (cell, value) which sets the value stored in the closure cell `cell` to `value`. cSs||fdSr ) __setstate__)cellvaluerrrset_closure_cellsz/make_set_closure_cell..set_closure_cellcs|dS)NcsSr rrxrrforce_x_to_be_a_cellszQmake_set_closure_cell..set_first_cellvar_to..force_x_to_be_a_cellr)rFrJrrHrset_first_cellvar_tosz3make_set_closure_cell..set_first_cellvar_torHr)r) co_cellvars co_freevarscs tidd|f}||dS)Nsetterr)r FunctionType)rErFrOZset_first_freevar_coderrrGscsdfdd}|S)NcsSr rrrHrrfuncsz@make_set_closure_cell..make_func_with_cell..funcr)rRrrHrmake_func_with_cells z2make_set_closure_cell..make_func_with_cellrdN) PYPYPY2 func_code__code__rMrNAssertionErrorsys version_inforeplace co_argcountappendco_kwonlyargcountextend co_nlocals co_stacksizeco_flagsco_code co_constsco_names co_varnames co_filenameco_nameco_firstlineno co_lnotabrCodeTypeZ func_closure __closure__ cell_contents Exceptionr;)rGrKcor9rSrErrQrmake_set_closure_cells\         rq) __future__rrrplatformrZrr=r[rVpython_implementationrUrCZ ordered_dict collectionsr r r UserDictr rZTYPErrr6r;collections.abcrqrGrrrrs6   3  f