zmc
2023-08-08 e792e9a60d958b93aef96050644f369feb25d61b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
U
¸ý°d¨ã@s8dZddlmZddlZddlZddlmZddlmZddlmZddlmZddlm    Z    dd    lm
Z
dd
lm Z dd lm Z dd lm Z dd lmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlm Z dd lm!Z!dd!lm"Z"dd"lm#Z#dd#l"m$Z$dd$l"m%Z%dd%l"m&Z&dd&l"m'Z'dd'l(m)Z)dd(l*m+Z+dd)l*m,Z,dd*l*m-Z-dd+l.m/Z/dd,l.m0Z0dd-l1m2Z2dd.l3m4Z4dd/l3m5Z5dd0l3m6Z6dd1l3m7Z7dd2l3m8Z8ej9rŒdd3l*m:Z:dd4l*m;Z;dd5l<m=Z=dd6l>m?Z?dd7l>m@Z@ed8ed9ZAed:ed;d<ZBed=ed;d>ZCed?ed9ZDed@ed9ZEedAed9ZFddddddBe2jGe2jGe2jGe2jGe2jGe2jGdCœ dDdDdEdFdGdHdIdJdKdKdLdMdKdKdNdOœdPdQ„ZHGdRdS„dSe%ƒZIGdTdU„dUe5eBƒZJGdVdW„dWe5ƒZKGdXdY„dYeKe5eCƒZLGdZd[„d[eKe5eCƒZMGd\d]„d]e5ƒZNGd^d_„d_eNe5eCƒZOGd`da„daeNe5eCƒZPGdbdc„dce5eAƒZQGddde„dee5ƒZRGdfdg„dge5ƒZSGdhdi„die5ƒZTGdjdk„dke5eAƒZUGdldm„dme&jVe'eAe,eUeAƒZWedndod9ZXGdpdq„dqe)eAƒZYGdrds„dseYeAƒZZGdtdu„dueYeAƒZ[Gdvdw„dweYeAƒZ\Gdxdy„dyeQeAƒZ]edzd{d9Z^Gd|d}„d}e e^ƒZ_Gd~d„de_eAƒZ`Gd€d„de`eAeeAƒZaGd‚dƒ„dƒe_eFeeEeFfƒZbGd„d…„d…e`eAeeAƒZcdS)†zõContain the ``AssociationProxy`` class.
 
The ``AssociationProxy`` is a Python property object which provides
transparent proxied access to the endpoint of an association object.
 
See the example ``examples/association/proxied_association.py``.
 
é)Ú annotationsN)Ú AbstractSet)ÚAny)ÚCallable)Úcast)Ú
Collection)ÚDict)ÚGeneric©Ú    ItemsView)ÚIterable)ÚIterator)ÚKeysView)ÚList)ÚMapping)ÚMutableMapping)ÚMutableSequence)Ú
MutableSet)ÚNoReturn)ÚOptional)Úoverload)ÚSet)ÚTuple)ÚType)ÚTypeVar)ÚUnion©Ú
ValuesViewé)Ú ColumnElement)Úexc)Úinspect)Úorm)Úutil)Ú collections)ÚInspectionAttrExtensionType)Ú
interfaces)Ú ORMDescriptor)ÚSQLORMOperations)Ú_AttributeOptions)Ú_DCAttributeOptions)Ú_DEFAULT_ATTRIBUTE_OPTIONS)Ú    operators)Úor_)Ú_NoArg)ÚLiteral)ÚProtocol)ÚSelf)Ú SupportsIndex)ÚSupportsKeysAndGetItem)ÚMapperProperty)ÚPropComparator)ÚMapper)Ú_ColumnExpressionArgument)Ú    _InfoTypeÚ_T)ÚboundÚ_T_coT)r:Ú    covariantÚ_T_con)r:Ú contravariantÚ_SÚ_KTÚ_VTF) ÚcreatorÚgetset_factoryÚ proxy_factoryÚproxy_bulk_setÚinfoÚcascade_scalar_deletesÚinitÚreprÚdefaultÚdefault_factoryÚcompareÚkw_onlyÚstrúOptional[_CreatorProtocol]ú Optional[_GetSetFactoryProtocol]úOptional[_ProxyFactoryProtocol]úOptional[_ProxyBulkSetProtocol]úOptional[_InfoType]ÚboolzUnion[_NoArg, bool]ú Optional[Any]zUnion[_NoArg, Callable[[], _T]]zAssociationProxy[Any])Útarget_collectionÚattrrBrCrDrErFrGrHrIrJrKrLrMÚreturnc Cs(t||||||||t||    |
| | | ƒd    S)a¾Return a Python property implementing a view of a target
    attribute which references an attribute on members of the
    target.
 
    The returned value is an instance of :class:`.AssociationProxy`.
 
    Implements a Python property representing a relationship as a collection
    of simpler values, or a scalar value.  The proxied property will mimic
    the collection type of the target (list, dict or set), or, in the case of
    a one to one relationship, a simple scalar value.
 
    :param target_collection: Name of the attribute that is the immediate
      target.  This attribute is typically mapped by
      :func:`~sqlalchemy.orm.relationship` to link to a target collection, but
      can also be a many-to-one or non-scalar relationship.
 
    :param attr: Attribute on the associated instance or instances that
      are available on instances of the target object.
 
    :param creator: optional.
 
      Defines custom behavior when new items are added to the proxied
      collection.
 
      By default, adding new items to the collection will trigger a
      construction of an instance of the target object, passing the given
      item as a positional argument to the target constructor.  For cases
      where this isn't sufficient, :paramref:`.association_proxy.creator`
      can supply a callable that will construct the object in the
      appropriate way, given the item that was passed.
 
      For list- and set- oriented collections, a single argument is
      passed to the callable. For dictionary oriented collections, two
      arguments are passed, corresponding to the key and value.
 
      The :paramref:`.association_proxy.creator` callable is also invoked
      for scalar (i.e. many-to-one, one-to-one) relationships. If the
      current value of the target relationship attribute is ``None``, the
      callable is used to construct a new object.  If an object value already
      exists, the given attribute value is populated onto that object.
 
      .. seealso::
 
        :ref:`associationproxy_creator`
 
    :param cascade_scalar_deletes: when True, indicates that setting
        the proxied value to ``None``, or deleting it via ``del``, should
        also remove the source object.  Only applies to scalar attributes.
        Normally, removing the proxied target will not remove the proxy
        source, as this object may have other state that is still to be
        kept.
 
        .. versionadded:: 1.3
 
        .. seealso::
 
            :ref:`cascade_scalar_deletes` - complete usage example
 
    :param init: Specific to :ref:`orm_declarative_native_dataclasses`,
     specifies if the mapped attribute should be part of the ``__init__()``
     method as generated by the dataclass process.
 
     .. versionadded:: 2.0.0b4
 
    :param repr: Specific to :ref:`orm_declarative_native_dataclasses`,
     specifies if the attribute established by this :class:`.AssociationProxy`
     should be part of the ``__repr__()`` method as generated by the dataclass
     process.
 
     .. versionadded:: 2.0.0b4
 
    :param default_factory: Specific to
     :ref:`orm_declarative_native_dataclasses`, specifies a default-value
     generation function that will take place as part of the ``__init__()``
     method as generated by the dataclass process.
 
     .. versionadded:: 2.0.0b4
 
    :param compare: Specific to
     :ref:`orm_declarative_native_dataclasses`, indicates if this field
     should be included in comparison operations when generating the
     ``__eq__()`` and ``__ne__()`` methods for the mapped class.
 
     .. versionadded:: 2.0.0b4
 
    :param kw_only: Specific to :ref:`orm_declarative_native_dataclasses`,
     indicates if this field should be marked as keyword-only when generating
     the ``__init__()`` method as generated by the dataclass process.
 
     .. versionadded:: 2.0.0b4
 
    :param info: optional, will be assigned to
     :attr:`.AssociationProxy.info` if present.
 
 
    The following additional parameters involve injection of custom behaviors
    within the :class:`.AssociationProxy` object and are for advanced use
    only:
 
    :param getset_factory: Optional.  Proxied attribute access is
        automatically handled by routines that get and set values based on
        the `attr` argument for this proxy.
 
        If you would like to customize this behavior, you may supply a
        `getset_factory` callable that produces a tuple of `getter` and
        `setter` functions.  The factory is called with two arguments, the
        abstract type of the underlying collection and this proxy instance.
 
    :param proxy_factory: Optional.  The type of collection to emulate is
        determined by sniffing the target collection.  If your collection
        type can't be determined by duck typing or you'd like to use a
        different collection implementation, you may supply a factory
        function to produce those collections.  Only applicable to
        non-scalar relationships.
 
    :param proxy_bulk_set: Optional, use with proxy_factory.
 
 
    ©rBrCrDrErFrGÚattribute_options)ÚAssociationProxyr))rVrWrBrCrDrErFrGrHrIrJrKrLrM©r\úVd:\z\workplace\vscode\pyvenv\venv\Lib\site-packages\sqlalchemy/ext/associationproxy.pyÚassociation_proxyTs&    ÿ÷r^c@seZdZdZdS)ÚAssociationProxyExtensionTypeÚASSOCIATION_PROXYN)Ú__name__Ú
