The core Wormhole exchange will retain a blocking/non-Twisted
implementation, but the file-transferring Transit class is going to be
Twisted-only (maybe Twisted+asyncio). I want to improve the
protocol (add more parallelism, reduce round-trips), and the blocking
implementation is a messy bundle of threads and ick.
When this process is done (eventually), I'll be splitting out the
blocking Wormhole class into a separate distribution, which doesn't
depend upon Twisted.
This uses a single TCP connection to the relay server for all
requests (although it probably uses a second one for the downstream
EventSource feed). This should squeeze out some of the round-trip times.
This runs tests directly (with 'coverage run' and 'trial'), rather than
running them inside tox, because that was proving difficult.
It upgrades pip first (the travis builders have an older version), to
use and cache wheels for speed. Travis is now configured to retain the
pip cache between runs.
This installs twisted from trunk (as tox was doing), to work around a
bug in the current twisted-15.5.0 release that should be resolved soon.
Travis is told to ignore any branch named WIP-, so I can transfer
branches between computers without causing red builds.
A coverage report is displayed before uploading to codecov.
The wormhole package is installed as --editable, to make the source
filenames in the coverage data match what I get at home. This also
appears necessary to get codecov to display the data (maybe it ignores
data for files outside the starting directory?).
This adds an expected= argument to Connection.connectConsumer(), which
then returns a Deferred that fires when enough bytes have been written
to the consumer. It also adds Connection.writeToFile(), a helper method
that writes bytes to a filehandle.
I made the classic dataReceived() mistake, and exited the function after
delivering the first record. Keep at it until there are no complete
records left.