[Twisted-web] web2 log patch

glyph at divmod.com glyph at divmod.com
Fri Jan 20 13:03:54 MST 2006



On Fri, 20 Jan 2006 19:36:21 +0100, Andrea Arcangeli <andrea at cpushare.com> wrote:
>On Thu, Jan 19, 2006 at 10:31:20PM -0500, Jean-Paul Calderone wrote:

>> 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.

James put this pretty well: if you fixed it this one time, how do we know that this won't just be reverted and broken again by some other patch?  We have tests for a reason.  We're not going to run CPUShare every time to make sure that it didn't break again.

>I hope I can be applied right away without special requirements

This is not a special requirement.  All patches are required to come with unit tests - JP's response is repeated so often, it was probably just some text he keeps in his clipboard whenever he is reading email.  You are asking for special consideration which, I might add, is more likely to be afforded to those who have a good track-record of writing tests and filing bugs.  You've contributed patches, but always free-form on the mailing list with little explanation and no tests - in some cases, that's more work to figure out than fixing the bug myself.

> Or at least I've not nearly the time to write testsuites
>for such trivial fixes,

Maybe if you did, my kernel wouldn't crash once a week... :)

>nor to attach them somewhere with a web browser, sorry.

Yet, you spent *all this time* in your email client.  How is that easier?  This message contained 5x as much text as would have been required in the bug report, probably more than would have been in the test and the report combined.

>I hoped I could contribute despite significant constraints, I'm

You are not special.  We are *all* operating under significant time constraints for working on Twisted.

>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).

At this point, and I realize this may not be intentional, you are actually contributing negatively.  The "formalities" are in place to speed up the development process.  Without tests, we'd be spending twice or three times as much time reviewing every patch, and preparing for a release would require acceptance testing from dozens or hundreds of people.

>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.

You remember that 'epsilon' thing you objected to?  That is effectively Divmod doing exactly this.  It's a great idea.  Please do it!

>This way restarting the server won't logout users like it happens
>currently with nevow, which is unacceptable for the long term.

Libraries provide mechanism, user code provides policy.  Nevow did not want to specify a required persistence mechanism for sessions, so it is up to the user to implement that - but it has specific hooks (*documented*, *tested* specific hooks, even) which support this use case.  There are at least two examples of this: the old Quotient repository, at <http://divmod.org/svn/Quotient/trunk/quotient/web/sessionpersist.py> and one in the new Mantissa, at <http://divmod.org/svn/Divmod/trunk/Mantissa/xmantissa/websession.py>.  Both of these use the guard provided by nevow.

>I'll simplify it with the library-model as usual

I already asked you to stop trolling.

>(I'll stop using all those portal/realm nosense,

I'm sorry you don't understand cred, but that doesn't make it "nonsense".  Care to provide a specific criticism?

> where I even had to hack the logout with a
>local function because it was missing parameters to the callback).

(By the way, this doesn't count as a "specific criticism" - the convention of using closures in Lisp to accomplish this probably predates the programming career of anyone who posts to this list, and while it wasn't available in early releases of Python, bound methods were used to accomplish the same effect.)

>I've no time for anything else sorry.

Why do you assume that everyone else has so much time, to write tests for your code, to file your bugs for you?  For that matter, where does all this time for posting to mailing lists come from?

>I'll drop twisted entirely from the server side since I've wasted enough time
>already

You've certainly wasted enough of everyone's time at this point.  If you are going to keep using Twisted, could you direct your energies towards more positive contributions?  Your bugfixes are welcome enough, but >1 post per day about the "library model" isn't helping anybody, least of all you.



More information about the Twisted-web mailing list