__module__Ú __qualname__r`r\r\r\r]r_ësr_c@seZdZdddœdd„ZdS)Ú_GetterProtocolrr;©ÚinstancerXcCsdS©Nr\)Úselfrfr\r\r]Ú__call__÷sz_GetterProtocol.__call__N©rarbrcrir\r\r\r]rdösrdc@s eZdZdS)Ú_SetterProtocolN©rarbrcr\r\r\r]rküsrkc@seZdZddddœdd„ZdS)Ú_PlainSetterProtocolrr=ÚNone)rfÚvaluerXcCsdSrgr\)rhrfror\r\r]risz_PlainSetterProtocol.__call__Nrjr\r\r\r]rmsrmc@s eZdZdddddœdd„ZdS)Ú_DictSetterProtocolrr=rn)rfÚkeyrorXcCsdSrgr\)rhrfrqror\r\r]risz_DictSetterProtocol.__call__Nrjr\r\r\r]rpsrpc@s eZdZdS)Ú_CreatorProtocolNrlr\r\r\r]rr srrc@seZdZdddœdd„ZdS)Ú_PlainCreatorProtocolr=r©rorXcCsdSrgr\©rhror\r\r]risz_PlainCreatorProtocol.__call__Nrjr\r\r\r]rssrsc@seZdZddddœdd„ZdS)Ú_KeyCreatorProtocolrzOptional[_T_con]©rqrorXcCsdSrgr\©rhrqror\r\r]risz_KeyCreatorProtocol.__call__Nrjr\r\r\r]rvsrvc@seZdZddœdd„ZdS)Ú_LazyCollectionProtocolúCUnion[MutableSet[_T], MutableMapping[Any, _T], MutableSequence[_T]]©rXcCsdSrgr\©rhr\r\r]risz _LazyCollectionProtocol.__call__Nrjr\r\r\r]rysryc@seZdZddddœdd„ZdS)Ú_GetSetFactoryProtocolúOptional[Type[Any]]úAssociationProxyInstance[Any]ú,Tuple[_GetterProtocol[Any], _SetterProtocol])Úcollection_classÚassoc_instancerXcCsdSrgr\)rhrr‚r\r\r]ri!sz_GetSetFactoryProtocol.__call__Nrjr\r\r\r]r} sr}c@s"eZdZddddddœdd„Zd    S)
Ú_ProxyFactoryProtocolz_LazyCollectionProtocol[Any]rrrNrr)Úlazy_collectionrBÚ
value_attrÚparentrXcCsdSrgr\)rhr„rBr…r†r\r\r]ri*sz_ProxyFactoryProtocol.__call__Nrjr\r\r\r]rƒ)srƒc@seZdZddddœdd„ZdS)Ú_ProxyBulkSetProtocolú_AssociationCollection[Any]ú Iterable[Any]rn)ÚproxyÚ
collectionrXcCsdSrgr\)rhrŠr‹r\r\r]ri5sz_ProxyBulkSetProtocol.__call__Nrjr\r\r\r]r‡4sr‡c@s‚eZdZUdZded<ded<ded<ded<ded    <d
ed <d ed <ejddœdd„ƒZdddddœdd„Zdddœdd„Z    dS)Ú_AssociationProxyProtocolzpdescribes the interface of :class:`.AssociationProxy`
    without including descriptor methods in the interface.rOrBrNrqrVr…rPrCrQrDrRrEr8r{cCsdSrgr\r|r\r\r]rFGsz_AssociationProxyProtocol.infoNú    Type[Any]úOptional[object]úAssociationProxyInstance[_T]©Úclass_ÚobjrXcCsdSrgr\©rhr‘r’r\r\r]Ú    for_classKsz#_AssociationProxyProtocol.for_classrr€©rrXcCsdSrgr\)rhrr\r\r]Ú_default_getsetPsz)_AssociationProxyProtocol._default_getset)N)
rarbrcÚ__doc__Ú__annotations__r#Zro_memoized_propertyrFr”r–r\r\r\r]rŒ;s
ÿrŒc @seZdZdZdZejZddddddddœddddd    d
d d d dœ    dd„Ze    ddddœdd„ƒZ
e    ddddœdd„ƒZ
e    ddddœdd„ƒZ
ddddœdd„Z
ddddœd d!„Z ddd"œd#d$„Z d6d%d&dd'œd(d)„Z dddd'œd*d+„Zddd,œd-d.„Zdd/d0œd1d2„Zdd3œd4d5„ZdS)7r[zDA descriptor that presents a read/write view of an object attribute.TNFrYrNrOrPrQrRrSrTzOptional[_AttributeOptions])    rVrWrBrCrDrErFrGrZc
Csx||_||_||_||_||_||_||_dt|ƒj|t    |ƒf|_
|rN||_ |    rh|    t krhd|_ |    |_n d|_ t |_dS)a(Construct a new :class:`.AssociationProxy`.
 
        The :class:`.AssociationProxy` object is typically constructed using
        the :func:`.association_proxy` constructor function. See the
        description of :func:`.association_proxy` for a description of all
        parameters.
 
 
        z    _%s_%s_%sTFN)rVr…rBrCrDrErGÚtyperaÚidrqrFr+Z_has_dataclass_argumentsZ_attribute_options)
rhrVrWrBrCrDrErFrGrZr\r\r]Ú__init__as,ýÿþzAssociationProxy.__init__rú Literal[None]r1)rfÚownerrXcCsdSrgr\©rhrfrr\r\r]Ú__get__‘szAssociationProxy.__get__rcCsdSrgr\ržr\r\r]rŸ•sÚobjectr9cCsdSrgr\ržr\r\r]rŸ›sz=Union[AssociationProxyInstance[_T], _T, AssociationProxy[_T]]cCs6|dkr |S| ||¡}|r&| |¡S|dks2t‚|Srg)Ú _as_instanceÚgetÚAssertionError)rhrfrÚinstr\r\r]rŸŸs 
 rn)rfÚvaluesrXcCs t|ƒ}| ||¡ ||¡dSrg)r™r¡Úset)rhrfr¥r‘r\r\r]Ú__set__¬szAssociationProxy.__set__recCst|ƒ}| ||¡ |¡dSrg)r™r¡Údelete)rhrfr‘r\r\r]Ú
__delete__°szAssociationProxy.__delete__rrŽrcCs | ||¡S)aéReturn the internal state local to a specific mapped class.
 
        E.g., given a class ``User``::
 
            class User(Base):
                # ...
 
                keywords = association_proxy('kws', 'keyword')
 
        If we access this :class:`.AssociationProxy` from
        :attr:`_orm.Mapper.all_orm_descriptors`, and we want to view the
        target class for this proxy as mapped by ``User``::
 
            inspect(User).all_orm_descriptors["keywords"].for_class(User).target_class
 
        This returns an instance of :class:`.AssociationProxyInstance` that
        is specific to the ``User`` class.   The :class:`.AssociationProxy`
        object remains agnostic of its parent class.
 
        :param class\_: the class that we are returning state for.
 
        :param obj: optional, an instance of the class that is required
         if the attribute refers to a polymorphic target, e.g. where we have
         to look at the type of the actual destination object to get the
         complete path.
 
        .. versionadded:: 1.3 - :class:`.AssociationProxy` no longer stores
           any state specific to a particular parent class; the state is now
           stored in per-class :class:`.AssociationProxyInstance` objects.
 
 
        )r¡r“r\r\r]r”´s#zAssociationProxy.for_classcCsŽz|j|jd}Wntk
r,d}YnX|dkrn| |¡}|dk    rjt |||¡}t||jd|ƒnd}|dk    r†|js†| |¡S|SdS)NÚ_inst)    Ú__dict__rqÚKeyErrorÚ _calc_ownerÚAssociationProxyInstanceÚ    for_proxyÚsetattrÚ _is_canonicalÚ_non_canonical_get_for_object)rhr‘r’r¤rr\r\r]r¡Ùs
 
 
zAssociationProxy._as_instance)Ú
target_clsrXcCs4z t|ƒ}Wntjk
r$YdSX|jjjSdSrg)r!r ÚNoInspectionAvailableÚmapperZ class_managerr‘)rhr³Úinspr\r\r]r­ôs
 zAssociationProxy._calc_ownerr€r•csn|j‰t ˆ¡‰dddœ‡fdd„ }|tkrLdddddœ‡fdd    „ }||fSdddd
œ‡fd d „ }||fSdS) NrrUrecs|dk    rˆ|ƒSdSrgr\©rf©Ú_getterr\r]Úgetter    sz0AssociationProxy._default_getset.<locals>.getterrn©rfÚkrorXcst|ˆ|ƒdSrg©r°©rfr¼ro©rWr\r]Ú dict_settersz5AssociationProxy._default_getset.<locals>.dict_setter©ÚoÚvrXcst|ˆ|ƒdSrgr½©rÂrÃr¿r\r]Ú plain_settersz6AssociationProxy._default_getset.<locals>.plain_setter©r…ÚoperatorÚ
attrgetterÚdict©rhrrºrÀrÅr\©r¹rWr]r–s
z AssociationProxy._default_getsetr{cCsd|j|jfS)NzAssociationProxy(%r, %r))rVr…r|r\r\r]Ú__repr__sþzAssociationProxy.__repr__)N)rarbrcr—Z is_attributer_r`Zextension_typer›rrŸr§r©r”r¡r­r–rÌr\r\r\r]r[Vs4õ"0 ÿ%r[Ú_Selfrc@sTeZdZUdZded<ded<dddddœd    d
„Zded <ed dd ddœdd„ƒZedddddddœdd„ƒZddœdd„Z    e
ddœdd„ƒZ ddœdd„Z ed ddd œd!d"„ƒZ ejddœd#d$„ƒZe
d%dœd&d'„ƒZe
d(dœd)d*„ƒZe
d+dœd,d-„ƒZejd.dœd/d0„ƒZejd.dœd1d2„ƒZe
d.dœd3d4„ƒZd5ed6<d7ed8<d9dœd:d;„Zd d<d=œd>d?„Zejd@dœdAdB„ƒZedCdDdCdEœdFdG„ƒZed dHdIœdJdG„ƒZd dKdIœdLdG„Zd dHd9dMœdNdO„Zd d9dIœdPdQ„ZdRdSdTœdUdV„ZdWdXd9dYœdZd[„Z dWd9d\œd]d^„Z!dkd`d dadbœdcdd„Z"dld`d dadbœdedf„Z#dmd`d dadbœdgdh„Z$ddœdidj„Z%d_S)nr®aâA per-class object that serves class- and object-specific results.
 
    This is used by :class:`.AssociationProxy` when it is invoked
    in terms of a specific class or instance of a class, i.e. when it is
    used as a regular Python descriptor.
 
    When referring to the :class:`.AssociationProxy` as a normal Python
    descriptor, the :class:`.AssociationProxyInstance` is the object that
    actually serves the information.   Under normal circumstances, its presence
    is transparent::
 
        >>> User.keywords.scalar
        False
 
    In the special case that the :class:`.AssociationProxy` object is being
    accessed directly, in order to get an explicit handle to the
    :class:`.AssociationProxyInstance`, use the
    :meth:`.AssociationProxy.for_class` method::
 
        proxy_state = inspect(User).all_orm_descriptors["keywords"].for_class(User)
 
        # view if proxy object is scalar or not
        >>> proxy_state.scalar
        False
 
    .. versionadded:: 1.3
 
    r~rz_AssociationProxyProtocol[_T]r†rrN)r†Ú owning_classÚ target_classr…cCs2||_|j|_||_|j|_d|_||_||_dSrg)r†rqrÎrVrrÏr…)rhr†rÎrÏr…r\r\r]r›Hsz!AssociationProxyInstance.__init__rÏzAssociationProxy[_T]rr)r†rÎÚparent_instancerXc
