[Twisted-Python] [twisted.roundup at twistedmatrix.com: [issue291] app.getApplication cleanup]
glyph at twistedmatrix.com
Tue Sep 30 13:31:54 EDT 2003
Paul Boehm wrote:
> okay, and now someone explain to me what should motivate me to keep
> sending in patches? strports patches will be rejected too, moshez told
> me, so i'll have to fork that too..
I don't know. What motivated you to send patches in the first place?
> and i had fixes for that loseConnection stuff months ago, i don't
> remember if i submitted them, because even back then i knew from
> experience that you won apply my patches, but i probably did.
As Andrew pointed out, there is nothing on the list or tracker.
Certainly you'd learn from experience that if you don't submit patches,
we won't apply them.
> i'll submit my proxy patches, integrating well into cvs-current, this
> week, as arranged on irc, and you judge if my code is unbearable or if
> it actually makes sense. i see this as an last attempt to communicate
> with you guys..
You may want to consider trying a little harder before giving up. You
make this sound like a last resort after you've spent a long, hard time
explaining yourself and lobbying for an important patch. However, this
is a trivial patch, "cleanup" which isn't required unless you happen to
find for loops substantially easier to read than list comprehensions (or
longer functions easier to read than shorter ones).
Looking at issue 291, the conversation goes:
> I'm going to reject it -- this code works, and is clear
> enough. Do you have any good reason, other than clean-up,
> for this patch?
>> besides i've joined the dark circle now and understand the code anyway,
>> lets keep those pesty newbies away from the secrets of the inner circle!
This doesn't look like a lot of hard arguing to get bitter over. Moshe
asked you for reasons and you didn't give him any.
There is good reason not to accept patches which simply shuffle things
around. Every change has a cost. Every change is a small bit of
functionality which will be subtly different between versions. We are
striving to create as few of these as possible, and any long-time
Twisted user can still tell you that we create a LOT. Any bug report
involving the code in question will automatically get longer, because
instead of dealing with the only released version, the developer will
always have to ask "Is this with 1.1.1 or 1.1.2?"
So, if you want "cleanup" changes to be accepted, you are automatically
fighting an uphill battle, and for good reason.
If you really feel that aesthetic changes like this are important, your
best bet is to include some useful modification to the current file -
preferably with a strong use-case attached in the tracker or in
docstrings, as well as tests - and it is very unlikely that we will
reject patches on the grounds that they contain additional cosmetic
changes, especially if those changes are related to the fix or
enhancement. I'd still prefer you avoid this kind of change, but
working, useful code is always a good bargaining chip.
Also, just in terms of priorities: if readability is your goal your
energies would best be directed elsewhere. May I humbly suggest that
you examine other parts of Twisted, such as twisted/spread/jelly.py,
twisted/protocols/imap4.py, or this lovely snippet from
> byte3 = (( ( self.answer & 1 ) << 7 )
> | ((self.opCode & 0xf ) << 3 )
> | ((self.auth & 1 ) << 2 )
> | ((self.trunc & 1 ) << 1 )
> | ( self.recDes & 1 ) )
> byte4 = ( ( (self.recAv & 1 ) << 7 )
> | (self.rCode & 0xf ) )
As far as readability goes, you can do a lot worse in Twisted than any
of the code in twisted/application.
> i see this as an last attempt to communicate with you guys..
Sit back, take a deep breath, and relax. We have no prejudice against
you or your patches. Each one will be evaluated in turn. If the
maintainer disagrees with you, or even if not, you may still be expected
to give coherent and complete examples of why the patches are important
enough to justify their cost as changes, but we turn down relatively few
If you're having trouble communicating, keep the discussions to public,
archived forums like this mailing list or the particular issue in
question, so that others might help you argue your case. Unless you
know another person's style of communication well, IRC can be an
exercise in frustration, and the Twisted developers' style includes many
subtle hints about tone of voice which are not immediately obvious to
those outside the group.
More information about the Twisted-Python