Opened 6 years ago

Closed 5 years ago

#8112 enhancement closed wontfix (wontfix)

Migrate Twisted to six

Reported by: hawkowl Owned by:
Priority: normal Milestone: Python-3.x
Component: core Keywords:
Cc: Branch:


We should use six, where possible. Some things aren't duplicated (eg. nativeString) so they should remain, but everything else should import six and use those things directly. Then, the unused parts should be deprecated.

Change History (4)

comment:1 Changed 6 years ago by Glyph

Counterpoint: no we shouldn't. Why should we?

comment:2 Changed 6 years ago by Glyph

For the record: I am not actually opposed to depending on six, but I am opposed to tickets that just say "we should X" without any clear justification or explanation. It does sort of seem to me that depending on six at this point is going to be a ton of work with no significant benefit (we'll be able to delete like ... 100 lines of compatibility code at the cost of changing like 1000 lines of invocations of that code). I don't think we should do it all in one PR, and I don't think we should bother deprecating any of the twisted.python.compat stuff for a good long while; there's nothing wrong with these APIs and there's no reason to force users to migrate off of them, especially since they will need little to no maintenance.

comment:3 Changed 5 years ago by Craig Rodrigues

I agree with glyph here. Looking at the Twisted code, the module inside Twisted is "good enough" for the 2/3 portability concerns in Twisted.

Since is just a single file, some Python projects have imported directly into their projects and used that.

However, all this work has already gone into, and it is *good enough*, so I see no reason to look at six at this time for Twisted.

comment:4 Changed 5 years ago by hawkowl

Resolution: wontfix
Status: newclosed

Since the overlap between "things six has", "what we need", and "what six would want contributed back to it" is incompatible, I think we should just stick with t.p.compat until we drop 2.7 support.

Note: See TracTickets for help on using tickets.