CsÚ|j}|j}tdt |¡ |¡ƒ}t|tjƒs8tdƒd‚|j    j
}ztd|  ||¡ƒ}Wnlt k
rxt ||||ƒYStk
rÂ}    z.t d|j›d|j›d|j›d|    ›¡|    ‚W5d}    ~    XYnX| |||||¡SdS)Nzorm.RelationshipProperty[_T]zEassociation proxy to a non-relationship intermediary is not supportedrzRAssociation proxy received an unexpected error when trying to retreive attribute "Ú.z" from class "z": )rVr…rr"Ú class_mapperÚ get_propertyÚ
isinstanceZRelationshipPropertyÚNotImplementedErrorrµr‘Ú_cls_unwrap_target_assoc_proxyÚAttributeErrorÚ!AmbiguousAssociationProxyInstanceÚ    Exceptionr ÚInvalidRequestErrorraÚ_construct_for_assoc)
Úclsr†rÎrÐrVr…ÚproprÏÚ target_assocÚerrr\r\r]r¯`sLþ ÿý
þÿ ÿûÿz"AssociationProxyInstance.for_proxyz&Optional[AssociationProxyInstance[_T]])rÞr†rÎrÏr…rXcCsb|dk    rt||||ƒSt||ƒ}t|dƒs8t||||ƒS|j}|rPt||||ƒSt||||ƒSdS)NZ_is_internal_proxy)ÚObjectAssociationProxyInstanceÚgetattrÚhasattrrØZ_impl_uses_objectsÚColumnAssociationProxyInstance)rÜrÞr†rÎrÏr…rWZ    is_objectr\r\r]rۏs:    ÿ
 
ÿÿÿz-AssociationProxyInstance._construct_for_assoczMapperProperty[Any]r{cCst |j¡ |j¡Srg)r"rÒrÎrÓrVr|r\r\r]Ú _get_property¬s ÿz&AssociationProxyInstance._get_propertyzPropComparator[Any]cCst|j|jƒjSrg)rárÎrVÚ
comparatorr|r\r\r]Ú _comparator±sÿz$AssociationProxyInstance._comparatorrcCs tdƒ‚dS)NzqThe association proxy can't be used as a plain column expression; it only works inside of a comparison expression©rÕr|r\r\r]Ú__clause_element__·sÿz+AssociationProxyInstance.__clause_element__)rÏr…rXcCs*t||ƒ}t|tƒrt‚t|tƒr&|SdSrg)rárÔr[r£r®)rÜrÏr…rWr\r\r]rÖ½s
 
 
z7AssociationProxyInstance._cls_unwrap_target_assoc_proxycCs| |j|j¡Srg)rÖrÏr…r|r\r\r]Ú_unwrap_target_assoc_proxyÇsÿz3AssociationProxyInstance._unwrap_target_assoc_proxyúSQLORMOperations[_T]cCstdt|j|jƒƒS)zéThe 'remote' class attribute referenced by this
        :class:`.AssociationProxyInstance`.
 
        .. seealso::
 
            :attr:`.AssociationProxyInstance.attr`
 
            :attr:`.AssociationProxyInstance.local_attr`
 
        rê)rrárÏr…r|r\r\r]Ú remote_attrÏs  ÿz$AssociationProxyInstance.remote_attrúSQLORMOperations[Any]cCstdt|j|jƒƒS)zéThe 'local' class attribute referenced by this
        :class:`.AssociationProxyInstance`.
 
        .. seealso::
 
            :attr:`.AssociationProxyInstance.attr`
 
            :attr:`.AssociationProxyInstance.remote_attr`
 
        rì)rrárÎrVr|r\r\r]Ú
local_attrßs  þz#AssociationProxyInstance.local_attrz2Tuple[SQLORMOperations[Any], SQLORMOperations[_T]]cCs |j|jfS)aÔReturn a tuple of ``(local_attr, remote_attr)``.
 
        This attribute was originally intended to facilitate using the
        :meth:`_query.Query.join` method to join across the two relationships
        at once, however this makes use of a deprecated calling style.
 
        To use :meth:`_sql.select.join` or :meth:`_orm.Query.join` with
        an association proxy, the current method is to make use of the
        :attr:`.AssociationProxyInstance.local_attr` and
        :attr:`.AssociationProxyInstance.remote_attr` attributes separately::
 
            stmt = (
                select(Parent).
                join(Parent.proxied.local_attr).
                join(Parent.proxied.remote_attr)
            )
 
        A future release may seek to provide a more succinct join pattern
        for association proxy attributes.
 
        .. seealso::
 
            :attr:`.AssociationProxyInstance.local_attr`
 
            :attr:`.AssociationProxyInstance.remote_attr`
 
        )rírër|r\r\r]rWðszAssociationProxyInstance.attrrTcCs| ¡j }|r| ¡|S)zsReturn ``True`` if this :class:`.AssociationProxyInstance`
        proxies a scalar relationship on the local side.)räÚuselistÚ_initialize_scalar_accessors)rhÚscalarr\r\r]rðs zAssociationProxyInstance.scalarcCs| ¡j |j¡j Srg)rärµrÓr…rîr|r\r\r]Ú_value_is_scalars
ÿÿz)AssociationProxyInstance._value_is_scalarcCs
tƒ‚dSrgrçr|r\r\r]Ú_target_is_object!sz*AssociationProxyInstance._target_is_objectz_GetterProtocol[_T]Ú _scalar_getú_PlainSetterProtocol[_T]Ú _scalar_setrncCsD|jjr|j d|¡\}}n|j d¡\}}|td|ƒ|_|_dS)Nrô)r†rCr–rrórõ)rhr¢Úset_r\r\r]rï(sÿz5AssociationProxyInstance._initialize_scalar_accessorsr€r•csn|j‰t ˆ¡‰dddœ‡fdd„ }|tkrLdddddœ‡fd    d
„ }||fSdddd œ‡fd d „ }||fSdS)Nrz Optional[_T]recs|dk    rˆ|ƒSdSrgr\r·r¸r\r]rº7sz8AssociationProxyInstance._default_getset.<locals>.getterr9rnr»cst|ˆ|ƒdSrgr½r¾r¿r\r]rÀ<sz=AssociationProxyInstance._default_getset.<locals>.dict_setterrÁcst|ˆ|ƒdSrgr½rÄr¿r\r]rÅBsz>AssociationProxyInstance._default_getset.<locals>.plain_setterrÆrÊr\rËr]r–1s
z(AssociationProxyInstance._default_getsetr8cCs|jjSrg)r†rFr|r\r\r]rFGszAssociationProxyInstance.inforÍrœ)rhr’rXcCsdSrgr\©rhr’r\r\r]r¢KszAssociationProxyInstance.getr9©r’rXcCsdSrgr\r÷r\r\r]r¢Osz1Union[Optional[_T], AssociationProxyInstance[_T]]cCsÀ|dkr |S|jr(t||jƒ}| |¡Sztdt||jƒƒ\}}}Wntk
rXYn,Xt|ƒ|kr„t|ƒ|kr„|jdk    s€t    ‚|S| 
t ||jƒ¡\|_}t ||jt|ƒt|ƒ|fƒ|SdS)NzTuple[int, int, _T]) rðrárVrórrqr×ršrr£Ú_newÚ_lazy_collectionr°)rhr’ÚtargetZ
creator_idÚself_idrŠr\r\r]r¢Ss( 
 
ÿ
ÿ
)r’r¥rXcCs²|jr‚td|jjr|jjn|jƒ}t||jƒ}|dkrV|dkrBdSt||j||ƒƒq®| ||¡|dkr®|jj    r®t||jdƒn,| 
|¡}|j dk    sšt ‚||k    r®|  ||¡dS)Nú_PlainCreatorProtocol[_T])rðrr†rBrÏrárVr°rõrGr¢rr£Ú _bulk_replace)rhr’r¥rBrûrŠr\r\r]r¦rs&ÿ
û  
zAssociationProxyInstance.setcCsL|jdkr| |d¡|jr<t||jƒ}|dk    r<t||jƒt||jƒdSrg)rÎr­rðrárVÚdelattrr…©rhr’rûr\r\r]r¨‹s
   zAssociationProxyInstance.deletez_LazyCollectionProtocol[_T]zTuple[Type[Any], _T])r„rXc    Cs|jjdk    r|jjn
td|jƒ}t |ƒ¡}|dkrDt d|›¡‚|jjrd||j |||j    |¡fS|jj
r€|j 
||¡\}}n|j  |¡\}}|t kr²|tt t|||||ƒƒfS|tkrÔ|tt t|||||ƒƒfS|tkrö|tt t|||||ƒƒfSt d|j|jf¡‚dS)NrrzDlazy collection factory did not return a valid collection type, got z‚could not guess which interface to use for collection_class "%s" backing "%s"; specify a proxy_factory and proxy_bulk_set manually)r†rBrrÏr#Zduck_type_collectionr rÚrDr…rCr–Úlistr9Ú_AssociationListrÉÚ_AssociationDictr¦Ú_AssociationSetÚ ArgumentErrorrrV)rhr„rBrrºÚsetterr\r\r]rù•s‚
ÿ
 
ý ÿÿþÿþþ    ÿþþ    ÿþþ
 
ýÿzAssociationProxyInstance._newrˆr‰)rŠr¥rXcCsz|jjr|j ||¡n^|jtkr4td|ƒ |¡nB|jtkrPtd|ƒ |¡n&|jtkrltd|ƒ |¡n
t     
d¡‚dS)Nz_AssociationList[Any]z_AssociationDict[Any, Any]z_AssociationSet[Any]zEno proxy_bulk_set supplied for custom collection_class implementation) r†rErrrÚextendrÉÚupdater¦r r)rhrŠr¥r\r\r]Ú_set×s
 
 
ÿzAssociationProxyInstance._set)rŠrXcCsb|jjr|jjptt|jƒ}|jjr:|j |j|¡\}}n|j |j¡\}}||_||_||_    dSrg)
r†rBrrrrÏrCrr–rºr)rhrŠrBrºrr\r\r]Ú_inflateèsÿ
ýÿ
z!AssociationProxyInstance._inflateNú)Optional[_ColumnExpressionArgument[bool]]úColumnElement[bool]©Ú    criterionÚkwargsrXcKs–| dd¡}|j}|dk    r:|jfd|i|—Ž}|j |¡S|jr`t|j|jƒ}|jj|f|Ž}n*|rpt     
d¡‚n|r†|dk    r†t     
d¡‚|}|j |¡S)NÚis_hasrzJCan't apply keyword arguments to column-targeted association proxy; use ==zINon-empty has() not allowed for column-targeted association proxy; use ==) ÚpopréÚ_criterion_existsræròrárÏr…rår r)rhrrrrÞÚinnerrWZ
value_exprr\r\r]rús, ÿÿ ÿ ÿz*AssociationProxyInstance._criterion_existscKs<|jdkr&|jr&|jr|jr&t d¡‚|jf|ddœ|—ŽS)aProduce a proxied 'any' expression using EXISTS.
 
        This expression will be a composed product
        using the :meth:`.Relationship.Comparator.any`
        and/or :meth:`.Relationship.Comparator.has`
        operators of the underlying proxied attributes.
 
        Nz9'any()' not implemented for scalar attributes. Use has().F©rr©rérðròrñr rÚr©rhrrr\r\r]Úanys 
