[Twisted-Python] Using six for Python3 porting

Glyph glyph at twistedmatrix.com
Fri Apr 24 01:00:21 MDT 2015


> On Apr 24, 2015, at 02:41, Adi Roiban <adi at roiban.ro> wrote:
> 
> Hi,
> 
> I feel that twisted.python.compat is slowly duplicating / reinventing
> an important part of the six code.
> 
> Code which does not import from  twisted.python.compat will have all
> kind of ad-hoc / in module code to handle differences between py2 and
> py3 and many if _PY3 conditional blocks.
> 
> What do you say if we add six as dependency for twisted ?
> 
> In case you don't want six as a dependency, it can be copied in
> twisted code base and make it available from twisted.python.six or a
> similar package.

I think that this is basically the right thing to do, since almost all of our optional dependencies depend on it.  I'm somewhat surprised that zope.interface hasn't forced this on us already, honestly; what are they doing for a compatibility layer?

I don't want to ssh in to 25 builders and manually install six on each one though.  We should figure out a better dependency management solution for the build fleet so this doesn't have to be a hassle.  (And also to make coverage of certain things easier; for example, the tests fail currently if you install sphinx.)  The first step in this is probably removing me as a bottleneck for administrative tasks, which we are already working on (thank you adi and hawkowl).

-g



More information about the Twisted-Python mailing list