What is the Twisted Split?
Twisted is very large. At last count, it has around 80 thousand lines of code (yes, that is very large for a Python project, maybe not so for a C++ project. ;). We are breaking it into several smaller packages before the 2.0 release.
Why is Twisted being split?
The biggest reason is to make our release process more agile. Currently it is very slow. A regression in twisted.names, for example, could hold up the release of the entire thing, when really it should only be holding up the release of twisted.names.
The other big reason is visibility. Twisted has a ton of functionality, but many people miss out on it because they don't know where it is hidden inside Twisted. The Twisted split will give every sub-project its own web site and thus more visibility.
But I liked the monolithic packages. Can I still get them?
Yes. Tarball and Windows releases for Twisted and all of its sub-projects will still be maintained. We encourage maintainers of packages for OSes with automatic packaging systems to break up the packages as well, so, for example, Debian will have python2.3-twisted-core, python2.3-twisted-conch, python2.3-twisted-names, and so on.
Where can I find information about the individual projects?
A list of Twisted projects is available on the website. The list includes maintainer information and links to project-specific pages with more detailed information.
What are the new packages?
- Twisted Core - This contains twisted.application, twisted.cred, twisted.enterprise, twisted.internet, twisted.manhole, twisted.persisted, twisted.protocols[1], twisted.python, twisted.spread, twisted.trial
- Twisted Conch - This contains twisted.conch.
- Twisted Flow - This contains twisted.flow (deprecated).
- Twisted Lore - This contains twisted.lore
- Twisted Mail - This contains twisted.mail; NOTE the mail protocols that were in twisted.protocols.(imap4,pop3,smtp) were moved to twisted.mail.
- Twisted Names - This contains twisted.names; NOTE twisted.protocols.dns was moved to twisted.names.dns.
- Twisted News - This contains twisted.news; NOTE twisted.protocols.nntp was moved to twisted.news.nntp
- Twisted Pair - This contains twisted.pair; NOTE ethernet, ip, raw, and rawudp protocol support was moved from twisted.protocols to twisted.pair. (deprecated)
- Twisted Runner - This contains twisted.runner.
- Twisted Web - This contains twisted.web; NOTE that twisted.protocols.http was moved to twisted.web.http.
- Twisted Words - This contains twisted.words; NOTE that twisted.im was moved to twisted.words.im, twisted.xish was moved to twisted.words.xish, AND the chat protocols (irc, msn, jabber, toc, oscar) were moved to twisted.words.protocols.
[1]: twisted.protocols is very stripped down now; it only includes the protocols that didn't belong anywhere else. It still contains the simple protocols, the helper utilities, and, ahem, FTP.
Will I have to rewrite my code? What API changes are there?
No existing code should break, however, many modules were moved. Backwards compatibility support does exist; you will get a DeprecationWarning if you try to import, e.g., twisted.protocols.http notifying you that it has been moved to twisted.web.http.
What about my deployments? What will I have to do to have the new packages?
It depends on your OS and how you installed Twisted originally. If you're using Debian, we are planning on breaking up the Debian packages to e.g. python2.3-twisted-core, python2.3-twisted-web, and so on. If you're using Windows, or generally install Twisted from the tarball or from an SVN checkout, monolithic options will still be available.
If you try to run code that imports a sub-package when that sub-package is not available on the system, an ImportError will be raised directing the user to the web site for that particular sub-project.
Why are all the packages still named twisted.subproject?
This is controversial. While this does mean that there is a
mashed-together namespace under twisted.
, it's also the
simplest thing to do, and means less breakage for user-code, so we're
doing that.
When will 2.0 be released?
That's hard to tell. I (Christopher Armstrong) am doing most of the work of the split, but I'm in the middle of a move to Australia and a new full-time job. Unfortunately doing this split requires a lot of specific knowledge of how things work, but if you are willing to help, please see the next question.
Where can I see a progress report?
http://twistedmatrix.com/bugs/issue567.
Can I help?
Really, there's not a whole lot to be delegated, unless your name is Fred Drake. However, talk to Christopher Armstrong via email or IRC ('radix' on irc.freenode.net) if you're interested.
What does this mean for existing Twisted developers?
Not much. The repository is rearranged a bit; protocols have been moved to their relevant packages and documentation is now stored in doc/subproject/ instead of everything at the top-level of doc/. Everything is still in the same repository and everyone still has the same access levels they used to.