ÿþþÿÿÿzAssociationProxyInstance.anycKs<|jdkr&|jr|jr&|js&t d¡‚|jf|ddœ|—ŽS)aProduce a proxied 'has' expression using EXISTS.
 
        This expression will be a composed product
        using the :meth:`.Relationship.Comparator.any`
        and/or :meth:`.Relationship.Comparator.has`
        operators of the underlying proxied attributes.
 
        Nz4'has()' not implemented for collections.  Use any().Trrrr\r\r]Úhas3s 
ÿþþÿÿÿzAssociationProxyInstance.hascCsd|jj|jfS)Nz%s(%r))Ú    __class__rar†r|r\r\r]rÌKsz!AssociationProxyInstance.__repr__)N)N)N)&rarbrcr—r˜r›Ú classmethodr¯rÛräÚpropertyrærèrÖr#Úmemoized_propertyrérërírWrðrñròrïr–Zro_non_memoized_propertyrFrr¢r¦r¨rùr    r
rrrrÌr\r\r\r]r®'sh
    .            
Bþ#þþr®cs¸eZdZdZdZddœdd„Zdddœ‡fd    d
„ Zd ddœd d „Zd ddœdd„Zd#ddddœdd„Z    d$ddddœdd„Z
e j ddœdd„ƒZ dddœdd„Zdddd œd!d"„Z‡ZS)%rØzcan :class:`.AssociationProxyInstance` where we cannot determine
    the type of target object.
    Frr{cCs"td|jj|j|j|jfƒ‚dS)NzÀAssociation proxy %s.%s refers to an attribute '%s' that is not directly mapped on class %s; therefore this operation cannot proceed since we don't know what type of object is referred towards)r×rÎrarVr…rÏr|r\r\r]Ú
_ambiguousVsüüÿz,AmbiguousAssociationProxyInstance._ambiguousrrøcs|dkr |Stƒ |¡SdSrg)Úsuperr¢r÷©rr\r]r¢dsz%AmbiguousAssociationProxyInstance.getr cCs | ¡dSrg©rr÷r\r\r]Ú__eq__jsz(AmbiguousAssociationProxyInstance.__eq__cCs | ¡dSrgr r÷r\r\r]Ú__ne__msz(AmbiguousAssociationProxyInstance.__ne__Nr r cKs | ¡dSrgr rr\r\r]rpsz%AmbiguousAssociationProxyInstance.anycKs | ¡dSrgr rr\r\r]rwsz%AmbiguousAssociationProxyInstance.hasz-Dict[Type[Any], AssociationProxyInstance[_T]]cCsiSrgr\r|r\r\r]Ú _lookup_cache~sz/AmbiguousAssociationProxyInstance._lookup_cacher)rÐrXcCsˆ|dk    r„t||jƒ}|dk    r„z t|ƒ}Wntjk
r>YnFX|j}|j}||jkrb| ||¡z |j|WSt    k
r‚YnX|Srg)
rárVr!r r´rµr‘r#Ú_populate_cacher¬)rhrÐZ
actual_objr¶rµÚinstance_classr\r\r]r²…s   
  z?AmbiguousAssociationProxyInstance._non_canonical_get_for_objectz Mapper[Any]rn)r%rµrXcCstt |j¡ |j¡}| |j¡rp|}z| ||j¡}Wnt    k
