Re: tests fail because of g

2008-07-07 Thread Alberto Valverde
Jonathan Vanasco wrote: I have several helper classes that use g from pylons You have a design problem then :) pylons.g is really a substitute for module-level singletons so you can have them associated to an app's instance and have several of these coexisting in the same process without

Re: tests fail because of g

2008-07-07 Thread Jonathan Vanasco
hm... in this instance, i use g for three things: 1- on startup, i pull constants out of the DB and stash them into g 2- misc form classes refer to g as the values to use for validation 3- templates use them to generate dropdowns i guess i could use some sort of factory function to pull g on

Re: best way to get user's IP address in pylons?

2008-07-07 Thread Jonathan Vanasco
On Jul 7, 1:46 pm, Ian Bicking [EMAIL PROTECTED] wrote: Christopher Weimann wrote: REMOTE_ADDR is typically set by your webserver and can be trusted.   X_FORWARDED_FOR is an HTTP header typically set by proxy servers or even the client and I would have to say it can NOT be trusted so

Re: tests fail because of g

2008-07-07 Thread Mike Orr
On Mon, Jul 7, 2008 at 1:33 PM, Wichert Akkerman [EMAIL PROTECTED] wrote: What's wrong with using paste.loadapp to properly set 'g' for every test that needs it? That way your test environment is the closest to the production environment -- which is the purpose of having tests in the first

Re: tests fail because of g

2008-07-07 Thread Wichert Akkerman
Previously Mike Orr wrote: On Mon, Jul 7, 2008 at 1:33 PM, Wichert Akkerman [EMAIL PROTECTED] wrote: What's wrong with using paste.loadapp to properly set 'g' for every test that needs it? That way your test environment is the closest to the production environment -- which is the

Re: tests fail because of g

2008-07-07 Thread Mike Orr
On Mon, Jul 7, 2008 at 1:48 PM, Wichert Akkerman [EMAIL PROTECTED] wrote: Previously Mike Orr wrote: On Mon, Jul 7, 2008 at 1:33 PM, Wichert Akkerman [EMAIL PROTECTED] wrote: What's wrong with using paste.loadapp to properly set 'g' for every test that needs it? That way your test

Re: tests fail because of g

2008-07-07 Thread Mike Orr
On Mon, Jul 7, 2008 at 2:10 PM, Jonathan Vanasco [EMAIL PROTECTED] wrote: On Jul 7, 4:53 pm, Mike Orr [EMAIL PROTECTED] wrote: True. I'm just saying if you can code to avoid 'g' and 'c' in your lib routines, so much the better. I have never found a use for 'g', except in one case to put a

supervisor questions

2008-07-07 Thread Shannon -jj Behrens
Hi, I'm looking at http://wiki.pylonshq.com/display/pylonscookbook/Monitor+Pylons+application+with+supervisord. I have a few questions: 1. Why does it use a manually created server.py instead of using paster like normal? 2. Does anyone have an rc script to start supervisor under Ubuntu? 3.

Re: A new SQLAlchemy migration toolkit - miruku 0.1a3 has been released

2008-07-07 Thread Shannon -jj Behrens
On Thu, Jul 3, 2008 at 6:59 PM, Olli Wang [EMAIL PROTECTED] wrote: On Jul 4, 9:42 am, Shannon -jj Behrens [EMAIL PROTECTED] wrote: How is it possible to not require an upgrade script? What happens if I'm changing an email field into two fields, one for the username and one for the server?

Re: supervisor questions

2008-07-07 Thread Ian Bicking
Shannon -jj Behrens wrote: Hi, I'm looking at http://wiki.pylonshq.com/display/pylonscookbook/Monitor+Pylons+application+with+supervisord. Huh... I'm getting a 404...? I have a few questions: 1. Why does it use a manually created server.py instead of using paster like normal? I use

Re: supervisor questions

2008-07-07 Thread Ian Bicking
Ian Bicking wrote: 1. Why does it use a manually created server.py instead of using paster like normal? I use paster serve (no --reload, --monitor, --daemon, any of which would mess it up). Incidentally, one thing I don't think is all that well explained (at least in the supervisor

Re: distribute Pylons app with bytecode files only?

2008-07-07 Thread mdipierro
Hi Phlee, it is true that it is possible to decompile bytecode python but it is also true that it is possible to decompile or disassemble any language. That in itself does not make it worthless for two reasons: The first is that it is illegal (if you say so in the license). How easy it is to

Re: best way to send email w/o blocking?

2008-07-07 Thread Justin Tulloss
On Jul 6, 12:35 am, kevin [EMAIL PROTECTED] wrote: What are your recommendations for sending email without blocking? Because I can imagine several ways, but maybe there's some niceness I'm not aware of. I actually spawn off a new thread that does some verification and then sends the email

Re: Debugging failed tests with pylons globals

2008-07-07 Thread Mike Orr
On Mon, Jul 7, 2008 at 10:04 PM, Justin Tulloss [EMAIL PROTECTED] wrote: I have to admit that despite my digging through the source, I do not have a good understanding of the StackedObjectProxy class and am constantly doing battle with it. I don't think there's anybody who doesn't do battle