[Twisted-web] web2 log patch

Andrea Arcangeli andrea at cpushare.com
Fri Jan 20 11:36:21 MST 2006


On Thu, Jan 19, 2006 at 10:31:20PM -0500, Jean-Paul Calderone wrote:
> On Fri, 20 Jan 2006 03:35:38 +0100, Andrea Arcangeli <andrea at cpushare.com> 
> wrote:
> >This fixes a typo in CVS and adds a common handler for file logging:
> >
> 
> Andrea,
> 
> Thanks for the patch.  Could you attach it to an issue at 
> <http://twistedmatrix.com/bugs/>?  Also, patches with unit tests are likely 
> to be applied more quickly than those without.

My test suite is the CPUShare server code, I tested it. This is a
trivial patch and I hope I can be applied right away without special
requirements (a bug was checked into trunk and this fixes it, plus it
adds one more class that nobody can be using yet, so it can't make
things worse). Or at least I've not nearly the time to write testsuites
for such trivial fixes, nor to attach them somewhere with a web browser,
sorry. I hoped I could contribute despite significant constraints, I'm
sorry if that's not the case. I think development of twisted is too
slow if it requires these formalities (especially given this is a web2
_unstable_ branch, I didn't touch anything else in my patch).

So I'm going to fork twisted into a private twisted-CPUShare branch for
my own server use where I won't have to waste time to fix bugs and, I'll
keep merging stuff from trunk as long as it makes sense. Ideally my
branch will be the same as trunk but I don't care anymore if that's not
the case. I'm going to write right now a prorprietary CPUShare guard
with caching of the cookies in ram, and real storage of the cookies in
sql.  This way restarting the server won't logout users like it happens
currently with nevow, which is unacceptable for the long term. The login
mechanism of twisted is overkill complicated and it provides zero
benefits, so I'll simplify it with the library-model as usual, while I
solve the harddisk persistence at the same time (I'll stop using all
those portal/realm nosense, where I even had to hack the logout with a
local function because it was missing parameters to the callback). From
twisted.web2 I only need the functionality to read cookies which seems
doable with the http_header response, I don't want to depend on anything
more complicated then that.  I can publish that guard code once it works
if there's interest, but only by email, I've no time for anything else
sorry. I hope to have the basic login working before the end of the
weekend (then next weekend I'll rewrite all the forms and rendering with
Cheetah and FormKit). If something goes wrong in this process I'll drop
twisted entirely from the server side since I've wasted enough time
already (I can still use it on the client side since it worked well
there, there's no http involved in the client side after all and
furthermore there are no smp scalability concerns on the client side).



More information about the Twisted-web mailing list