rJYn&X| 
t d|ƒ|j |j||j¡|j |<dS)Nr)r"rÒrÎrÓrVZisarµrÖr…r×rÛrr†r#)rhr%rµrÝrÏrÞr\r\r]r$žs& ÿ ÿûz1AmbiguousAssociationProxyInstance._populate_cache)N)N)rarbrcr—r±rr¢r!r"rrr#rr#r²r$Ú __classcell__r\r\rr]rØOsþ    þrØc@sTeZdZUdZdZded<dZddddœdd    „Zddd
œd d „Zddd
œd d„Z    dS)ràzEan :class:`.AssociationProxyInstance` that has an object as a target.TrTròrr )ÚotherÚkwrXcKs’|j}|dk    r.|j |js$| |¡n||k¡S|jr\|jr\|js\|j t|j    |j
ƒ |¡¡S|jrz|jrz|jrzt   d¡‚n|jjf|j
|iŽSdS)aIProduce a proxied 'contains' expression using EXISTS.
 
        This expression will be a composed product
        using the :meth:`.Relationship.Comparator.any`,
        :meth:`.Relationship.Comparator.has`,
        and/or :meth:`.Relationship.Comparator.contains`
        operators of the underlying proxied attributes.
        Nz<contains() doesn't apply to a scalar object endpoint; use ==) rérærrðÚcontainsròrñrrárÏr…r rÚ)rhr'r(rÞr\r\r]r)½s.
ÿ ýÿþýÿÿÿz'ObjectAssociationProxyInstance.containsrøcCs@|dkr(t|jjf|j|iŽ|jdkƒS|jjf|j|iŽSdSrg)r-rærr…r÷r\r\r]r!às þz%ObjectAssociationProxyInstance.__eq__cCs|j t|j|jƒ|k¡Srg)rærrárÏr…r÷r\r\r]r"ësÿz%ObjectAssociationProxyInstance.__ne__N)
rarbrcr—ròr˜r±r)r!r"r\r\r\r]rà·s
 # ràc@sFeZdZUdZdZded<dZdddœd    d
„Zd ddd d œdd„ZdS)rãzVan :class:`.AssociationProxyInstance` that has a database column as a
    target.
    FrTròTrr ©r'rXcCs6| |j tj|¡¡}|dkr.t||jdkƒS|SdSrg)rrëÚoperater,Úeqr-ræ)rhr'Úexprr\r\r]r!ûs ÿz%ColumnAssociationProxyInstance.__eq__zoperators.OperatorTypezColumnElement[Any])Úopr'rrXcOs| |jj|f|ž|Ž¡Srg)rrër+)rhr.r'rr\r\r]r+sÿz&ColumnAssociationProxyInstance.operateN)    rarbrcr—ròr˜r±r!r+r\r\r\r]rãós
 
 
rãc@sHeZdZdddœdd„Zddœdd    „Zddœd
d „Zdd d œdd„ZdS)rúrrN©r’rûcCs||_||_dSrg©r†rûrr\r\r]r›sz_lazy_collection.__init__rzr{cCst|j|jƒSrg)rár†rûr|r\r\r]risz_lazy_collection.__call__cCs|j|jdœS)Nr/r0r|r\r\r]Ú __getstate__sz_lazy_collection.__getstate__rn©ÚstaterXcCs|d|_|d|_dS)Nr’rûr0©rhr3r\r\r]Ú __setstate__s
z_lazy_collection.__setstate__N)rarbrcr›rir1r5r\r\r\r]rú srúÚ_ITrc@s°eZdZUded<ded<ded<ded<d    ed
<d    ddddd œd d „ZejrXded<n edd„ƒZddœdd„Z    ddœdd„Z
ddœdd„Z dddœdd„Z ddœd d!„Z d"S)#Ú_AssociationCollectionz_GetterProtocol[_IT]rºrrrBzAssociationProxyInstance[_IT]r†rkrz_LazyCollectionProtocol[_IT]r„©r„rBrºrr†cCs"||_||_||_||_||_dS)z¡Constructs an _AssociationCollection.
 
        This will always be a subclass of either _AssociationList,
        _AssociationSet, or _AssociationDict.
 
        Nr8)rhr„rBrºrr†r\r\r]r›@s
