Ñò òÇ@Hc@sÕdZddkZddkZddkZddklZddkZddgZeie ƒZ ei ei i edƒyºddkZddklZedd d d d d gƒZeddddgƒZd„Zddd„Zd„Zdddd„ZeiedeƒZeidddddgƒWnej onXy,ddkZddkl Z l!Z!l"Z"Wn e#Z nXde fd„ƒYZ$e%ƒZ&de'fd„ƒYZ(de#fd „ƒYZ)dS(!s€Depreacted: pylons.database will be removed from a future version of Pylons. SQLAlchemy 0.3.x users are recommended to migrate to SAContext (http://cheeseshop.python.org/pypi/SAContext) for similar functionality. Provides convenient access to SQLObject-managed and/or SQLAlchemy-managed databases. This module enables easy use of an SQLObject database by providing an auto-connect hub that will utilize the db uri string given in the Paste conf file called ``sqlobject.dburi``. A SQLAlchemy ``SessionContext`` is also available: it provides both thread and process safe ``Session`` objects via the ``session_context.current`` property. iÿÿÿÿN(tasbooltAutoConnectHubt PackageHubi(tsessioncontexttconvert_unicodetechot echo_pooltthreadedtuse_ansituse_oidst max_overflowt pool_sizet pool_recyclet pool_timeoutcCs_ytttiiƒƒƒ}Wntj o d}nXtid|ƒd|ti ƒfS(s(Return the id keying the current database session's scope. The session is particular to the current Pylons application -- this returns an id generated from the current thread and the current Pylons application's Globals object at pylons.g (if one is registered). ts-Returning %s as the database session scope ids%s|%i( tstrtidtpylonstconfigt _current_objt TypeErrortlogtdebugtthreadt get_ident(t app_scope_id((s3/usr/lib/python2.6/site-packages/pylons/database.pyt app_scope1s  cKs tƒ}|i|ƒd|jo*d|jo|d|dZss%s|%sspylons.db_enginess5Created engine using uri: %s with engine arguments %s(tget_engine_conftupdatetgetRtpopRtsortedtitemsRRt sqlalchemyt create_engineRR(RRtkwargstconftconf_keyt engine_keyt db_enginestengine((s3/usr/lib/python2.6/site-packages/pylons/database.pyR'@s"      !  cCsÍh}xÀtiiƒD]¯\}}|idƒpqn|d}|tjot|ƒ||textendt ImportErrorRItsqlobject.dbconnectionR?R@RAtobjectRtdictRptKeyErrorRdR(((s3/usr/lib/python2.6/site-packages/pylons/database.pytsT         '      R