List Info

Thread: beaker 0.8 DeprecationWarning




beaker 0.8 DeprecationWarning
country flaguser name
United States
2007-06-08 07:31:01
hi list...
i am quite new to pylons, it is great fun learning &
using it...

on a new install i have this this deprecation warning at
startup:
=====================================
paster serve --reload development.ini
Starting subprocess with file monitor
/home/alain/pylons_env/lib/python2.4/Pylons-0.9.5-py2.4.egg/
pylons/
wsgiapp.py:249: DeprecationWarning: SessionMiddleware is
moving to
beaker.middleware in 0.8
  app = SessionMiddleware(app, config.global_conf,
**config.app_conf)
/home/alain/pylons_env/lib/python2.4/Pylons-0.9.5-py2.4.egg/
pylons/
wsgiapp.py:254: DeprecationWarning: CacheMiddleware is
moving to
beaker.middleware in 0.8
  app = CacheMiddleware(app, config.global_conf,
**config.app_conf)
Starting server in PID 7329.
serving on 0.0.0.0:5000 view at http://127.0.0.1:5000
========================================
what changes in the code is necessary to come back on the
good side of
deprecation world?

and as long as i am here, an init.d script to start a pylons
app with
workingenv
i did it because i could not find any, it works well for me
============================================================
==
#! /bin/sh

### BEGIN INIT INFO
# Provides:          <my_app> application instance
# Required-Start:    $all
# Required-Stop:     $all
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: starts the first instance for
<my_app> app
# Description:       starts the first instance for <my
app> app using
start-stop-daemon
### END INIT INFO

############### EDIT ME
##############################################
# path to workingenv install if any
PYTHONPATH=/home/<my_home_dir>/pylons_env/lib/python2.
4

# path to app
APP_PATH=/home/<my_home_dir>/pylons_sites/<my_app_n
ame>

# path to paster bin
DAEMON=/home/<my_home_dir>/pylons_env/bin/paster

# startup args
DAEMON_OPTS=" serve --log-file <logfile>.log
--server-name=main
production.ini"

# script name
NAME=<my_rc_script.sh>

# app name
DESC= <my_app>

# pylons user
RUN_AS=<user to switch to after startup>

PID_FILE=/var/run/paster.pid

############### END EDIT ME
##############################################


test -x $DAEMON || exit 0

set -e

case "$1" in
  start)
        echo -n "Starting $DESC: "
        start-stop-daemon -d $APP_PATH -c $RUN_AS --start
--background
--pidfile $PID_FILE  --make-pidfile --exec $DAEMON --
$DAEMON_OPTS
        echo "$NAME."
        ;;
  stop)
        echo -n "Stopping $DESC: "
        start-stop-daemon --stop --pidfile $PID_FILE
        echo "$NAME."
        ;;

  restart|force-reload)
        echo -n "Restarting $DESC: "
        start-stop-daemon -d $APP_PATH -c $RUN_AS --start
--background
--pidfile $PID_FILE  --make-pidfile --exec $DAEMON --
$DAEMON_OPTS
        sleep 1
        start-stop-daemon --stop --pidfile $PID_FILE
        echo "$NAME."
        ;;
  *)
        N=/etc/init.d/$NAME
        echo "Usage: $N
{start|stop|restart|force-reload}" >&2
        exit 1
        ;;
esac

exit 0

============================================================
==========


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "pylons-discuss" group.
To post to this group, send email to pylons-discussgooglegroups.com
To unsubscribe from this group, send email to
pylons-discuss-unsubscribegooglegroups.com
For more options, visit this group at h
ttp://groups.google.com/group/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: beaker 0.8 DeprecationWarning
country flaguser name
United States
2007-06-08 17:18:24

On Jun 8, 2007, at 5:31 AM, alain wrote:

