Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
contego / home / tvault / .virtenv / lib / python2.7 / site-packages / sqlalchemy / orm / attributes.pyc
Size: Mime:
ó
‹EYc@sdZddlZddlmZmZmZddlmZmZmZ	ddl
mZmZm
Z
ddl
mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZm Z dd	l
m!Z!m"Z"ej#d
ej$ej%ej&fd„ƒYƒZ'de'fd
„ƒYZ(d„Z)ej*dƒZ+ej*dƒZ,ej*dƒZ-de.fd„ƒYZ/de.fd„ƒYZ0de0fd„ƒYZ1de1fd„ƒYZ2de0fd„ƒYZ3d„Z4ej*dƒZ5e6e7eƒe7eƒe7eƒgƒZ8ej9ddd d!gƒZ:de:fd"„ƒYZ:e:e;e;e;ƒZ<ed#„Z=ed$„Z>e?d%„Z@d&„ZAe?e;e?e;e;d'„ZBe;e;e;d(„ZCd)„ZDd*„ZEd+„ZFd,„ZGd-„ZHd.„ZId/„ZJd0„ZKdS(1sÍDefines instrumentation for class attributes and their interaction
with instances.

This module is usually not directly visible to user applications, but
defines a large part of the ORM's interactivity.


iÿÿÿÿNi(tutilteventt
inspectioni(t
interfacestcollectionstexc(tinstance_statet
instance_dicttmanager_of_class(tPASSIVE_NO_RESULTtATTR_WAS_SETt
ATTR_EMPTYtNO_VALUEt	NEVER_SETt	NO_CHANGEtCALLABLES_OKtSQL_OKtRELATED_OBJECT_OKtINIT_OKtNON_PERSISTENT_OKtLOAD_AGAINST_COMMITTEDtPASSIVE_OFFtPASSIVE_RETURN_NEVER_SETtPASSIVE_NO_INITIALIZEtPASSIVE_NO_FETCHtPASSIVE_NO_FETCH_RELATEDtPASSIVE_ONLY_PERSISTENTtNO_AUTOFLUSH(t	state_strtinstance_strtQueryableAttributecBsòeZdZeZddddd„Zejd„ƒZ	e
d„Zd„Zejd„ƒZ
ejd„ƒZed„ƒZd„Zd	„Zd
„Zd„Zd„Zd
„Zd„Zed„Zd„Zd„Zejd„ƒZRS(s£Base class for :term:`descriptor` objects that intercept
    attribute events on behalf of a :class:`.MapperProperty`
    object.  The actual :class:`.MapperProperty` is accessible
    via the :attr:`.QueryableAttribute.property`
    attribute.


    .. seealso::

        :class:`.InstrumentedAttribute`

        :class:`.MapperProperty`

        :attr:`.Mapper.all_orm_descriptors`

        :attr:`.Mapper.attrs`
    c	Cs‰||_||_||_||_||_||_t|ƒ}|r…x:|jD],}||krR|jj	||jƒqRqRWndS(N(
tclass_tkeytimplt
comparatort
_parententityt_of_typeRt_basestdispatcht_update(	tselfRR R!R"tparententitytof_typetmanagertbase((sN/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/attributes.pyt__init__7s						cCs
|jjS(N(R!tsupports_population(R(((sN/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/attributes.pyt_supports_populationJscCs"|jjt|ƒt|ƒ|ƒS(N(R!tget_historyRR(R(tinstancetpassive((sN/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/attributes.pyR0NscCs|S(N((R(((sN/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/attributes.pyt__selectable__RscCs
|jjS(s¶Return the 'info' dictionary for the underlying SQL element.

        The behavior here is as follows:

        * If the attribute is a column-mapped property, i.e.
          :class:`.ColumnProperty`, which is mapped directly
          to a schema-level :class:`.Column` object, this attribute
          will return the :attr:`.SchemaItem.info` dictionary associated
          with the core-level :class:`.Column` object.

        * If the attribute is a :class:`.ColumnProperty` but is mapped to
          any other kind of SQL expression other than a :class:`.Column`,
          the attribute will refer to the :attr:`.MapperProperty.info`
          dictionary associated directly with the :class:`.ColumnProperty`,
          assuming the SQL expression itself does not have its own ``.info``
          attribute (which should be the case, unless a user-defined SQL
          construct has defined one).

        * If the attribute refers to any other kind of
          :class:`.MapperProperty`, including :class:`.RelationshipProperty`,
          the attribute will refer to the :attr:`.MapperProperty.info`
          dictionary associated with that :class:`.MapperProperty`.

        * To access the :attr:`.MapperProperty.info` dictionary of the
          :class:`.MapperProperty` unconditionally, including for a
          :class:`.ColumnProperty` that's associated directly with a
          :class:`.schema.Column`, the attribute can be referred to using
          :attr:`.QueryableAttribute.property` attribute, as
          ``MyClass.someattribute.property.info``.

        .. versionadded:: 0.8.0

        .. seealso::

            :attr:`.SchemaItem.info`

            :attr:`.MapperProperty.info`

        (R"tinfo(R(((sN/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/attributes.pyR4Vs)cCstj|jƒS(sReturn an inspection instance representing the parent.

        This will be either an instance of :class:`.Mapper`
        or :class:`.AliasedInsp`, depending upon the nature
        of the parent entity which this attribute is associated
        with.

        (RtinspectR#(R(((sN/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/attributes.pytparents
cCs
|jjƒS(N(R"t__clause_element__(R(((sN/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/attributes.pyt
expressionscCs
|jjƒS(N(R"R7(R(((sN/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/attributes.pyR7‘scCs
|jjƒS(shlike __clause_element__(), but called specifically
        by :class:`.Query` to allow special behavior.(R"t_query_clause_element(R(((sN/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/attributes.pyR9”sc	CsG|jst‚|j|j|jd|jd|jj|ƒd|ƒS(NR!R"R)(R$tAssertionErrort	__class__tentityR R!R"tadapt_to_entity(R(R=((sN/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/attributes.pyR=šs		cCs4t|j|j|j|jj|ƒ|jd|ƒS(NR*(RRR R!R"R*R#(R(tcls((sN/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/attributes.pyR*¢s	cCs|jƒj|ƒS(N(R9tlabel(R(tname((sN/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/attributes.pyR?«scOs||j||ŽS(N(R"(R(toptothertkwargs((sN/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/attributes.pytoperate®scKs|||j|S(N(R"(R(RARBRC((sN/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/attributes.pytreverse_operate±scCs|jj|d|ƒtk	S(Nt
optimistic(R!t	hasparenttFalse(R(tstateRF((sN/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/attributes.pyRG´scCs]yt|j|ƒSWnBtk
rXtdt|ƒjt|jƒj||fƒ‚nXdS(NsFNeither %r object nor %r object associated with %s has an attribute %r(tgetattrR"tAttributeErrorttypet__name__(R(R ((sN/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/attributes.pyt__getattr__·s
cCsd|jj|jfS(Ns%s.%s(RRMR (R(((sN/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/attributes.pyt__str__ÄscCs
|jjS(sèReturn the :class:`.MapperProperty` associated with this
        :class:`.QueryableAttribute`.


        Return values here will commonly be instances of
        :class:`.ColumnProperty` or :class:`.RelationshipProperty`.


        (R"tproperty(R(((sN/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/attributes.pyRPÇsN(RMt
__module__t__doc__tTruetis_attributetNoneR-Rtmemoized_propertyR/RR0R3R4R6RPR8R7R9R=R*R?RDRERHRGRNRO(((sN/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/attributes.pyRs,	+									
	tInstrumentedAttributecBs)eZdZd„Zd„Zd„ZRS(s¤Class bound instrumented attribute which adds basic
    :term:`descriptor` methods.

    See :class:`.QueryableAttribute` for a description of most features.


    cCs)|jjt|ƒt|ƒ|dƒdS(N(R!tsetRRRU(R(R1tvalue((sN/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/attributes.pyt__set__ÞscCs#|jjt|ƒt|ƒƒdS(N(R!tdeleteRR(R(R1((sN/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/attributes.pyt
__delete__âscCs\|dkr|St|ƒ}|jr?|j|kr?||jS|jjt|ƒ|ƒSdS(N(RURR/R R!tgetR(R(R1townertdict_((sN/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/attributes.pyt__get__ås(RMRQRRRZR\R`(((sN/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/attributes.pyRWÕs		csXdtf‡fd†ƒY}tˆƒjd|_tj|tˆƒdddˆƒ|S(s´Create an QueryableAttribute / user descriptor hybrid.

    Returns a new QueryableAttribute type that delegates descriptor
    behavior and getattr() to the given descriptor.
    tProxycskeZdZdddd„Zed„ƒZejd„ƒZd„Z	d„Z
d„Z‡fd†ZRS(	sžPresents the :class:`.QueryableAttribute` interface as a
        proxy on top of a Python descriptor / :class:`.PropComparator`
        combination.

        cSsC||_||_||_||_||_||_||_dS(N(RR t
descriptortoriginal_propertyt_comparatort_adapt_to_entityRR(R(RR RbR"R=tdocRc((sN/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/attributes.pyR-s						cSs
|jjS(N(R"RP(R(((sN/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/attributes.pyRP
scSsOtj|jƒr$|jƒ|_n|jrH|jj|jƒ|_n|jS(N(RtcallableRdReR=(R(((sN/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/attributes.pyR"s		cSs%|j|j|j|j|j|ƒS(N(R;R<R RbRd(R(R=((sN/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/attributes.pyR=s
cSs'|dkr|S|jj||ƒSdS(N(RURbR`(R(R1R^((sN/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/attributes.pyR`!scSsd|jj|jfS(Ns%s.%s(RRMR (R(((sN/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/attributes.pyRO'scs‚ytˆ|ƒSWnjtk
r}yt|j|ƒSWq~tk
rytdtˆƒjt|jƒj||fƒ‚q~XnXdS(sNDelegate __getattr__ to the original descriptor and/or
            comparator.sFNeither %r object nor %r object associated with %s has an attribute %rN(RJRKR"RLRM(R(t	attribute(Rb(sN/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/attributes.pyRN*s

N(
RMRQRRRUR-RPRRVR"R=R`RORN((Rb(sN/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/attributes.pyRaús					R@Rbt
from_instance(RRLRMRtmonkeypatch_proxied_specials(RbRa((RbsN/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/attributes.pytcreate_proxied_attributeðs
CtREMOVEtAPPENDtREPLACEtEventcBs>eZdZdZd„Zd„Zed„ƒZd„ZRS(	srA token propagated throughout the course of a chain of attribute
    events.

    Serves as an indicator of the source of the event and also provides
    a means of controlling propagation across a chain of attribute
    operations.

    The :class:`.Event` object is sent as the ``initiator`` argument
    when dealing with the :meth:`.AttributeEvents.append`,
    :meth:`.AttributeEvents.set`,
    and :meth:`.AttributeEvents.remove` events.

    The :class:`.Event` object is currently interpreted by the backref
    event handlers, and is used to control the propagation of operations
    across two mutually-dependent attributes.

    .. versionadded:: 0.9.0

    :var impl: The :class:`.AttributeImpl` which is the current event
     initiator.

    :var op: The symbol :attr:`.OP_APPEND`, :attr:`.OP_REMOVE` or
     :attr:`.OP_REPLACE`, indicating the source operation.

    R!RAtparent_tokencCs%||_||_|jj|_dS(N(R!RARp(R(tattribute_implRA((sN/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/attributes.pyR-fs		cCs1t|tƒo0|j|jko0|j|jkS(N(t
isinstanceRoR!RA(R(RB((sN/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/attributes.pyt__eq__kscCs
|jjS(N(R!R (R(((sN/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/attributes.pyR pscCs|jj|ƒS(N(R!RG(R(RI((sN/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/attributes.pyRGts(simplsopsparent_token(	RMRQRRt	__slots__R-RsRPR RG(((sN/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/attributes.pyRoIs		t
AttributeImplc	BséeZdZeddedeed„ZdZd„Zd„Z	d
„Z
ee	e
ƒZed„Z
d„Zed„Zed„Zd„Zed„Zed„Zed„Zed„Zeded„Zed„Zd„ZRS(s4internal implementation for instrumented attributes.cKsË||_||_||_||_||_|	p6||_||_|dkr`tj	|_
n	||_
t|ƒ|}
x-tj
|p‹gƒD]}|j|
|ƒqW|r¾t|j_n|
|_dS(s…Construct an AttributeImpl.

        \class_
          associated class

        key
          string name of the attribute

        \callable_
          optional function which generates a callable based on a parent
          instance, which produces the "default" values for a scalar or
          collection attribute when it's first accessed, if not present
          already.

        trackparent
          if True, attempt to track if an instance has a parent attached
          to it via this attribute.

        extension
          a single or list of AttributeExtension object(s) which will
          receive set/delete/append/remove/etc. events.  Deprecated.
          The event package is now used.

        compare_function
          a function that compares two values which are normally
          assignable to this attribute.

        active_history
          indicates that get_history() should always return the "old" value,
          even if it means executing a lazy callable upon attribute change.

        parent_token
          Usually references the MapperProperty, used as a key for
          the hasparent() function to identify an "owning" attribute.
          Allows multiple AttributeImpls to all match a single
          owner attribute.

        expire_missing
          if False, don't add an "expiry" callable to this attribute
          during state.expire_attributes(None), if no value is present
          for this key.

        send_modified_events
          if False, the InstanceState._modified_event method will have no
          effect; this means the attribute will never show up as changed in a
          history entry.
        N(RR t	callable_R&ttrackparentRptsend_modified_eventsRUtoperatorteqtis_equalRRtto_listt_adapt_listenerRSt_active_historytexpire_missing(R(RR RvR&Rwt	extensiontcompare_functiontactive_historyRpRRxRCtattrtext((sN/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/attributes.pyR-{s 5							RR RvR&RwRpRxR{RcCsd|jj|jfS(Ns%s.%s(RRMR (R(((sN/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/attributes.pyROÍscCs
|jjS(s(Backwards compat for impl.active_history(R&R~(R(((sN/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/attributes.pyt_get_active_historyÐscCs||j_dS(N(R&R~(R(RY((sN/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/attributes.pyt_set_active_historyÕscCs=d}|jst|ƒ‚|jjt|jƒ|ƒtk	S(s4Return the boolean value of a `hasparent` flag attached to
        the given state.

        The `optimistic` flag determines what the default return value
        should be if no `hasparent` flag can be located.

        As this function is used to determine if an instance is an
        *orphan*, instances that were loaded from storage should be
        assumed to not be orphans, until a True/False value for this
        flag is set.

        An instance attribute that is loaded by a callable function
        will also not have a `hasparent` flag.

        s6This AttributeImpl is not configured to track parents.(RwR:tparentsR]tidRpRH(R(RIRFtmsg((sN/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/attributes.pyRGÚscCsÒd}|jst|ƒ‚t|jƒ}|r@||j|<nŽ||jkrÁ|j|}|tk	rÁ|j|jkrÁ|jƒdkrºt	j
dt|ƒt|ƒ|jfƒ‚ndSnt|j|<dS(sÁSet a boolean flag on the given item corresponding to
        whether or not it is attached to a parent object via the
        attribute represented by this ``InstrumentedAttribute``.

        s6This AttributeImpl is not configured to track parents.sRemoving state %s from parent state %s along attribute '%s', but the parent record has gone stale, can't be sure this is the most recent parent.N(RwR:RˆRpR‡RHR tobjRUtorm_exctStaleDataErrorR(R(RItparent_stateRYR‰tid_tlast_parent((sN/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/attributes.pytsethasparentðs"
		cCs
tƒ‚dS(N(tNotImplementedError(R(RIR_R2((sN/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/attributes.pyR0scCs
tƒ‚dS(s¦Return a list of tuples of (state, obj)
        for all objects in this attribute's current state
        + history.

        Only applies to object-based attributes.

        This is an inlining of existing functionality
        which roughly corresponds to:

            get_state_history(
                        state,
                        key,
                        passive=PASSIVE_NO_INITIALIZE).sum()

        N(R‘(R(RIR_R2((sN/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/attributes.pytget_all_pendingscCsdS(s;Initialize the given state's attribute with an empty value.N(RU(R(RIR_((sN/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/attributes.pyt
initialize'scCsh|j|kr||jS|j}||jksE|j|tkrF|t@sStS||jkrw|j||ƒ}nR||jkr¥|j|}|||ƒ}n$|jrÃ|j||ƒ}nt	}|tksá|tkrå|S|t
kr$y||SWqCtk
r td|ƒ‚qCXqF|t	k	rF|j|||ƒSn|t
@sTtS|j||ƒSdS(süRetrieve a value from the given object.
        If a callable is assembled on this object's attribute, and
        passive is False, the callable will be executed and the
        resulting value will be set as the new value for this attribute.
        s=Deferred loader for attribute %r failed to populate correctlyN(R tcommitted_stateR
RR	texpired_attributest
_load_expiredt	callablesRvRR
tKeyErrortset_committed_valueRR“(R(RIR_R2R RYRv((sN/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/attributes.pyR]1s:	

	

cCs |j||||d|ƒdS(NR2(RX(R(RIR_RYt	initiatorR2((sN/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/attributes.pytappend_sc	Cs&|j||d|d|d|ƒdS(NR2t	check_old(RXRU(R(RIR_RYRšR2((sN/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/attributes.pytremovebscCs,|j||d|d|d|dtƒdS(NR2Rœtpop(RXRURS(R(RIR_RYRšR2((sN/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/attributes.pyRžfscCs
tƒ‚dS(N(R‘(R(RIR_RYRšR2RœRž((sN/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/attributes.pyRXjscCsY|j|jkr?|j|j}|ttfkr8dS|Sn|j||d|ƒSdS(s,return the unchanged value of this attributeR2N(R R”RR
RUR](R(RIR_R2RY((sN/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/attributes.pytget_committed_valuenscCs'|||j<|j||jgƒ|S(s=set an attribute value on the given instance and 'commit' it.(R t_commit(R(RIR_RY((sN/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/attributes.pyR™zs
N(	sclass_skeys	callable_sdispatchstrackparentsparent_tokenssend_modified_eventssis_equalsexpire_missing(RMRQRRRHRURSR-RtROR…R†RPR‚RGRRR0RR’R“R]R›RRžRXRŸR™(((sN/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/attributes.pyRuxs.J				"	
.tScalarAttributeImplcBs•eZdZeZeZeZeZd
Z	d„Z
d„ZeZd„Z
d„Zed„Zeded	„Zd
„Zd„Zed„ƒZRS(s8represents a scalar value-holding InstrumentedAttribute.t_replace_tokent
_append_tokent
_remove_tokencOs6tt|ƒj||Žd|_|_d|_dS(N(tsuperR¡R-RUR¢R£R¤(R(targtkw((sN/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/attributes.pyR-ŒscCs t|tƒ|_|_|jS(N(Rot
OP_REPLACER¢R£(R(((sN/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/attributes.pyt_init_append_token‘scCst|tƒ|_|jS(N(Rot	OP_REMOVER¤(R(((sN/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/attributes.pyt_init_remove_token—scCs‚|jjr$|j||tƒ}n|j|jtƒ}|jjra|j||||jƒn|j	|||ƒ||j=dS(N(
R&R~R]RR RRtfire_remove_eventR¤t_modified_event(R(RIR_told((sN/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/attributes.pyR[›scCs|j|kr)tj||||jƒS|t@r@|tN}n|j||d|ƒ}|tkrhtStj|||ƒSdS(NR2(R tHistorytfrom_scalar_attributeRR]R	t
HISTORY_BLANK(R(RIR_R2tcurrent((sN/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/attributes.pyR0¨s

c	Cs‡|jjr$|j||tƒ}n|j|jtƒ}|jjrc|j|||||ƒ}n|j|||ƒ|||j<dS(N(	R&R~R]RR RRXtfire_replace_eventR­(	R(RIR_RYRšR2RœRžR®((sN/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/attributes.pyRX´scCsEx>|jjD]0}|||||p7|jp7|jƒƒ}q
W|S(N(R&RXR¢t_init_append_or_replace_token(R(RIR_RYtpreviousRštfn((sN/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/attributes.pyR³Ás	cCs@x9|jjD]+}||||p4|jp4|jƒƒq
WdS(N(R&RR¤R«(R(RIR_RYRšR¶((sN/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/attributes.pyR¬És	cCs|jjdjdS(Ni(RPtcolumnsRL(R(((sN/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/attributes.pyRLÎs(s_replace_tokens
_append_tokens
_remove_tokenN(RMRQRRRStaccepts_scalar_loaderRHtuses_objectsR.t
collectionRtR-R©R´R«R[RR0RURXR³R¬RPRL(((sN/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/attributes.pyR¡‚s 				

		tScalarObjectAttributeImplcBsqeZdZeZeZeZeZdZ	d„Z
ed„Ze
d„Zeded„Zd„Zd„ZRS(	s›represents a scalar-holding InstrumentedAttribute,
       where the target object is also instrumented.

       Adds events to delete/set operations.

    cCsE|j||ƒ}|j||||jp3|jƒƒ||j=dS(N(R]R¬R¤R«R (R(RIR_R®((sN/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/attributes.pyR[âs
	cCs|j|kr)tj||||jƒS|t@r@|tN}n|j||d|ƒ}|tkrhtStj|||ƒSdS(NR2(R R¯tfrom_object_attributeRR]R	R±(R(RIR_R2R²((sN/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/attributes.pyR0és

cCs|j|kr||j}n)|t@rD|j||d|ƒ}ngS|dk	r„|tk	r„|tk	r„t|ƒ|fg}n	dg}|j|jkrþ|j|j}|dk	rþ|tk	rþ|tk	rþ||k	rþ|jt|ƒ|fƒqþn|S(NR2(NN(	R RR]RUR	R
RR”R›(R(RIR_R2R²trettoriginal((sN/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/attributes.pyR’õs$
	c	CsÌ|jjr+|j||dttBƒ}n|j||dttAƒ}|dk	r |tk	r ||k	r |rudSt	dt
|ƒt|ƒ|jfƒ‚n|j
|||||ƒ}|||j<dS(s1Set a value on the given InstanceState.

        R2Ns2Object %s not associated with %s on attribute '%s'(R&R~R]RRRRRUR	t
ValueErrorRRR R³(	R(RIR_RYRšR2RœRžR®((sN/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/attributes.pyRXs 		cCs„|jr1|dk	r1|jt|ƒ|tƒnx9|jjD]+}||||pe|jpe|jƒƒq>W|j	|||ƒdS(N(
RwRURRRHR&RR¤R«R­(R(RIR_RYRšR¶((sN/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/attributes.pyR¬*sc	CsÕ|jrI||k	rI|dttfkrI|jt|ƒ|tƒqInx>|jjD]0}|||||p€|j	p€|j
ƒƒ}qVW|j|||ƒ|jrÑ|dk	rÑ|jt|ƒ|tƒqÑn|S(N(
RwRUR	R
RRRHR&RXR¢R´R­RS(R(RIR_RYRµRšR¶((sN/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/attributes.pyR³4s		(N(RMRQRRRHR¸RSR¹R.RºRtR[RR0RR’RURXR¬R³(((sN/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/attributes.pyR»Ós		
tCollectionAttributeImplcBs
eZdZeZeZeZeZdZ	dedddd„Zd„Zd„Z
d„Zed	„Zed
„Zd„Zd„Zd
„Zd„Zd„Zd„Zed„Zed„Zed„Zeed„Zdd„Zd„Zd„Zded„Z RS(s«A collection-holding attribute that instruments changes in membership.

    Only handles collections of instrumented objects.

    InstrumentedCollectionAttribute holds an arbitrary, user-specified
    container object (defaulting to a list) and brokers access to the
    CollectionAdapter, a "view" onto that object that presents consistent bag
    semantics to the orm layer independent of the user data implementation.

    tcopytcollection_factoryR£R¤c

KsÂtt|ƒj||||d|d|d|	|
|dkrL|j}n||_||_d|_d|_t	|jddƒr¾t
j|dƒd„ƒ}t
j|dƒd„ƒ}ndS(	NRwR€Rt
_sa_linkertinit_collectioncSs|j|ƒdS(N(RÃ(ttargetRºtcollection_adapter((sN/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/attributes.pytlinkostdispose_collectioncSs|jdƒdS(N(RÃRU(RÅRºRÆ((sN/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/attributes.pytunlinkss(R¥RÀR-RUt_CollectionAttributeImpl__copyRÁRÂR£R¤RJRtlistens_for(
R(RR RvR&ttypecallableRwR€t
copy_functionRRCRÇRÉ((sN/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/attributes.pyR-Zs"					cCst|tƒ|_|jS(N(Rot	OP_APPENDR£(R(((sN/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/attributes.pyR©wscCst|tƒ|_|jS(N(RoRªR¤(R(((sN/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/attributes.pyR«{scCs gtj|ƒD]}|^qS(N(RRÆ(R(titemty((sN/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/attributes.pyt__copyscCs?|j||d|ƒ}|tkr(tStj|||ƒSdS(NR2(R]R	R±R¯tfrom_collection(R(RIR_R2R²((sN/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/attributes.pyR0‚sc
Csœ|j|krgS||j}t|dƒ}|j|jkry|j|j}|ttfkryg|D]*}|dk	rˆt|ƒp‹d|f^qj}g|D]*}|dk	r¿t|ƒpÂd|f^q¡}t|ƒ}	t|ƒ}
g|D]$\}}||
krð||f^qðg|D]$\}}||
kr||f^qg|D]$\}}||	krM||f^qMSng|D]}t|ƒ|f^q€S(Nt_sa_adapter(R RJR”RR
RURtdict(
R(RIR_R2R²R¾tctcurrent_statestoriginal_statestcurrent_settoriginal_settsto((sN/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/attributes.pyR’‰s"
44] cCs‰x;|jjD]-}||||p4|jp4|jƒƒ}q
W|j||ttƒ|jr…|dk	r…|j	t
|ƒ|tƒn|S(N(R&R›R£R©R­R
RSRwRURR(R(RIR_RYRšR¶((sN/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/attributes.pytfire_append_event©s"cCs|j||ttƒdS(N(R­R
RS(R(RIR_Rš((sN/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/attributes.pytfire_pre_remove_event¶scCs‡|jr1|dk	r1|jt|ƒ|tƒnx9|jjD]+}||||pe|jpe|jƒƒq>W|j	||t
tƒdS(N(RwRURRRHR&RR¤R«R­R
RS(R(RIR_RYRšR¶((sN/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/attributes.pyR¬¹s	 cCsV|j|krdS|j||ttƒ|j||jƒ}|jƒ||j=dS(N(R R­R
RStget_collectionRÔtclear_with_event(R(RIR_Rº((sN/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/attributes.pyR[Ãs
cCs&|j|ƒ\}}|||j<|S(s3Initialize this attribute with an empty collection.(t_initialize_collectionR (R(RIR_t_t	user_data((sN/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/attributes.pyR“Îs
cCsD|jj|j||jƒ\}}|jj|||ƒ||fS(N(R+tinitialize_collectionR RÂR&RÄ(R(RItadapterRº((sN/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/attributes.pyRàÕs	cCs‡|j||d|ƒ}|tkrs|j||||ƒ}|j|ksWtdƒ‚|j|jƒj|ƒn|j||ƒdS(NR2s,Collection was loaded during event handling.(RÞR	RÜR R:t_get_pending_mutationR›tappend_with_event(R(RIR_RYRšR2Rº((sN/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/attributes.pyR›Þs	cCsˆ|j||jd|ƒ}|tkrt|j||||ƒ|j|ksXtdƒ‚|j|jƒj|ƒn|j||ƒdS(NR2s,Collection was loaded during event handling.(	RÞRÔR	R¬R R:RåRtremove_with_event(R(RIR_RYRšR2Rº((sN/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/attributes.pyRès	cCsAy |j||||d|ƒWntttfk
r<nXdS(NR2(RR¿R˜t
IndexError(R(RIR_RYRšR2((sN/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/attributes.pyRžòs cCs|j|||d„ƒdS(s*Set a value on the given object.

        cSs
|j|ƒS(N(tadapt_like_to_iterable(Räti((sN/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/attributes.pyt<lambda>sN(t
_set_iterable(R(RIR_RYRšR2Rž((sN/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/attributes.pyRXûs	c
Csç|j|ƒ\}}|r3t|||ƒƒ}nt|ƒ}|j||dtƒ}|tkrx|j||ƒ}n||krˆdS|j|||tƒ|j}	|||j	<t
j||	|ƒ|`|jj
|||	ƒdS(sŽSet a collection value from an iterable of state-bearers.

        ``adapter`` is an optional callable invoked with a CollectionAdapter
        and the iterable.  Should return an iterable of state-bearing
        instances suitable for appending via a CollectionAdapter.  Can be used
        for, e.g., adapting an incoming dictionary into an iterator of values
        rather than keys.

        R2N(RàtlistR]RR	R“R­RSRÓR Rtbulk_replaceR&RÈ(
R(RIR_titerableRätnew_collectionRât
new_valuesR®told_collection((sN/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/attributes.pyRìs	
cCst|dƒ}t|_dS(NRÓ(RJRStinvalidated(R(RºRä((sN/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/attributes.pyt_invalidate_collection+sc
Csã|j|ƒ\}}|r+|j|ƒn||j|j<|j||jgƒ|j|jkrß|j|||tƒ|jj|jƒ}|j	}|j
}x|D]}	|j|	ƒq§Wx|D]}	|j|	ƒqÅWn|S(s=Set an attribute value on the given instance and 'commit' it.(
Ràtappend_multiple_without_eventRÔR R t_pending_mutationsR­RSRžtadded_itemst
deleted_itemstappend_without_eventtremove_without_event(
R(RIR_RYRºRâtpendingtaddedtremovedRÏ((sN/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/attributes.pyR™/s		

cCsD|dkr7|j||d|ƒ}|tkr7|Snt|dƒS(s‰Retrieve the CollectionAdapter associated with the given state.

        Creates a new CollectionAdapter if one does not exist.

        R2RÓN(RUR]R	RJ(R(RIR_RâR2((sN/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/attributes.pyRÞJs
(scopyscollection_factorys
_append_tokens
_remove_tokenN(!RMRQRRRHR¸RSR¹R.RºRtRUR-R©R«RÊRR0RR’RÜRÝR¬R[R“RàR›RRžRXRìRôR™RÞ(((sN/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/attributes.pyRÀHs6
				 	
		
				


	&		csʈjj‰ˆj‰‡fd†‰‡‡‡‡fd†}‡‡‡fd†}‡fd†}|rˆtjˆd|dtdtƒntjˆd|dtdtƒtjˆd	|dtdtƒd
S(s6Apply listeners to synchronize a two-way relationship.cs2tdt|ƒ|j|jˆjjfƒ‚dS(NsŽBidirectional attribute conflict detected: Passing object %s to attribute "%s" triggers a modify event on attribute "%s" via the backref "%s".(R¿RRpR!(tchild_stateRšt
child_impl(Rh(sN/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/attributes.pyt_acceptable_key_erras	c

sq||kr|S|dk	r¸|tk	r¸|tk	r¸t|ƒt|ƒ}}|jˆj}|j|k	s|jtt	fkr¸|j
|||jƒˆjp¨ˆj
ƒdtƒq¸n|dk	rmt|ƒt|ƒ}}|jˆj}	|jˆk	r!|j|	jk	r!ˆ|||	ƒqm|j|	k	sE|jttfkrm|	j|||jƒ|dtƒqmn|S(NR2(RUR	R
RRR+R!RAR¨RªRžRŠR£R©RRpRÎR›(
RItchildtoldchildRšt	old_statetold_dictR!Rþt
child_dictRÿ(RR tparent_implRp(sN/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/attributes.pyt"emit_backref_from_scalar_set_eventns@				
		
c	sº|dkrdSt|ƒt|ƒ}}|jˆj}|jˆk	rm|j|jk	rmˆ|||ƒnI|j|k	s‘|jttfkr¶|j	|||j
ƒ|dtƒn|S(NR2(RURRR+R!RpRARÎR¨R›RŠR(RIRRšRþRRÿ(RR Rp(sN/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/attributes.pyt)emit_backref_from_collection_append_event”s"		
cs…|dk	rt|ƒt|ƒ}}|jˆj}|j|k	sY|jttfkr|j|||j	ƒ|dt
ƒqndS(NR2(RURRR+R!RARªR¨RžRŠR(RIRRšRþRRÿ(R (sN/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/attributes.pyt)emit_backref_from_collection_remove_event©s		R›tretvaltrawRXRN(R!RpRtlistenRS(RhR tuselistRRR	((RRhR RRpsN/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/attributes.pytbackref_listenersYs 	
&
t
NO_HISTORYR¯Rüt	unchangedtdeletedcBs€eZdZd„ZeZd„Zd„Zd„Zd„Zd„Z	d„Z
ed„ƒZed	„ƒZ
ed
„ƒZRS(sþA 3-tuple of added, unchanged and deleted values,
    representing the changes which have occurred on an instrumented
    attribute.

    The easiest way to get a :class:`.History` object for a particular
    attribute on an object is to use the :func:`.inspect` function::

        from sqlalchemy import inspect

        hist = inspect(myobject).attrs.myattribute.history

    Each tuple member is an iterable sequence:

    * ``added`` - the collection of items added to the attribute (the first
      tuple element).

    * ``unchanged`` - the collection of items that have not changed on the
      attribute (the second tuple element).

    * ``deleted`` - the collection of items that have been removed from the
      attribute (the third tuple element).

    cCs
|tkS(N(R±(R(((sN/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/attributes.pyt__bool__èscCs t|jp|jp|jƒS(shReturn True if this :class:`.History` has no changes
        and no existing, unchanged state.

        (tboolRüRR(R(((sN/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/attributes.pytemptyìscCs'|jpg|jpg|jp%gS(s3Return a collection of added + unchanged + deleted.(RüRR(R(((sN/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/attributes.pytsum÷scCs|jpg|jpgS(s)Return a collection of added + unchanged.(RüR(R(((sN/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/attributes.pytnon_deletedþscCs|jpg|jpgS(s+Return a collection of unchanged + deleted.(RR(R(((sN/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/attributes.pyt	non_addedscCst|jp|jƒS(s2Return True if this :class:`.History` has changes.(RRüR(R(((sN/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/attributes.pythas_changes
scCsštg|jD]$}|dk	r+t|ƒp.d^q
g|jD]$}|dk	r\t|ƒp_d^q>g|jD]$}|dk	rt|ƒpd^qoƒS(N(R¯RüRURRR(R(RÕ((sN/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/attributes.pytas_states..cCsØ|jj|jtƒ}|tkrV|tkr@|dddƒS|d|gdƒSn~|j||ƒtkr|d|gdƒSt|ƒtkrœd}n	|g}|tkrÁ|d	d
|ƒS||gd|ƒSdS(N((((((((((((	R”R]R t_NO_HISTORYR
R{RSRˆt_NO_STATE_SYMBOLS(R>RhRIR²R¾R((sN/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/attributes.pyR°s		cCsð|jj|jtƒ}|tkrb|tks<|tkrL|dddƒS|d|gdƒSnŠ||kr|d|gdƒSt|ƒtksŸ|dkr¨d}n	|g}|tksÉ|tkrÙ|d	d
|ƒS||gd|ƒSdS(N((((((((((((	R”R]R RRR
RˆRRU(R>RhRIR²R¾R((sN/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/attributes.pyR¼7s		cCs¢|jj|jtƒ}|tks0|tkr@|dddƒSt|dƒ}|ttfkrw|t|ƒddƒS|tkr™|dt|ƒdƒSg|D]*}|dk	r¾t	|ƒpÁd|f^q }g|D]*}|dk	rõt	|ƒpød|f^q×}t
|ƒ}t
|ƒ}	|g|D]\}
}|
|	kr)|^q)g|D]\}
}|
|	krQ|^qQg|D]\}
}|
|kry|^qyƒSdS(	NRÓ((((((((R”R]R RRR
RJRíRURRÔ(R>RhRIR²R¾RÕRÖR×RØRÙRÚRÛ((sN/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/attributes.pyRÒQs$44(((RMRQRRRt__nonzero__RRRRRRtclassmethodR°R¼RÒ(((sN/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/attributes.pyR¯Ïs							
cCsZ|tkr"tjdƒt}n"|tkrDtjdƒt}ntt|ƒ||ƒS(s×Return a :class:`.History` record for the given object
    and attribute key.

    :param obj: an object whose class is instrumented by the
      attributes package.

    :param key: string attribute name.

    :param passive: indicates loading behavior for the attribute
       if the value is not already present.   This is a
       bitflag attribute, which defaults to the symbol
       :attr:`.PASSIVE_OFF` indicating all necessary SQL
       should be emitted.

    sNPassing True for 'passive' is deprecated. Use attributes.PASSIVE_NO_INITIALIZEsFPassing False for 'passive' is deprecated.  Use attributes.PASSIVE_OFF(RSRtwarn_deprecatedRRHRtget_state_historyR(RŠR R2((sN/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/attributes.pyR0ts
	
	cCs|j||ƒS(N(R0(RIR R2((sN/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/attributes.pyRscCs+t|ƒ}t|ƒ}|j|||ƒS(tTODO(RRt
has_parent(R>RŠR RFR+RI((sN/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/attributes.pyR!”scKse|jddƒ}|jddƒ}|jddƒ}t||||d|ƒ}t||||S(NR"R)Rf(RžRUtregister_descriptortregister_attribute_impl(RR R§R"R)Rftdesc((sN/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/attributes.pytregister_attribute›s	c
	Kst|ƒ}|r?|jddƒ}	|j||	p6tƒ}
n|jddƒ}
||j}|r||||
||}n`|r¦t||||d|
|}n9|rÇt|||||}nt|||||}|||_	|r	t
||||ƒn|j|ƒ||S(NRÌ(RRžRUtinstrument_collection_classRíR&RÀR»R¡R!Rtpost_configure_attribute(
RR R
Rvt	useobjectt
impl_classtbackrefR§R+tfactoryRÌR&R!((sN/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/attributes.pyR#¥s*


cCsDt|ƒ}t||d|d|ƒ}||_|j||ƒ|S(NR"R)(RRWRRtinstrument_attribute(RR R"R)RfR+Rb((sN/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/attributes.pyR"Ès		cCst|ƒj|ƒdS(N(Rtuninstrument_attribute(RR ((sN/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/attributes.pytunregister_attributeÕscCs%t|ƒ}|j}t|||ƒS(saInitialize a collection attribute and return the collection adapter.

    This function is used to provide direct access to collection internals
    for a previously unloaded attribute.  e.g.::

        collection_adapter = init_collection(someobject, 'elements')
        for elem in values:
            collection_adapter.append_without_event(elem)

    For an easier way to do the above, see
    :func:`~sqlalchemy.orm.attributes.set_committed_value`.

    obj is an instrumented object instance.  An InstanceState
    is accepted directly for backwards compatibility but
    this usage is deprecated.

    (RRÔtinit_state_collection(RŠR RIR_((sN/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/attributes.pyRÄÙs	cCs5|j|j}|j||ƒ}|j|||ƒS(sDInitialize a collection attribute and return the collection adapter.(R+R!R“RÞ(RIR_R RƒRâ((sN/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/attributes.pyR/ðscCs:t|ƒt|ƒ}}|j|jj|||ƒdS(s[Set the value of an attribute with no history events.

    Cancels any previous history present.  The value should be
    a scalar value for scalar-holding attributes, or
    an iterable for any collection-holding attribute.

    This is the same underlying method used when a lazy loader
    fires off and loads additional data from the database.
    In particular, this method can be used by application code
    which has loaded additional attributes or collections through
    separate queries, which can then be attached to an instance
    as though it were part of its original loaded state.

    N(RRR+R!R™(R1R RYRIR_((sN/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/attributes.pyR™øscCs=t|ƒt|ƒ}}|j|jj|||dƒdS(sNSet the value of an attribute, firing history events.

    This function may be used regardless of instrumentation
    applied directly to the class, i.e. no descriptors are required.
    Custom attribute management schemes will need to make usage
    of this method to establish attribute state as understood
    by SQLAlchemy.

    N(RRR+R!RXRU(R1R RYRIR_((sN/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/attributes.pyt
set_attributes
cCs3t|ƒt|ƒ}}|j|jj||ƒS(sZGet the value of an attribute, firing any callables required.

    This function may be used regardless of instrumentation
    applied directly to the class, i.e. no descriptors are required.
    Custom attribute management schemes will need to make usage
    of this method to make usage of attribute state as understood
    by SQLAlchemy.

    (RRR+R!R](R1R RIR_((sN/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/attributes.pyt
get_attributes
cCs7t|ƒt|ƒ}}|j|jj||ƒdS(sQDelete the value of an attribute, firing history events.

    This function may be used regardless of instrumentation
    applied directly to the class, i.e. no descriptors are required.
    Custom attribute management schemes will need to make usage
    of this method to establish attribute state as understood
    by SQLAlchemy.

    N(RRR+R!R[(R1R RIR_((sN/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/attributes.pyt
del_attribute's
cCsFt|ƒt|ƒ}}|j|j}|j||tdtƒdS(s³Mark an attribute on an instance as 'modified'.

    This sets the 'modified' flag on the instance and
    establishes an unconditional change event for the given attribute.

    tforceN(RRR+R!R­RRS(R1R RIR_R!((sN/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/attributes.pyt
flag_modified5s(LRRRytRRRRRRR‹R,RRRR	R
RRR
RRRRRRRRRRRRRRRRt_self_inspectst_MappedAttributetInspectionAttrtPropComparatorRRWRktsymbolRªRÎR¨tobjectRoRuR¡R»RÀRRt	frozensetRˆRt
namedtupleR¯RUR±R0RRHR!R%R#R"R.RÄR/R™R0R1R2R4(((sN/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/attributes.pyt<module>sb|	³	T/ÿQuÿ	k			¢