This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author acooke
Recipients acooke, cloverprince, draghuram, samwyse
Date 2009-08-27.21:13:59
SpamBayes Score 1.085729e-05
Marked as misclassified No
Message-id <1251407643.57.0.234338995525.issue3058@psf.upfronthosting.co.za>
In-reply-to
Content
Came here wondering how best to solve this myself.

I already subclass the request handler to do client validation (password
etc) and it stuck me that a simpler solution would be to use thread
local storage.

This avoids having to modify dispatch.  The disadvantage is that this
uses a single global scope.  I don't think it's a better solution than
that suggested by samwyse for a final solution, but I thought I'd note
it here because it's a simpler alternative for people needing to add a
work-around, and I suspect many people aren't aware of the possibility.

>>> import _threading_local ; help(_threading_local)

If this wouldn't work (maybe I've misunderstood the server threading?)
then I'd appreciate someone correcting me.  Thanks.
History
Date User Action Args
2009-08-27 21:14:03acookesetrecipients: + acooke, draghuram, samwyse, cloverprince
2009-08-27 21:14:03acookesetmessageid: <1251407643.57.0.234338995525.issue3058@psf.upfronthosting.co.za>
2009-08-27 21:14:00acookelinkissue3058 messages
2009-08-27 21:13:59acookecreate