>
> hi list...
> i am quite new to pylons, it is great fun learning
& using it...
>
> on a new install i have this this deprecation warning
at startup:
> =====================================
> paster serve --reload development.ini
> Starting subprocess with file monitor
>
/home/alain/pylons_env/lib/python2.4/Pylons-0.9.5-py2.4.egg/
pylons/
> wsgiapp.py:249: DeprecationWarning: SessionMiddleware
is moving to
> beaker.middleware in 0.8
>   app = SessionMiddleware(app, config.global_conf,
**config.app_conf)
>
/home/alain/pylons_env/lib/python2.4/Pylons-0.9.5-py2.4.egg/
pylons/
> wsgiapp.py:254: DeprecationWarning: CacheMiddleware is
moving to
> beaker.middleware in 0.8
>   app = CacheMiddleware(app, config.global_conf,
**config.app_conf)
> Starting server in PID 7329.
> serving on 0.0.0.0:5000 view at http://127.0.0.1:5000
> ========================================
> what changes in the code is necessary to come back on
the good side of
> deprecation world?

This is actually Pylons code causing the
DeprecationWarnings, so  
you're stuck with the messages until you upgrade to Pylons
0.9.6  
(which isn't out yet). However python's warnings system
provides a  
way to filter out specific warnings, with it you can turn
these off  
if they bother you.

>
> and as long as i am here, an init.d script to start a
pylons app with
> workingenv
> i did it because i could not find any, it works well
for me

You might want to put this on the Pylons wiki: http:// 
docs.pythonweb.org/dashboard.action

--
Philip Jenvey



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "pylons-discuss" group.
To post to this group, send email to pylons-discussgooglegroups.com
To unsubscribe from this group, send email to
pylons-discuss-unsubscribegooglegroups.com
For more options, visit this group at h
ttp://groups.google.com/group/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: beaker 0.8 DeprecationWarning
country flaguser name
United States
2007-06-08 18:05:41
thanks
i posted the code to the wiki and removed my previous
message because
there was a mistake, (very little mistake) in the
code and i dont want people to cut, paste and hate me for
years 
sorry for the mess

On Jun 9, 12:18 am, Philip Jenvey <pjen...groovie.org> wrote:
> On Jun 8, 2007, at 5:31 AM, alain wrote:
>
>
>
>
>
> > hi list...
> > i am quite new to pylons, it is great fun learning
& using it...
>
> > on a new install i have this this deprecation
warning at startup:
> > =====================================
> > paster serve --reload development.ini
> > Starting subprocess with file monitor
> >
/home/alain/pylons_env/lib/python2.4/Pylons-0.9.5-py2.4.egg/
pylons/
> > wsgiapp.py:249: DeprecationWarning:
SessionMiddleware is moving to
> > beaker.middleware in 0.8
> >   app = SessionMiddleware(app, config.global_conf,
**config.app_conf)
> >
/home/alain/pylons_env/lib/python2.4/Pylons-0.9.5-py2.4.egg/
pylons/
> > wsgiapp.py:254: DeprecationWarning:
CacheMiddleware is moving to
> > beaker.middleware in 0.8
> >   app = CacheMiddleware(app, config.global_conf,
**config.app_conf)
> > Starting server in PID 7329.
> > serving on 0.0.0.0:5000 view athttp://127.0.0.1:5000
> > ========================================
> > what changes in the code is necessary to come back
on the good side of
> > deprecation world?
>
> This is actually Pylons code causing the
DeprecationWarnings, so
> you're stuck with the messages until you upgrade to
Pylons 0.9.6
> (which isn't out yet). However python's warnings system
provides a
> way to filter out specific warnings, with it you can
turn these off
> if they bother you.
>
>
>
> > and as long as i am here, an init.d script to
start a pylons app with
> > workingenv
> > i did it because i could not find any, it works
well for me
>
> You might want to put this on the Pylons wiki: http://
> docs.pythonweb.org/dashboard.action
>
> --
> Philip Jenvey


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "pylons-discuss" group.
To post to this group, send email to pylons-discussgooglegroups.com
To unsubscribe from this group, send email to
pylons-discuss-unsubscribegooglegroups.com
For more options, visit this group at h
ttp://groups.google.com/group/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---


[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )