4
Twisted 2.5.0 is a major feature release, with several interesting new
5
developments and a great number of bug fixes. Some of the highlights
8
* AMP, the Asynchronous Messaging Protocol, was introduced. AMP is
9
a protocol which provides request/response semantics over a
10
persistent connection in a very simple and extensible manner.
12
* An Epoll-based reactor was added, which can be used with twistd or
13
trial by passing "-r epoll" on the command line. This may improve
14
performance of certain high-traffic network applications.
16
* The 'twistd' command can now accept sub-commands which name an
17
application to run. For example, 'twistd web --path .' will start a
18
web server serving files out of the current directory. This
19
functionality is meant to replace the old way of doing things with
20
'mktap' and 'twistd -f'.
22
* Python 2.5 is now supported. Previous releases of Twisted were
23
broken by changes in the release of Python 2.5.
25
* 'inlineCallbacks' was added, which allows taking advantage of the
26
new 'yield' expression syntax in Python 2.5 to avoid writing
27
callbacks for Deferreds.
29
In addition to these changes, there are many other minor features and
30
a large number of bug fixes.
34
- log.err can now take a second argument for specifying information
35
about an error (#1399)
36
- A time-simulating test helper class, twisted.internet.task.Clock,
38
- Trial docstring improvements were made (#1604, #2133)
39
- New SSL features were added to twisted.internet.ssl, such as client
41
- Python 2.5 is now supported (#1867)
42
- Trial's assertFailure now provides more information on failure (#1869)
43
- Trial can now be run on tests within a zipfile (#1940)
44
- AMP, a new simple protocol for asynchronous messaging, was added (#1715)
45
- Trial's colorful reporter now works on win32 (#1646)
46
- Trial test modules may now dynamically construct TestSuites (#1638, #2165)
47
- twistd can now make use of plugins to run applications (#1922, #2013)
48
- Twisted now works with the latest (unreleased) zope.interface (#2160)
49
- An epoll-based reactor, epollreactor, was added. It is selectable
50
with the -r options to twistd and trial (#1953)
51
- twistd and trial now use the plugin system to find reactors which
52
can be selected (#719)
53
- twisted.internet.defer.inlineCallbacks was added. It takes
54
advantage of Python 2.5's generators to offer a way to deal with
55
Deferreds without callbacks (#2100)
59
- Traceback formatting in Trial was improved (#1454, #1610)
60
- twisted.python.filepath.FilePath.islink now actually returns True when
62
- twisted.plugin now no longer raises spurious errors (#926)
63
- twisted.pb Cacheables may now be new-style classes (#1324)
64
- FileDescriptor now deals with producers in a more
65
interface-compliant and robust manner (#2286, #811)
66
- "setup.py build" and other setup.py commands which don't actually
67
install the software now work (#1835)
68
- wxreactor has had various fixes (#1235, #1574, #1688)
70
Deprecations and Removals
71
-------------------------
72
- The old twisted.cred API (Perspectives, Identities and such) was
74
- twisted.spread.newjelly was removed (#1831)
75
- Various deprecated things in twisted.python.components were
76
removed: Interface, MetaInterface, getAdapterClass, and
77
getAdapterClassWithInheritance (#1636)
78
- twisted.enterprise.xmlreflector was removed (#661)
79
- mktap is slowly on its way out, now that twistd supports plugins. It
80
is not yet officially deprecated (#2013)
81
- tkmktap was removed, because it wasn't working anyway (#2020)
82
- reactor.iterate calls made inside of a Trial test case are
84
- twisted.internet.qtreactor was removed: It has been moved to a
85
separate project. See http://twistedmatrix.com/trac/wiki/QTReactor
87
- threadedselectreactor is now not a directly usable reactor; it is
88
only meant to help in writing other reactors (#2126)
89
- twisted.python.reflect.funcinfo is deprecated (#2079)
90
- twisted.spread.sturdy, which was already completely broken, was
96
The following changes are minor or closely related to other changes.
98
- #1783, #1786, #1788, #1648, #1734, #1609, #1800, #1818,
99
#1629, #1829, #491, #1816, #1824, #1855, #1797, #1637, #1371,
100
#1892, #1887, #1897, #1563, #1741, #1943, #1952, #1276,
101
#1837, #1726, #1963, #1965, #1973, #1976, #1991, #1936, #1113,
102
#630, #2002, #2040, #2044, #1617, #2045, #2055, #2056, #2022,
103
#2052, #1552, #1999, #1507, #2054, #1970, #1968, #662, #1910,
104
#1694, #1999, #1409, #2150, #2127, #2155, #1983, #2014, #2222,
105
#1067, #2136, #2065, #1430, #2173, #2212, #1871, #2147, #1199,
106
#2273, #428, #992, #815, #2024, #2292, #2125, #2139, #2291, #2174,
107
#2306, #2228, #2309, #2319, #2317, #2313, #2154, #1985, #1201
115
- twisted.internet.task.Cooperator (Added along with #1701).
119
- Errors in UDP protocols no longer unbind the UDP port (#1695).
120
- Misc: #1717, #1705, #1563, #1719, #1721, #1722, #1728.
128
- twisted-dev-mode's F9 now uses trial's --testmodule feature, rather than
129
trying to guess what tests to run. This will break files using the "-x"
130
test-case-name hack (just use a comma separated list instead).
131
- API Documentation improvements.
132
- A new Producer/Consumer guide (#53)
133
- Better-defined error behavior in IReactorMulticast (#1578)
134
- IOCP Multicast support (#1500)
135
- Improved STDIO support on Windows. (#1553)
136
- LoopingCall supports Deferreds such that it will wait until a
137
Deferred has fired before rescheduling the next call (#1487)
138
- Added twisted.python.versions.Version, a structured representation
139
of Version information, including support for SVN revision numbers
145
- Many trial fixes, as usual
146
- All API documentation is now correctly formatted as epytext (#1545)
147
- twisted.python.filepath.FilePath.__repr__ is safer.
148
- Fix trial's "until-failure" mode. (#1453)
149
- deferredGenerator now no longer causes handled exceptions (or
150
results) to propagate to the resulting Deferred (#1709).
151
- Misc: #1483, #1495, #1503, #1532, #1539, #1559, #1509, #1538,
152
#1571, #1331, #1561, #737, #1562, #1573, #1594, #1607, #1407, #1615,
153
#1645, #1634, #1620, #1664, #1666, #1650, #1670, #1675, #1692, #1710,
159
- Removal of already-deprecated trial APIs: the assertions module,
160
util.deferredResult, util.deferredError, util.fireWhenDoneFunc,
161
util.spinUntil, util.spinWhile, util.extract_tb,
162
util.format_exception, util.suppress_warnings, unittest.wait,
164
- The backwards compatibility layer of twisted.python.components
165
(e.g., backwardsCompatImplements, fixClassImplements, etc) has been
166
disabled. The functions still exist, but do nothing as to not break
167
user code outright (#1511)
168
- Deprecate the usage of the 'default' argument as a keyword argument
169
in Interface.__call__. Passing a second positional argument to
170
specify the default return value of the adaptation is still
179
- Twisted no longer works with Python 2.2
180
- FTP server supports more clients
181
- Process support on Windows
182
- twisted.internet.stdio improved (including Windows support!)
184
- Continued Trial refactoring
185
- Default trial reporter is verbose black&white when color isn't supported
186
- Deferreds returned in trial tests that don't fire before the
187
unittest timeout now have their errback fired with a TimeoutError
188
- raising SkipTest in setUp and setUpClass skips tests
189
- Test suites are failed if there are import errors
195
- Fixed infinite loops in datagramReceived edge cases
196
- Issues resolved: 654, 773, 998, 1005, 1008, 1116, 1123, 1198, 1221,
197
1232, 1233, 1236, 1240, 1244, 1258, 1263, 1265, 1266, 1271, 1275,
198
1293, 1294, 1298, 1308, 1316, 1317, 1321, 1341, 1344, 1353, 1359,
199
1372, 1374, 1377, 1379, 1380, 1385, 1388, 1389, 1413, 1422, 1426,
200
1434, 1435, 1448, 1449, 1456
205
- spinWhile and spinUntil
207
- extract_tb and format_exception
208
- util.suppressWarnings
217
- threadedselectreactor, a reactor which potentially makes
218
integration with foreign event loops much simpler.
219
- major improvements to twisted.conch.insults, including many new widgets.
220
- adbapi ConnectionPools now have 'runWithConnection' which is
221
similar to runInteraction but gives you a connection object instead of
223
- __file__ is now usable in tac files
224
- twisted.cred.pamauth now contains a PAM checker (moved from twisted.conch)
225
- twisted.protocols.policies.LimitTotalConnectionsFactory now exists,
226
which does as the name suggests
227
- twisted.protocols.ident now uses /proc/net/tcp on Linux [233]
228
- trial now recurses packages by default (a la the old -R parameter)
229
- (PB) Calling a remote method that doesn't exist now raises
230
NoSuchMethod instead of AttributeError.
234
- FTP client and server improvements
235
- Trial improvements: The code is now much simpler, and more stable.
236
- twisted.protocols.basic.FileSender now works with empty files
237
- Twisted should now be much more usable on Pythons without thread support.
238
- minor improvements to process code in win32eventreactor
239
- twistd -y (--python) now implies -o (--nosave). [539]
240
- improved lockfile handling especially with respect to unix sockets.
241
- deferredGenerator now no longer overuses the stack, which sometimes
242
caused stack overflows.
243
- Failure.raiseException now at least always raises the correct Exception.
244
- minor improvements to serialport code
248
- twisted.python.componts.getAdapter. Use IFoo(o) instead.
249
- Adapter persistence (IFoo(x, persist=True)). Just don't use it.
250
- log.debug. It was equivalent to log.msg(), just use that.
251
- twisted.protocols.telnet. twisted.conch.telnet replaces it.
252
- Setting a trial reporter using a flag to 'trial'. Instead of 'trial
253
--bwverbose', for example, use 'trial --reporter=bwverbose'.
254
- trial --coverage will become a flag in Twisted 2.2.
255
- passing a fully-qualified python name to --reporter is
256
deprecated. Pass only names of Reporter plugins.
258
- trial -R (--recurse) is now the default, so passing it is deprecated.
259
- trial --reporter-args. Use the plugin system to do this sort of thing.
260
- trial.assertions.assertionMethod and trial.unittest.assertionMethod
261
are both deprecated. Use instance methods on TestCases instead.
262
- trial's deferredResult, deferredError, and wait functions. Return
263
Deferreds from your test methods instead of using them.
264
- Raising unittest.SkipTest with no arguments. Give a reason for your skip.
265
- The Failure returned from a gatherResults and DeferredList is now
266
of type FirstError instead of a tuple of (Exception, index). It
267
supports a firstError[idx] syntax but that is deprecated. Use
268
firstError.subFailure and firstError.index instead.
269
- whenThreaded now simply calls the passed function synchronously.
273
Minor bug fix release.
275
SVN rev (file) - [bug number] description
276
-----------------------------------------
277
13307 (twisted/topfiles/README) - Mention support for python 2.4, too
278
13324 (twisted/internet/defer.py) - [947] Fix DeferredQueue backlog/size limit.
279
13354 (twisted/plugins/__init__.py) - Correct maintainer address.
280
13355 (twisted/test/test_defer.py) - improvements to DeferredQueue test case
281
13387 (setup.py) - add news to list of subprojects to install
282
13332 (twisted/internet/posixbase.py) - Fix spelling error
283
13366 (twisted/internet/qtreactor.py) - [957] [954] reactor.iterate fixes
284
13368 (twisted/test/test_internet.py) - Fix DelayedCall test case
285
13422 (twisted/internet/posixbase.py) - Remove log from _Win32Waker creation.
286
13437 (twisted/plugin.py) - [958] Only write cache if there were changes.
287
13666 (twisted/internet/gtkreactor.py,gtk2reactor.py) - Don't run callbacks
288
until the reactor is actually up and running
289
13748 (twisted/internet/gtk2reactor.py) - [552] [994] Initialize threading properly.
297
- Replaced home-grown components system with zope.interface.
298
- Split Twisted into multiple pieces.
299
- Relicensed: Now under the MIT license, rather than LGPL.
300
- Python 2.4 compatibility fixes
301
- Major efficiency improvements in TCP buffering algorithm.
302
- Major efficiency improvements in reactor.callLater/DelayedCall.
303
- Half-close support for TCP/SSL. (loseWriteConnection).
305
Miscellaneous features/fixes
306
----------------------------
307
- New plugin system: twisted.plugin
308
- Better debugging support. Control-C will break you into PDB.
309
- The twistd command has --uid --gid command line arguments.
310
- *Incompatibility: mktap defaults to not change UID/GID, instead of saving
311
the invoking user's UID/GID.
312
- Removed some functions that were deprecated since Twisted 1.0.
313
- ZSH tab-completion for twisted commands.
315
- More correct daemonization in twistd.
316
- twisted.python.log: do not close the log because of invalid format string.
317
- Disabled automatic import of cBanana.
318
- Boolean support for twisted.persisted.marmalade.
319
- Refactor of plugin and application HOWTO documentation
320
- Async HOWTO expanded greatly.
321
- twisted.python.usage outputs the actual defaults, not passed in values.
325
- Rewritten, a bunch of bugs fixed, a few more added.
329
- Multi-listen UDP multicast support
330
- protocol.ClientCreator has a connectSSL.
331
- defer.deferredGenerator: allows you to write Deferred code w/o callbacks.
332
- Deferred.setTimeout is now deprecated.
333
- New defer.DeferredLock/DeferredSemaphore/DeferredQueue.
334
- Add utils.getProcessOutputAndValue to get stdout/err/value.
336
- Default DNS resolver is now non-blocking.
337
- Increased default TCP accept backlog from 5 to 50.
338
- Make buffering large amounts of TCP data work on Windows.
339
- Fixed SSL disconnect to not wait for remote host. Fixes issue with firefox.
340
- Separate state for Deferred finalization so that GC-loops preventing
341
finalization don't occur.
342
- Many Process bugfixes
343
- Processes spawned on windows can successfully use sockets
344
- gtk2reactor can optionally use glib event loop instead of gtk
345
- gtk2reactor notifies gobject to initialize thread support
346
- Fix registering a streaming producer on a transport.
347
- Close client sockets explicitly after failed connections.
348
- ReconnectingClientFactory now continues attempting to reconnect after all
349
errors, not just those which are not UserErrors.
353
- Portforward doesn't start reading from a client until a connection is made.
354
- Bugfixes in twisted.protocols.loopback
355
- Improve speed of twisted.protocols.LineReceiver.
356
- LineReceiver implements IProducer. (stop/pause/resumeProducing)
357
- SOCKSv4 properly closes connections
361
- Add "new connection" callback to adbapi.ConnectionPool to allow for
362
custom db connection setup (cp_openfun)
363
- adbapi.ConnectionPool automatic reconnection support
364
- Don't log exceptions extraneously
370
- Address objects for IPv4 and Unix addresses throughout twisted.internet.
371
- Improved connected UDP APIs.
372
- Refactored SSH client support.
373
- Initial implementation of Windows I/O Completion Ports event loop.
374
- Bug fixes and feature enhancements.
375
- Nevow support for Lore (so your Lore documents can use Nevow directives).
376
- This is the last release before Twisted begins splitting up.