Author: radix
Reviewer: therve
Fixes: #3534
Now it's possible to specify the log observer used by twistd in a .tac
file by setting the ILogObserver component on the application.
git-svn-id: svn://svn.twistedmatrix.com/svn/Twisted/trunk@25379 bbbe8e31-12d6-0310-92fd-ac37d47ddeeb
Author: exarkun
Reviewer: radix
Fixes: #3521
Fix the implementation of `IReactorProcess` so that it passes a `Failure` to
`IProcessProtocol.processExited` instead of passing an exception.
git-svn-id: svn://svn.twistedmatrix.com/svn/Twisted/trunk@25366 bbbe8e31-12d6-0310-92fd-ac37d47ddeeb
Fixes#1376Fixes#1301Fixes#3494Fixes#3496Fixes#1292Fixes#3499
The main thrust of this change is that it adds a new module to conch, `twisted.conch.client.knownhosts`, which provides a structured representation of OpenSSH's `known_hosts` file. This is a big step in the direction of modularizing conch's support for verifying host keys and storing the results of that verification, although the internal connection APIs are mostly unchanged at this point, they could now easily be adjusted to speak to an abstract interface and still manipulate the user's actual known_hosts entries rather than completely overriding them.
The individual bugs which this change fixes are too numerous to bother describing twice; have a look at the tickets themselves more information. Suffice it to say that the conch client is now a lot more reliable (although it still has a long way to go).
In addition to making the conch client more stable, the new API allows for some programmatic manipulation of known_hosts files, which might be independently useful.
Additionally, although the review notes some ways in which the tests can still be improved, the tests for this module can be cited as a ''much'' better example for conch contributors as to how unit tests within conch should look. While these tests are covering almost exclusively new code, they are covering functionality which has existed (and been broken) for quite some time.
Author: glyph
Reviewers: exarkun, jml
git-svn-id: svn://svn.twistedmatrix.com/svn/Twisted/trunk@25365 bbbe8e31-12d6-0310-92fd-ac37d47ddeeb
Author: feisley
Reviewer: exarkun
Fixes: #3511
Add support to `twisted.python.versions` for parsing SVN format 9 and 10 entries
files. These are the versions used by subversion 1.5 and (speculatively) 1.6
respectively. They do not differ from format 8 as far as `Version` is concerned,
so the version 8 parser is re-used.
git-svn-id: svn://svn.twistedmatrix.com/svn/Twisted/trunk@25349 bbbe8e31-12d6-0310-92fd-ac37d47ddeeb
Author: radix
Reviewer: exarkun
Fixes: #3439
Two new scripts, bin/admin/build-tarballs and build/admin/change-versions,
now automate most of basics of the release process. These scripts are
excluded from the release itself.
git-svn-id: svn://svn.twistedmatrix.com/svn/Twisted/trunk@25335 bbbe8e31-12d6-0310-92fd-ac37d47ddeeb
This change remove font and size rules left over from an earlier generation of browsers, when the defaults looked truly awful. These rules would sometimes cause code samples to be displayed in a proportional font, so this corrects buggy rendering of the documentation in some configurations.
Author: glyph
Reviewers: exarkun, jml
Fixes#3121
git-svn-id: svn://svn.twistedmatrix.com/svn/Twisted/trunk@25323 bbbe8e31-12d6-0310-92fd-ac37d47ddeeb
Author: exarkun
Reviewer: therve
Fixes: #3515
Fix the formatting done by `FileLogObserver` of timezone offsets
between -1 and -59 minutes (ie, log events emitted in Liberia
before May 1, 1972 or in Ireland between 1880 and October 1, 1916).
Previously these timezone offsets would be incorrectly reported as
positive rather than negative.
git-svn-id: svn://svn.twistedmatrix.com/svn/Twisted/trunk@25286 bbbe8e31-12d6-0310-92fd-ac37d47ddeeb
Author: exarkun
Reviewer: glyph
Fixes: #3520
Add documentation about the interaction between trial and the `warnings` module.
git-svn-id: svn://svn.twistedmatrix.com/svn/Twisted/trunk@25280 bbbe8e31-12d6-0310-92fd-ac37d47ddeeb
Author: radix, itamar, exarkun
Reviewer: glyph
Fixes: #3487Fixes: #3427Fixes: #2820Fixes: #3506
Introduce `TestCase.flushWarnings`, an API for interacting with the Python warnings
module in unit tests. By default, the default trial reporter will write warnings
emitted by tests to its output stream (no longer does the runner print them to
stdout). `flushWarnings` may be used to prevent this from happening in particular
tests, and its return value may be used to make assertions about what warnings have
been emitted. `TestCase.assertWarns` and `TestCase.callDeprecated` are both now
implemented in terms of this more flexible API.
The default reporter includes rudamentary support for duplicate suppression: each
warning will be reported only once per test, but if a warning is emitted by two or
more tests, it will be reported for each test (isolating tests from each other
further by making warning behavior the same regardless of what other tests have run).
There is also some support for failing tests based on warnings emitted. If the Python
warnings filters system is used to turn a warning into an exception, any test which
causes such a warning to be emitted will have an error attributed to it.
git-svn-id: svn://svn.twistedmatrix.com/svn/Twisted/trunk@25279 bbbe8e31-12d6-0310-92fd-ac37d47ddeeb
Author: exarkun
Reviewer: therve
Fixes: #3519
Use `FilePath` in the strcred tests to write test data to a file. A
useful consequence of this is that any obscure details about how files
should be written (such as that they should be closed explicitly) is
done for us. This helps Python runtimes which don't do refcounting
by making sure the data actually ends up in the file before the tests
need it.
git-svn-id: svn://svn.twistedmatrix.com/svn/Twisted/trunk@25273 bbbe8e31-12d6-0310-92fd-ac37d47ddeeb
Author: ralphm.
Reviewer: therve.
Fixes#3407.
An XMPP router connects parts of a Jabber server known as 'components' and
routes XML Stanzas between components based on addressing on stanzas.
Components usually connect over a TCP socket, so this change adds a factory to
listen for incoming component connections that are tied to the router. Using
the new XmlPipe, components can also be connected to the router within the same
process without using a socket. Finally, a random stream ID is generated for
all incoming XML Streams.
The new xmpp-router twistd plugin allows for easy deployment of a stand-alone
XMPP router.
git-svn-id: svn://svn.twistedmatrix.com/svn/Twisted/trunk@25272 bbbe8e31-12d6-0310-92fd-ac37d47ddeeb
Author: ralphm.
Reviewer: therve.
Fixes#3407.
An XMPP router connects parts of a Jabber server known as 'components' and
routes XML Stanzas between components based on addressing on stanzas.
Components usually connect over a TCP socket, so this change adds a factory to
listen for incoming component connections that are tied to the router. Using
the new XmlPipe, components can also be connected to the router within the same
process without using a socket. Finally, a random stream ID is generated for
all incoming XML Streams.
The new xmpp-router twistd plugin allows for easy deployment of a stand-alone
XMPP router.
git-svn-id: svn://svn.twistedmatrix.com/svn/Twisted/trunk@25269 bbbe8e31-12d6-0310-92fd-ac37d47ddeeb
Author: exarkun
Reviewer: glyph
Fixes: #3478
Change `BinaryBoxProtocol` so that as soon as it receives a key length
prefix larger than 255 it closes the connection and reports a protocol
violation as the reason for any failures. Keys are restricted to 255
or fewer bytes by the protocol; early disconnection for violation of this
simplifies tracking down bugs in protocol implementations.
git-svn-id: svn://svn.twistedmatrix.com/svn/Twisted/trunk@25267 bbbe8e31-12d6-0310-92fd-ac37d47ddeeb
Author: exarkun
Reviewer: glyph
Fixes: #3477
Refs: #3476
Fix `BinaryBoxProtocol` so that its `IBoxReceiver` can send boxes in its
`startReceivingBoxes` callback such that they are actually written to the
transport rather than result in an exception.
git-svn-id: svn://svn.twistedmatrix.com/svn/Twisted/trunk@25248 bbbe8e31-12d6-0310-92fd-ac37d47ddeeb
Author: mwh, exarkun
Reviewer: glyph
Fixes: #2902
Fix the value of FILEXFER_ATTR_ACMODTIME in the sftp implementation and add tests
which parse chunks of the relevant draft standard to make sure all the constants
are correct.
git-svn-id: svn://svn.twistedmatrix.com/svn/Twisted/trunk@25243 bbbe8e31-12d6-0310-92fd-ac37d47ddeeb
Author: ralphm.
Reviewer: exarkun.
Fixes#3464.
This splits the code installing bootstrap event observers in a seperate class
`t.w.x.xmlstream.BootstrapMixin` to have
`t.w.p.j.xmlstream.XmlStreamServerFactory` depend on that, instead of
`t.w.x.xmlstream.XmlStreamFactoryMixin`. The former now builds the protocol
itself, so the odd dance with the `args` attribute is not needed.
git-svn-id: svn://svn.twistedmatrix.com/svn/Twisted/trunk@25242 bbbe8e31-12d6-0310-92fd-ac37d47ddeeb
Author: exarkun
Reviewer: radix
Fixes: #2605
Explicitly define equal and not-equal comparison for `TestCase` so that instances
only compare equal to themselves. This is the Python 2.3 - 2.5 behavior but not
the Python 2.6 behavior. It is required in order for a particular test method to
be runnable more than once in a single suite.
git-svn-id: svn://svn.twistedmatrix.com/svn/Twisted/trunk@25227 bbbe8e31-12d6-0310-92fd-ac37d47ddeeb
Reopens#2902
The newly added test fails on Python 2.3:
{{{
===============================================================================
[FAIL]: twisted.conch.test.test_filetransfer.TestConstants.test_constantsAgainstSpec
Traceback (most recent call last):
File "/srv/bb-slave/Run/slave/full2.3/Twisted/twisted/conch/test/test_filetransfer.py", line 676, in test_constantsAgainstSpec
self.assertEqual(v, getattr(filetransfer, k))
twisted.trial.unittest.FailTest: not equal:
a = -2147483648
b = 2147483648L
-------------------------------------------------------------------------------
}}}
This appears to be due to the behavior of int("0x80000000", 0) on Python 2.3 (which
differs from the behavior on later versions of Python).
git-svn-id: svn://svn.twistedmatrix.com/svn/Twisted/trunk@25219 bbbe8e31-12d6-0310-92fd-ac37d47ddeeb
Fix the value of FILEXFER_ATTR_ACMODTIME in twisted.conch.ssh.filetransfer, and
add tests that parse chunks of the relevant draft standard to make sure all the
constants are correct.
Author: mwh
Reviewer: glyph
Fixes: #2902
git-svn-id: svn://svn.twistedmatrix.com/svn/Twisted/trunk@25218 bbbe8e31-12d6-0310-92fd-ac37d47ddeeb
Author: tarjei, exarkun
Reviewer: thijs, radix
Fixes: #3491
Add `FTPClient.removeFile` method for using the file deletion feature of FTP.
Also deprecate `FTPClient.changeDirectory` which added incorrect response
handling on top of `FTPClient.cwd`.
git-svn-id: svn://svn.twistedmatrix.com/svn/Twisted/trunk@25201 bbbe8e31-12d6-0310-92fd-ac37d47ddeeb
Author: exarkun, itamar
Reviewer: thijs, radix
Fixes: #3298
Change the `__str__` and `__repr__` of `FirstError` so that they include better
and more complete information about the underlying failure (and therefore the
real cause of the exception). This means that when these errors are logged, the
log will now include information about the exception which caused the `FirstError`.
The deprecated tuple-like interface is also removed.
git-svn-id: svn://svn.twistedmatrix.com/svn/Twisted/trunk@25200 bbbe8e31-12d6-0310-92fd-ac37d47ddeeb