[Twisted-Python] Adding code to twisted

Justin Warren daedalus at eigenmagic.com
Wed Jan 30 00:30:16 EST 2008

On Tue, 2008-01-29 at 13:06 +0000, glyph at divmod.com wrote:
> On 03:53 am, jml at mumak.net wrote:
> >You should be warned that your code needs to be reviewed before it
> >hits the tree, and you'll need to have good unit tests.
> I want to repeat and emphasize this warning, because if you haven't 
> submitted any patches before, you may be in for a nasty surprise ;).


> It is, however, both good news and bad news.  The bad news is that it is 
> probably going to be a lot of work.  You will need to live up to the 
> current Twisted quality standards, which means:

Nothing worthwhile is easy.

>   * Your tests will need to achieve at least 100% line-coverage
>   * You will need to write docstrings for every public module, method, 
> and class (including tests).
>   * Docstrings will have to be formatted according to Twisted standard, 
> including @param and @type markers where appropriate
>   * The code will need to be cleaned up to meet the coding standard 
> (trailing whitespace, unused imports, naming conventions, etc)
> This means, in practice, that it will have to be better than some of the 
> code already in twisted that was "grandfathered in" before we adopted 
> these standards :).

This will indeed require work. On the plus side, this will make the code

> The *really* bad news is that I can see that libsnmp is under the LGPL. 
> Twisted is under the MIT license, and we are not going to add anything 
> to it under a more restrictive license.  Do you have the authority to 
> relicense all of that code?  i.e. have you received any contributions 
> under the LGPL, and can you get in touch with everyone that you've 
> received those contributions from and verify that they're OK with a 
> license change?

libsnmp has already been relicensed under the MIT license. I'm guessing
there's some doco or an artifact out there that still refers to the LGPL
(which is was licensed under initially). If you could point it out, I'll
fix it to clear up any confusion.

And I wrote all the code myself. The only contributions I've received
have been some bug notifications.

> The good news is that the code will probably get vastly better in the 
> process.  I've written a few things which have been overhauled and 
> radically improved as part of the process of getting them in to Twisted. 
> However, the reason that the documentation is geared toward patching 
> rather than addition of large features is that adding large features all 
> at once can be daunting both for reviewers and authors of code.  For 
> example, you can see what a "large" review looks like here:
>     http://twistedmatrix.com/trac/ticket/1608#comment:27
> You might want to break up libsnmp into a series of smaller chunks so 
> that you can deal with the feedback in smaller chunks and get your 
> contributions reviewed and integrated faster.

I might try my hand at a patch or two to get the hang of things, and
work on getting my code up to scratch in the meantime.

Thanks for the detailed response. :)

Justin Warren <daedalus at eigenmagic.com>

More information about the Twisted-Python mailing list