z_AssociationCollection.__init__zCollection[_IT]ÚcolcCs| ¡Srg)r„r|r\r\r]Ú<lambda>Wóz_AssociationCollection.<lambda>Úintr{cCs
t|jƒSrg©Úlenr9r|r\r\r]Ú__len__Ysz_AssociationCollection.__len__rTcCs
t|jƒSrg)rTr9r|r\r\r]Ú__bool__\sz_AssociationCollection.__bool__rcCs|j|jdœS)N©r†r„rAr|r\r\r]r1_sz#_AssociationCollection.__getstate__rnr2cCs$|d|_|d|_|j |¡dS)Nr†r„)r†r„r
r4r\r\r]r5bs
 
z#_AssociationCollection.__setstate__cCs
tƒ‚dSrgrçr|r\r\r]Úcleargsz_AssociationCollection.clearN)rarbrcr˜r›ÚtypingÚ TYPE_CHECKINGrr9r?r@r1r5rBr\r\r\r]r7)s
    
 r7c@sPeZdZUded<ded<dddœdd    „Zddd
œd d „Zd dddœdd„ZdS)Ú_AssociationSingleItemrôrrýrBr9rrtcCs
| |¡Srg©rBrur\r\r]Ú_createosz_AssociationSingleItem._create©Úobject_rXcCs
| |¡Srg©rº©rhrIr\r\r]Ú_getrsz_AssociationSingleItem._getrz Iterable[_IT]rn©Ú assoc_proxyr¥rXcCs| ¡| ||¡dSrg)rBr    )rhrNr¥r\r\r]rþusz$_AssociationSingleItem._bulk_replaceN)rarbrcr˜rGrLrþr\r\r\r]rEks
 
rEc@sþeZdZUdZded<ddddœdd    „Zed
dd œd d „ƒZeddd œdd „ƒZddd œdd „Zed
dddœdd„ƒZeddddœdd„ƒZddddœdd„Zed
dd œdd„ƒZ    eddd œdd„ƒZ    ddd œdd„Z    dd d!œd"d#„Z
d$d%œd&d'„Z ddd!œd(d)„Z dd
d!œd*d+„Z ddd,œd-d.„Zd
dddœd/d0„Zdhd
dd œd2d3„Zddd!œd4d5„Zd6d%œd7d8„Zd6d%œd9d:„Zdd%œd;d<„Zdd d=œd>d?„Zdd d=œd@dA„ZdBd d=œdCdD„ZdBd d=œdEdF„ZdBd d=œdGdH„ZdBd d=œdIdJ„ZdBdBd=œdKdL„ZdBdBd=œdMdN„ZdOdBdPœdQdR„ZdOdBdPœdSdT„ZddUdVœdWdX„ZdOdUdPœdYdZ„Z e!j"rbdidd
d
d
d\œd]d^„Z#ndd
d!œd_d^„Z#dBd%œd`da„Z$dbd%œdcdd„Z%d6d%œdedf„Z&e!j"súe'e(ƒ )¡ƒD]B\Z*Z+e,e+ƒr²e+je*kr²e+js²e-e'e*ƒr²e.e'e*ƒje+_q²[*[+dgS)jrz(Generic, converting, list-to-list proxy.zMutableSequence[_T]r9rr9rn)rIrorXcCs| ||¡dSrg©r)rhrIror\r\r]r    sz_AssociationList._setr<)ÚindexrXcCsdSrgr\©rhrPr\r\r]Ú __getitem__„sz_AssociationList.__getitem__ÚslicecCsdSrgr\rQr\r\r]rRˆszUnion[int, slice]zUnion[_T, MutableSequence[_T]]cs6t|tƒsˆ ˆj|¡S‡fdd„ˆj|DƒSdS)Ncsg|]}ˆ |¡‘qSr\)rL)Ú.0Úmemberr|r\r]Ú
<listcomp>’sz0_AssociationList.__getitem__.<locals>.<listcomp>)rÔrSrLr9rQr\r|r]rRŒs
)rProrXcCsdSrgr\©rhrPror\r\r]Ú __setitem__”sz_AssociationList.__setitem__ú Iterable[_T]cCsdSrgr\rWr\r\r]rX˜szUnion[_T, Iterable[_T]]c
Cst|tƒs$| |j|td|ƒ¡nð|jdkr8t|ƒ}n |jdkrRt|ƒ|j}n|j}|jp`d}|jpjd}t    t
|jpxd||ƒƒ}t    |ƒ}|dkrÆ|D]
}||=q–|}|D]}    |  ||    ¡|d7}qªnNt|ƒt|ƒkrît dt|ƒt|ƒfƒ‚t ||ƒD]\}}    | |j||    ¡qødS)Nr9rézBattempt to assign sequence of size %s to extended slice of size %s)rÔrSr    r9rÚstopr>ÚstepÚstartrÚrangeÚinsertÚ
ValueErrorÚzip)
rhrPror[r\r]ÚrngZ sized_valueÚiÚitemr\r\r]rXœs4
 
 
 
 
 
  þÿcCsdSrgr\rQr\r\r]Ú __delitem__Àsz_AssociationList.__delitem__cCsdSrgr\rQr\r\r]reÄszUnion[slice, int]cCs |j|=dSrg©r9rQr\r\r]reÈsr rTrtcCs$|jD]}| |¡|krdSqdS©NTF©r9rL)rhrorUr\r\r]Ú __contains__Ës
z_AssociationList.__contains__ú Iterator[_T]r{ccs|jD]}| |¡VqdS)zÇIterate over proxied values.
 
        For the actual domain objects, iterate over .col instead or
        just use the underlying collection directly from its property
        on the parent.
        Nrh©rhrUr\r\r]Ú__iter__Òs
z_AssociationList.__iter__cCs|j}| |¡}| |¡dSrg)r9rGÚappend)rhror9rdr\r\r]rmÞs
z_AssociationList.appendcCs"d}|D]}||kr|d7}q|S©NrrZr\)rhroÚcountrÃr\r\r]roãs
 
z_AssociationList.count)r¥rXcCs|D]}| |¡qdSrg)rm)rhr¥rÃr\r\r]rêsz_AssociationList.extendcCs| |¡g|j||…<dSrg)rGr9rWr\r\r]r_îsz_AssociationList.insertéÿÿÿÿcCs| |j |¡¡Srg)rºr9rrQr\r\r]rñsz_AssociationList.popcCs4t|ƒD]\}}||kr|j|=dSqtdƒ‚dS)Nzvalue not in list)Ú    enumerater9r`)rhrorcÚvalr\r\r]Úremoveôs
z_AssociationList.removercCs
tƒ‚dS)z#Not supported, use reversed(mylist)Nrçr|r\r\r]Úreverseûsz_AssociationList.reversecCs
tƒ‚dS)z!Not supported, use sorted(mylist)Nrçr|r\r\r]Úsortsz_AssociationList.sortcCs|jdt|jƒ…=dS)Nr)r9r>r|r\r\r]rBsz_AssociationList.clearr*cCs t|ƒ|kSrg©r©rhr'r\r\r]r!sz_AssociationList.__eq__cCs t|ƒ|kSrgrvrwr\r\r]r" sz_AssociationList.__ne__zList[_T]cCs t|ƒ|kSrgrvrwr\r\r]Ú__lt__sz_AssociationList.__lt__cCs t|ƒ|kSrgrvrwr\r\r]Ú__le__sz_AssociationList.__le__cCs t|ƒ|kSrgrvrwr\r\r]Ú__gt__sz_AssociationList.__gt__cCs t|ƒ|kSrgrvrwr\r\r]Ú__ge__sz_AssociationList.__ge__cCs2z t|ƒ}Wntk
r$tYSXt|ƒ|Srg©rÚ    TypeErrorÚNotImplementedrwr\r\r]Ú__add__s
 
