[Twisted-Python] [RFC] Introducing six as a dependency
vlada.peric at gmail.com
Thu Jul 26 11:55:50 EDT 2012
as part of my work on porting Twisted to Python 3, I have considered
using the six library to help with some issues. six is basically a
compatibility library - same idea as our twisted.python.compat module.
Now, one approach is to add six as a dependency of Twisted - it is a
very small library so hardly a problem; on the other hand, it is an
additional dependency. The other approach would be to copy the
required code over to the t.p.compat module (six' license is
basically "do what you want with this code"), but this is additional
work and we might miss out on the eventual bugfix (though there has
only been a couple since the project started). In general, I have
heard good things about six.
As a note, currently, I would need at least the reraise and exec_
functions from six; additionally, a lot of the things from the
six.moves package are useful. And, of course, there might be other
compatibility functions which I'd need, I just haven't encountered yet
(I do only use these if absolutely required, though).
What do you all think? In the end, it boils down to "additional
dependency" vs. "less code to maintain".
Personally, I could go either way - using six makes things slightly
easier, but I could just copy over the code we need and be done with
More information about the Twisted-Python