[Twisted-Python] Twisted for Python 3

Itamar Turner-Trauring itamar at itamarst.org
Wed Oct 19 16:28:12 EDT 2011

> To me, 3.x support in trunk is not really workable unless you drop
> pre-2.6 compatibility. Bytes literals are pretty much required.
> A possible workaround is to call a factory function that makes
> an str into a bytes in 3.x (e.g. write B("xyz") everywhere instead of
> b"xyz"), but that's quite ugly IMO, not to mention suboptimal.

We're getting closer; we're going to drop Python 2.4 as soon as the next
release is out. Still not up to 2.6, though.

> Incompatibilities are a given when you switch between two different
> data models. The incompatibilities don't have to be wire-level, but
> they *will* occur at the higher level anyway.

The thing that worries is me is unnecessary or harmful incompatibilities
that are a result of misunderstanding (e.g. the banana thing, which was an
unnecessary wire protocol change). Submitting patches would have the
benefit of letting someone else help you make these decisions; it's
unreasonable to expect you to become an expert on every single API in

> Without wanting to sound unconstructive, the "right way" (the
> "byte-sized" approach) does not sound workable. Some 3.x-related patches
> (not mine) have been lingering for years, although they are trivial. And
> these patches (mine and the others) are really the tip of iceberg.

There aren't any python 3 patches in the review queue at the moment; do
you have any specific tickets in mind? If they're ready to go they should
have the "review" keyword set (if they haven't addressed review comments
then that is why they aren't merged).

> *Assuming* we find a clean solution to the bytes literal problem, I
> could try to slice all of that into "byte-sized" patches into which I
> inject version-checking boilerplate, but that would mean a large waste
> of time and energy:
> - for me, as I post dozens of small patches and have to follow up on
>   them, and wait for them to be checked in
> - for you, as you have to review these patches without perhaps even
>   being Python 3 users yourselves, and without Python 3 compatibility
>   being on your priority list

Most of us aren't Windows users either, but we still try to support
Windows :)

More information about the Twisted-Python mailing list