ÿØÿàJFIFÿþ ÿÛC       ÿÛC ÿÀÿÄÿÄ"#QrÿÄÿÄ&1!A"2qQaáÿÚ ?Øy,æ/3JæÝ¹È߲؋5êXw²±ÉyˆR”¾I0ó2—PI¾IÌÚiMö¯–þrìN&"KgX:Šíµ•nTJnLK„…@!‰-ý ùúmë;ºgµŒ&ó±hw’¯Õ@”Ü— 9ñ-ë.²1<yà‚¹ïQÐU„ہ?.’¦èûbß±©Ö«Âw*VŒ) `$‰bØÔŸ’ëXÖ-ËTÜíGÚ3ð«g Ÿ§¯—Jx„–’U/ÂÅv_s(Hÿ@TñJÑãõçn­‚!ÈgfbÓc­:él[ðQe 9ÀPLbÃãCµm[5¿ç'ªjglå‡Ûí_§Úõl-;"PkÞÞÁQâ¼_Ñ^¢SŸx?"¸¦ùY騐ÒOÈ q’`~~ÚtËU¹CڒêV  I1Áß_ÿÙ 4]c @s,ddlmZddlmZddlmZddlmZddlmZddlm Z ddlm Z dgZ de fd YZ e Zd Zx'ejD]Zee eeeqWd Zx$dD]Zee eeeqWdZx$dD]Zee eeeqWdS(i(t class_mapper(texc(tSessioni(tScopedRegistry(tThreadLocalRegistry(twarntscoped_sessioncBsGeZdZdZddZdZdZdZddZ RS(stProvides scoped management of :class:`.Session` objects. See :ref:`unitofwork_contextual` for a tutorial. cCs7||_|r$t|||_nt||_dS(sConstruct a new :class:`.scoped_session`. :param session_factory: a factory to create new :class:`.Session` instances. This is usually, but not necessarily, an instance of :class:`.sessionmaker`. :param scopefunc: optional function which defines the current scope. If not passed, the :class:`.scoped_session` object assumes "thread-local" scope, and will use a Python ``threading.local()`` in order to maintain the current :class:`.Session`. If passed, the function should return a hashable token; this token will be used as the key in a dictionary in order to store and retrieve the current :class:`.Session`. N(tsession_factoryRtregistryR(tselfRt scopefunc((sI/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/scoping.pyt__init__!s cKs[|rM|jjr'tjdqW|j|}|jj||Sn |jSdS(sReturn the current :class:`.Session`, creating it using the :attr:`.scoped_session.session_factory` if not present. :param \**kw: Keyword arguments will be passed to the :attr:`.scoped_session.session_factory` callable, if an existing :class:`.Session` is not present. If the :class:`.Session` is present and keyword arguments have been passed, :exc:`~sqlalchemy.exc.InvalidRequestError` is raised. sEScoped session is already present; no new arguments may be specified.N(Rthastsa_exctInvalidRequestErrorRtset(R tkwtsess((sI/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/scoping.pyt__call__8s  cCs3|jjr"|jjn|jjdS(sDispose of the current :class:`.Session`, if present. This will first call :meth:`.Session.close` method on the current :class:`.Session`, which releases any existing transactional/connection resources still being held; transactions specifically are rolled back. The :class:`.Session` is then discarded. Upon next usage within the same scope, the :class:`.scoped_session` will produce a new :class:`.Session` object. N(RR tclosetclear(R ((sI/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/scoping.pytremovePs cKs0|jjrtdn|jj|dS(sreconfigure the :class:`.sessionmaker` used by this :class:`.scoped_session`. See :meth:`.sessionmaker.configure`. stAt least one scoped session is already present. configure() can not affect sessions that have already been created.N(RR RRt configure(R tkwargs((sI/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/scoping.pyRas cs&dtffdY}|S(s"return a class property which produces a :class:`.Query` object against the class and the current :class:`.Session` when called. e.g.:: Session = scoped_session(sessionmaker()) class MyClass(object): query = Session.query_property() # after mappers are defined result = MyClass.query.filter(MyClass.name=='foo').all() Produces instances of the session's configured query class by default. To override and use a custom implementation, provide a ``query_cls`` callable. The callable will be invoked with the class's mapper as a positional argument and a session keyword argument. There is no limit to the number of query properties placed on a class. tquerycseZfdZRS(csdyHt|}|rGr1|djSjj|SnWntjk r_dSXdS(Ntsession(RRRtorm_exctUnmappedClassErrortNone(tstinstancetownertmapper(t query_clsR (sI/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/scoping.pyt__get__s (t__name__t __module__R"((R!R (sI/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/scoping.pyRs(tobject(R R!R((R!R sI/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/scoping.pytquery_propertyrsN( R#R$t__doc__RRR RRRR&(((sI/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/scoping.pyRs    csfd}|S(Ncst|j||S(N(tgetattrR(R targsR(tname(sI/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/scoping.pytdos((R*R+((R*sI/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/scoping.pyt instrumentscs+fd}fd}t||S(Ncst|j|dS(N(tsetattrR(R tattr(R*(sI/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/scoping.pytset_scst|jS(N(R(R(R (R*(sI/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/scoping.pytgets(tproperty(R*R/R0((R*sI/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/scoping.pytmakepropstbindtdirtytdeletedtnewt identity_mapt is_activet autoflusht no_autoflushtinfot autocommitcsfd}t|S(Ncstt||S(N(R(R(tclsR)R(R*(sI/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/scoping.pyR+s(t classmethod(R*R+((R*sI/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/scoping.pytclslevelst close_alltobject_sessiont identity_keyN( R3R4R5R6R7R8R9R:R;R<(R@RARB(tRRRRRR tutilRRRt__all__R%Rt ScopedSessionR,tpublic_methodstmethR-R2tpropR?(((sI/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/scoping.pyts8