z_AssociationList.__add__cCs2z t|ƒ}Wntk
r$tYSX|t|ƒSrgr|rwr\r\r]Ú__radd__!s
 
z_AssociationList.__radd__r2)ÚnrXcCst|tƒstSt|ƒ|Srg©rÔr<r~r©rhrr\r\r]Ú__mul__(s
z_AssociationList.__mul__cCst|tƒstS|t|ƒSrgr‚rƒr\r\r]Ú__rmul__-s
z_AssociationList.__rmul__r1)ÚiterablerXcCs| |¡|Srg)r)rhr†r\r\r]Ú__iadd__2s
z_AssociationList.__iadd__cCsDt|tƒstƒ‚|dkr"| ¡n|dkr@| t|ƒ|d¡|Srn)rÔr<rÕrBrrrƒr\r\r]Ú__imul__6s
 
z_AssociationList.__imul__.)ror]r[rXcCsdSrgr\)rhror]r[r\r\r]rPEsz_AssociationList.indexcGst|ƒ}|j|f|žŽSrg)rrP)rhroÚargZlsr\r\r]rPJscCst|ƒSrgrvr|r\r\r]ÚcopyNsz_AssociationList.copyrNcCs tt|ƒƒSrg)rIrr|r\r\r]rÌQsz_AssociationList.__repr__cCstdt|ƒjƒ‚dS©Nz%s objects are unhashable©r}r™rar|r\r\r]Ú__hash__Tsz_AssociationList.__hash__N)rp)..)/rarbrcr—r˜r    rrRrXrerirlrmrorr_rrsrtrurBr!r"rxryrzr{rr€r„r…r‡rˆrCrDrPrŠrÌrrÚlocalsÚitemsÚ    func_nameÚfuncÚcallablerârár\r\r\r]r|sv
$  ÿþýürc@s”eZdZUdZded<ded<ded<dd    d
d œd d „Zd
ddœdd„Zd
ddddœdd„Zdddœdd„Zdddd œdd„Z    dddœdd„Z
dddœdd „Z d!d"œd#d$„Z dd"œd%d&„Z ddd'œd(d)„Zddd'œd*d+„Zd,d"œd-d.„Zedd    d/œd0d1„ƒZedd2d2d3œd4d1„ƒZdcdd6d7d8œd9d1„Zdddd    dd8œd:d;„Zd<d"œd=d>„Zd?d"œd@dA„ZdBd"œdCdD„Zeddd/œdEdF„ƒZededd2d2d3œdHdF„ƒZdd
d
d2dIœdJdF„ZdKd"œdLdM„ZedNdddOœdPdQ„ƒZedRdddOœdSdQ„ƒZedddTœdUdQ„ƒZd
d
ddVœdWdQ„ZdXdYddZœd[d\„Zd]d"œd^d_„Zd`d"œdadb„Zejsee ƒ ¡ƒD]B\Z!Z"e#e"ƒrHe"je!krHe"jsHe$e%e!ƒrHe&e%e!ƒje"_qH[!["d5S)frz(Generic, converting, dict-to-dict proxy.z_DictSetterProtocol[_VT]rz_KeyCreatorProtocol[_VT]rBz"MutableMapping[_KT, Optional[_VT]]r9r@z Optional[_VT]rrwcCs | ||¡SrgrFrxr\r\r]rGjsz_AssociationDict._createrArHcCs
| |¡SrgrJrKr\r\r]rLmsz_AssociationDict._getrn)rIrqrorXcCs| |||¡SrgrO)rhrIrqror\r\r]r    psz_AssociationDict._set)rqrXcCs| |j|¡Srg)rLr9©rhrqr\r\r]rRssz_AssociationDict.__getitem__cCs6||jkr | |j|||¡n| ||¡|j|<dSrg)r9r    rGrxr\r\r]rXvs
z_AssociationDict.__setitem__cCs |j|=dSrgrfr“r\r\r]re|sz_AssociationDict.__delitem__r rTcCs
||jkSrgrfr“r\r\r]risz_AssociationDict.__contains__z Iterator[_KT]r{cCst|j ¡ƒSrg)Úiterr9Úkeysr|r\r\r]rl‚sz_AssociationDict.__iter__cCs|j ¡dSrg©r9rBr|r\r\r]rB…sz_AssociationDict.clearr*cCs t|ƒ|kSrg©rÉrwr\r\r]r!ˆsz_AssociationDict.__eq__cCs t|ƒ|kSrgr—rwr\r\r]r"‹sz_AssociationDict.__ne__rNcCs tt|ƒƒSrg)rIrÉr|r\r\r]r̎sz_AssociationDict.__repr__)Ú_AssociationDict__keyrXcCsdSrgr\©rhr˜r\r\r]r¢‘sz_AssociationDict.getzUnion[_VT, _T])r˜rJrXcCsdSrgr\©rhr˜rJr\r\r]r¢•sNzOptional[Union[_VT, _T]]zUnion[_VT, _T, None])rqrJrXcCs(z
||WStk
r"|YSXdSrg)r¬©rhrqrJr\r\r]r¢™s
cCs,||jkr | ||¡|j|<|S||SdSrg)r9rGr›r\r\r]Ú
setdefault¡s
z_AssociationDict.setdefaultz KeysView[_KT]cCs
|j ¡Srg)r9r•r|r\r\r]r•­sz_AssociationDict.keyszItemsView[_KT, _VT]cCst|ƒSrgr
r|r\r\r]r°sz_AssociationDict.itemszValuesView[_VT]cCst|ƒSrgrr|r\r\r]r¥³sz_AssociationDict.valuescCsdSrgr\r™r\r\r]r¶sz_AssociationDict.pop.cCsdSrgr\ršr\r\r]rºs)r˜r‰r(rXcOs|jj|f|ž|Ž}| |¡Srg)r9rrL)rhr˜r‰r(rUr\r\r]r¾szTuple[_KT, _VT]cCs |j ¡}|d| |d¡fSrn)r9ÚpopitemrL)rhrdr\r\r]rÂs
z_AssociationDict.popitemz SupportsKeysAndGetItem[_KT, _VT])Ú_AssociationDict__mrrXcKsdSrgr\©rhržrr\r\r]rÆsz_AssociationDict.updatezIterable[tuple[_KT, _VT]]cKsdSrgr\rŸr\r\r]rÌs)rrXcKsdSrgr\)rhrr\r\r]rÐs)Úar(rXcOs.i}|j||Ž| ¡D]\}}|||<qdSrg)rr)rhr r(Zuprqror\r\r]rÔs rzMapping[_KT, _VT]rMc    Cs~t|ƒ}| |pd¡}t|pdƒ |¡}| |¡}| ¡p<dD]*\}}||krX|||<q>||kr>|||<q>|D]
}||=qndS©Nr\)r¦Ú intersectionÚ
differencer)    rhrNr¥ÚexistingÚ    constantsÚ    additionsÚremovalsrqrUr\r\r]rþÛs
 
 
z_AssociationDict._bulk_replacezDict[_KT, _VT]cCs t| ¡ƒSrg)rÉrr|r\r\r]rŠîsz_AssociationDict.copyrcCstdt|ƒjƒ‚dSr‹rŒr|r\r\r]rñsz_AssociationDict.__hash__)N)N).)'rarbrcr—r˜rGrLr    rRrXrerirlrBr!r"rÌrr¢rœr•rr¥rrrrþrŠrrCrDrrŽrr‘r’rârÉrár\r\r\r]rcsl
ÿ ÿþýürc@sÈeZdZUdZded<ddœdd„Zddœd    d
„Zd dd œd d„Zddœdd„Zdddœdd„Z    dddœdd„Z
dddœdd„Z ddœdd„Z dddœdd „Z d!ddd"œd#d$„Zd%d&d'œd(d)„Zd*dœd+d,„Zd-d&dœd.d/„Zd%d&d0œd1d2„Zd3ddœd4d5„Zd6ddœd7d8„Zd3ddœd9d:„Zd6d;dœd<d=„Zd3ddœd>d?„Zd6ddœd@dA„Zd3ddœdBdC„Zd6d;dœdDdE„Zddd0œdFdG„Zd%d&dœdHdI„Zd3dd'œdJdK„Zd%d&d'œdLdM„Zd3dd0œdNdO„Zd3dd0œdPdQ„Z ddœdRdS„Z!dTdœdUdV„Z"d dd'œdWdX„Z#d dd'œdYdZ„Z$d6dd'œd[d\„Z%d6dd'œd]d^„Z&d6dd'œd_d`„Z'd6dd'œdadb„Z(dcdœddde„Z)dfdœdgdh„Z*e+j,sÄe-e.ƒ /¡ƒD]B\Z0Z1e2e1ƒr|e1je0kr|e1js|e3e4e0ƒr|e5e4e0ƒje1_q|[0[1diS)jrz&Generic, converting, set-to-set proxy.zMutableSet[_T]r9r<r{cCs
t|jƒSrgr=r|r\r\r]r?sz_AssociationSet.__len__rTcCs|jr
dSdSdSrgrfr|r\r\r]r@sz_AssociationSet.__bool__r )Ú_AssociationSet__orXcCs$|jD]}| |¡|krdSqdSrgrh)rhr¨rUr\r\r]ris
z_AssociationSet.__contains__rjccs|jD]}| |¡VqdS)zÀIterate over proxied values.
 
        For the actual domain objects, iterate over .col instead or just use
        the underlying collection directly from its property on the parent.
 
        Nrhrkr\r\r]rls
