
եWJc           @   s,  d  Z  d d k Z d d k Z d d k Z d d k l Z d d k Z d d k Z d d k l	 Z
 d d k l Z l Z d g Z d Z d Z d	 Z d
 Z d Z d Z d Z d Z d Z d Z d   Z e e i i e d d d  Z d e f d     YZ e d d  Z d Z d e
 f d     YZ	 d S(   s<   Legacy (older versions of Pylons) functionality and warningsiN(   t   StackedObjectProxy(   t   Response(   t
   deprecatedt	   func_movet   load_hsm   The attribute 'config.%s' has moved to the pylons.config dictionary: Please access it via pylons.config['%s']s0  The pylons.config.Config object is deprecated. Please load the environment configuration via the pylons.config object in config/environment.py instead, .e.g:

    from pylons import config

And in in the load_environment function:

    config['routes.map'] = map

    # The template options
    tmpl_options = config['buffet.template_options']

    # CONFIGURATION OPTIONS HERE (note: all config options will override any
    # Pylons config options)

See the default config/environment.py created via the "paster create -t pylons"
command for a full example.
sj  The 'default_charset' keyword argument to the %(klass)s constructor is deprecated. Please specify the charset in the response_options dictionary in your config/environment.py file instead, .e.g.

    from pylons import config

Add the following lines to the end of the load_environment function:

    config['pylons.response_options']['charset'] = '%(charset)s'
s   The 'error_template' errorware argument for customizing EvalException is deprecated, please remove it. To customize EvalException's HTML, setup your own EvalException and ErrorMiddlewares instead of using ErrorHandler.s>   The log function is deprecated. Use the logging module insteads|  The [app:main] 'prefix' configuration option has been deprecated, please use paste.deploy.config.PrefixMiddleware instead. To enable PrefixMiddleware in the config file, add the following line to the [app:main] section:

    filter-with = app-prefix

and the following lines to the end of the config file:

    [filter:app-prefix]
    use = egg:PasteDeploy#prefix
    prefix = %s
s   pylons.database is deprecated, and 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 functionalitys  pylons.h is deprecated: use your project's lib.helpers module directly instead. Your lib/helpers.py may require the following additional imports:

    from pylons.helpers import log
    from pylons.i18n import get_lang, set_lang

Use the following in your project's lib/base.py file (and any other module that
uses h):

    import MYPROJ.lib.helpers as h

(where MYPROJ is the name of your project) instead of:

    from pylons import h
sl   render_response is deprecated, please return the response content directly (via the render function) insteadsT   paths['root_path'] has been moved to paths['root'], please update your configurationc         C   sb   t  |  d  t t i |  d d d  } t | t i  o | S|  d } t  |  t i | S(   s   
    This is a legacy test for pre-0.9.3 projects to continue using the old
    style Helper imports. The proper style is to pass the helpers module ref
    to the PylonsApp during initialization.
    s	   .lib.baset   hs   .lib.helpersN(   t
   __import__t   getattrt   syst   modulest   Nonet
   isinstancet   typest
   ModuleType(   t   package_namet   their_ht   helpers_name(    (    sf   /afs/athena.mit.edu/user/x/a/xavid/lib/python2.6/site-packages/Pylons-0.9.7-py2.6.egg/pylons/legacy.pyR   k   s    

s   pylons.jsonifyt   moved_tos   pylons.decorators.jsonifyt   DeprecatedStackedObjectProxyc           B   s   e  Z d    Z RS(   c          O   s#   t  i t t d  t i |  |   S(   Ni   (   t   warningst   warnt   pylons_h_warningt   DeprecationWarningR    t   _current_obj(   t   argst   kwargs(    (    sf   /afs/athena.mit.edu/user/x/a/xavid/lib/python2.6/site-packages/Pylons-0.9.7-py2.6.egg/pylons/legacy.pyR      s    (   t   __name__t
   __module__R   (    (    (    sf   /afs/athena.mit.edu/user/x/a/xavid/lib/python2.6/site-packages/Pylons-0.9.7-py2.6.egg/pylons/legacy.pyR      s   t   nameR   s   Returning a Response object from a controller is deprecated, and support for it will be removed in a future version of Pylons. Please return the response content directly and or use pylons.response insteadR   c           B   s   e  Z d    Z RS(   c         O   s*   t  i t t d  t i |  | |  d  S(   Ni   (   R   R   t   response_warningR   t   PylonsResponset   __init__(   t   selfR   R   (    (    sf   /afs/athena.mit.edu/user/x/a/xavid/lib/python2.6/site-packages/Pylons-0.9.7-py2.6.egg/pylons/legacy.pyR      s    (   R   R   R   (    (    (    sf   /afs/athena.mit.edu/user/x/a/xavid/lib/python2.6/site-packages/Pylons-0.9.7-py2.6.egg/pylons/legacy.pyR      s   (   t   __doc__R   R   R   t   paste.registryR    t   pylonst   pylons.decoratorst   pylons.controllers.utilR   R   t   pylons.utilR   R   t   __all__t   config_attr_movedt   config_load_environmentt   default_charset_warningt   error_template_warningt   log_warningt   prefix_warningt   pylons_database_warningR   t   render_response_warningt	   root_pathR   t
   decoratorst   jsonifyR   R   R   (    (    (    sf   /afs/athena.mit.edu/user/x/a/xavid/lib/python2.6/site-packages/Pylons-0.9.7-py2.6.egg/pylons/legacy.pyt   <module>   s6   			