z_AssociationSet.__iter__r9rn)Ú_AssociationSet__elementrXcCs||kr|j | |¡¡dSrg)r9ÚaddrG)rhr©r\r\r]rªsz_AssociationSet.addcCs.|jD]"}| |¡|kr|j |¡q*qdSrg)r9rLÚdiscard©rhr©rUr\r\r]r«%s
 z_AssociationSet.discardcCs8|jD]$}| |¡|kr|j |¡dSqt|ƒ‚dSrg)r9rLr«r¬r¬r\r\r]rs+s
 
 z_AssociationSet.removecCs"|jstdƒ‚|j ¡}| |¡S)Nzpop from an empty set)r9r¬rrLrkr\r\r]r2s
z_AssociationSet.poprY)ÚsrXcGs"|D]}|D]}| |¡q qdSrg)rª)rhr­r†ror\r\r]r8sz_AssociationSet.updaterrMc
Cs„t|ƒ}| |pd¡}t|pdƒ |¡}| |¡}|j}|j}|pDdD]&}    |    |kr\||    ƒqF|    |krF||    ƒqF|D] }    ||    ƒqrdSr¡)r¦r¢r£rªrs)
rhrNr¥r¤r¥r¦r§ZappenderZremoverrUr\r\r]rþ=s
 
 
z_AssociationSet._bulk_replacezAbstractSet[_S]zMutableSet[Union[_T, _S]]r*cCs*t ||¡stƒ‚|D]}| |¡q|Srg)r$Ú_set_binops_check_strictrÕrª)rhr'ror\r\r]Ú__ior__Os
  z_AssociationSet.__ior__zSet[_T]cCs tt|ƒƒSrg)r¦r”r|r\r\r]r    Xsz_AssociationSet._setz Iterable[_S]cGst|ƒj|ŽSrg)r¦Úunion©rhr­r\r\r]r°[sz_AssociationSet.union)Ú_AssociationSet__srXcCs
| |¡Srg)r°©rhr²r\r\r]Ú__or__^sz_AssociationSet.__or__r‰cGst|ƒj|ŽSrg)r¦r£r±r\r\r]r£asz_AssociationSet.differencezAbstractSet[Any]cCs
| |¡Srg)r£r±r\r\r]Ú__sub__dsz_AssociationSet.__sub__cGs"|D]}|D]}| |¡q qdSrg)r«)rhr­r'ror\r\r]Údifference_updategsz!_AssociationSet.difference_updater1cCs*t ||¡stƒ‚|D]}| |¡q|Srg)r$r®rÕr«)rhr­ror\r\r]Ú__isub__ls
  z_AssociationSet.__isub__cGst|ƒj|ŽSrg)r¦r¢r±r\r\r]r¢ssz_AssociationSet.intersectioncCs
| |¡Srg)r¢r±r\r\r]Ú__and__vsz_AssociationSet.__and__cGs\|D]R}| |¡t|ƒ}}||||}}|D]}| |¡q2|D]}| |¡qFqdSrg)r¢r¦rsrª)rhr­r'ÚwantÚhaversrªror\r\r]Úintersection_updateys z#_AssociationSet.intersection_updatecCsbt ||¡stƒ‚| |¡}t|ƒ}||||}}|D]}| |¡q:|D]}| |¡qN|Srg)r$r®rÕr¢r¦rsrª)rhr­r¹rºrsrªror\r\r]Ú__iand__„s 
  z_AssociationSet.__iand__cCst|ƒ |¡Srg)r¦Úsymmetric_differencer³r\r\r]r½’sz$_AssociationSet.symmetric_differencecCs
| |¡Srg)r½r±r\r\r]Ú__xor__•sz_AssociationSet.__xor__cCsR| |¡t|ƒ}}||||}}|D]}| |¡q*|D]}| |¡q>dSrg)r½r¦rsrª)rhr'r¹rºrsrªror\r\r]Úsymmetric_difference_update˜s  z+_AssociationSet.symmetric_difference_updatecCs t ||¡stƒ‚| |¡|Srg)r$r®rÕr¿rwr\r\r]Ú__ixor__¢s 
z_AssociationSet.__ixor__cCst|ƒ |¡Srg)r¦Úissubsetr³r\r\r]rÁ©sz_AssociationSet.issubsetcCst|ƒ |¡Srg)r¦Ú
issupersetr³r\r\r]r¬sz_AssociationSet.issupersetcCs|j ¡dSrgr–r|r\r\r]rB¯sz_AssociationSet.clearzAbstractSet[_T]cCst|ƒSrg©r¦r|r\r\r]rвsz_AssociationSet.copycCs t|ƒ|kSrgrÃrwr\r\r]r!µsz_AssociationSet.__eq__cCs t|ƒ|kSrgrÃrwr\r\r]r"¸sz_AssociationSet.__ne__cCs t|ƒ|kSrgrÃrwr\r\r]rx»sz_AssociationSet.__lt__cCs t|ƒ|kSrgrÃrwr\r\r]ry¾sz_AssociationSet.__le__cCs t|ƒ|kSrgrÃrwr\r\r]rzÁsz_AssociationSet.__gt__cCs t|ƒ|kSrgrÃrwr\r\r]r{Äsz_AssociationSet.__ge__rNcCs tt|ƒƒSrg)rIr¦r|r\r\r]rÌÇsz_AssociationSet.__repr__rcCstdt|ƒjƒ‚dSr‹rŒr|r\r\r]rÊsz_AssociationSet.__hash__N)6rarbrcr—r˜r?r@rirlrªr«rsrrrþr¯r    r°r´r£rµr¶r·r¢r¸r»r¼r½r¾r¿rÀrÁrÂrBrŠr!r"rxryrzr{rÌrrCrDrrŽrrr‘r’râr¦rár\r\r\r]rsh
      
ÿþýür)dr—Ú
__future__rrÇrCrrrrrrr    r r r rrrrrrrrrrrrrrrÚrr r!r"r#r$r%r&r'Zorm.baser(Zorm.interfacesr)r*r+Zsqlr,r-Zsql.baser.Z util.typingr/r0r1r2r3rDr4r5Z
orm.mapperr6Z sql._typingr7r8r9r;r=r?r@rAZNO_ARGr^r_rdrkrmrprrrsrvryr}rƒr‡rŒZInspectionAttrInfor[rÍr®rØràrãrúr6r7rErrrr\r\r\r]Ú<module>sâ                                                        ñ.      
üO ,h<
Bh