hi there, folks:
I'd really like to release 0.7.0 but I would like it to be at least a
little bit tested before I do so. Could those of you with CVS trees check
everything out and see if it performs as advertised? Deeper bugs than
that will have to wait for the next release, but I'd at least like to know
if it works for someone other than me.
______ __ __ _____ _ _
| ____ | \_/ |_____] |_____|
|_____| |_____ | | | |
@ t w i s t e d m a t r i x . c o m
I looked at latest Travis builds on Linux:
August 11, 2016 https://travis-ci.org/twisted/twisted/jobs/151440581
Tests on Python 2.7
11640 (skips=2083, successes=9557)
Tests on Python 3.5
9647 (skips=2008, successes=7639)
On Thu, Jun 30, 2016 at 3:43 PM, Craig Rodrigues <rodrigc(a)crodrigues.org
> I looked at these two Travis builds on Linux
> DATE BUILD
> ==== =====
> June 3, 2016 https://travis-ci.org/twisted/twisted/builds/135219940
> June 30, 2016 https://travis-ci.org/twisted/twisted/builds/141426367
> I noticed:
> DATE Tests on Python 2.7
> ==== =====================================
> June 3, 2016 11438 (skips=3013, successes=8425)
> June 30, 2016 11496 (skips=2063, successes=9433)
> DATE Tests on Python 3.5
> ==== =====================================
> June 3, 2016 6367 (skips=1533, successes=4834)
> June 30, 2016 7902 (skips=1693, successes=6209)
We are planning to get us some challenge coins, which is exciting! You
should also be excited with us because this means:
- we can now give it out to contributors at sprints and meetups.
- challenge coins are awesome.
Each coin costs about $6, and the minimum order is 100 coins. Glyph thinks
everyone should have some to give out as tokens of appreciation to other
contributors, and glyph's thoughts are usually worth following.
So, if you are a Twisted contributor and would like to own a challenge
coin, please respond to this email. Also, do mention how many coins you
would like, and where you are located so that we can send you your coin(s).
Problem: How do you determine the buffer size of a transport, to know how
much data is waiting to be transmitted from using transport.write?
Wait! You're going to say: use the Producer Consumer API (
To do what: So that instead of using back pressure I can check the buffer
and when it's "too big/full" can decide to do something to the transport I
am writing to:
Slow transport handling options:
- Buffer to disk instead of memory
- Kill the transport
- Decide to skip sending some data
- Send an error or message to the transport I am writing to
- Reduce the resolution, increase the compression (things like video or
Why not use back pressure?: Some use-cases and some protocols this doesn't
- You're sending video and if the receiver can't keep up you want to
downgrade or upgrade the quality of the video, but if you don't know if you
can't tell how much it buffering.
- You're receiving from one connection and then broadcasting what you
received to multiple clients and you want to handle it by sending an error
to a client that doesn't keep up
- You're sending a real-time protocol and want to skip sending some data
that's no longer relevant if the buffer is too slow.
On a server what are the consequences:
Too much buffering in many transport write buffer can cause a server to
fail. I don't know how to keep track of this to proactively without access
to the buffer sizes. Resolutions can then be to, not accept new
connections when memory pressure is too high, kill connections with the
weakest/slowest clients or have a protocol that can have client switch
connections to new servers when instructed to spread out the load.
1) I would like to hear on how people would solve this sort of problem in
Twisted for a server?
2) I would like to hear people opinions on this in general.
Tobias Oberstein - BCC'ed you on this email because you seems to have
tackled similar problems (based on the mailing list) and would really love
to get your take on this too.
Glyph and Jean-Paul, you're also big on those threads so any opinions you
have would be appreciated as well.
Some of my background research
* Later but good in the chain:
* Twisted receiving buffers swamped?
* Summary: Great thread but runs into a tangent for a while and picks up
good at the end again discussing producer again and the need for
* Scenario: "Twisted is reading off the TCP stack from the kernel and
buffering in userspace faster than the echo server is pushing out stuff to
the TCP stack into the kernel. Hence, no TCP backpressure results, netperf
happily sends more and more, and the memory of the Twisted process runs
* Confirmed: Data isn't Buffered in "userspace inside Twisted, and before
data is handled by the app in dataReceived."
* How to cap the buffering size of data to be sent in Protocol class
* Summary: Same issue, very short no good info
* Limit on transport.write
* Summary: Similar issue, very short no good info, glyph confirms that
transport.write buffers everything sent to it.
* pushing out same message on 100k TCPs
* Summary: Interesting discussion but different issue - interesting aside
about irc spanning trees for a large broadcasts
* Question on push/pull producers inter-workings, was : "Is there a
simple Producer/Consumer example or tutorial?"
* Summary: Related and goes into what a producer is - an explanation of it
* When do calls to transport.write() block ?
* Summary: Discusses the right issue, talks about buffer call back if
full which would be great (if configurable)
* Summary: c buffer implementation that's incomplete thought might be
* Summary: Was indicating a similar use-case but source doesn't seem to
exist on the internet
* Summary: Documentation on Producer and Consumers but only help with a
* Summary: Discussion on how producer-consumer API's work and future
enhancement no help
* MANY MORE THAT 100% NOT RELEVANT
Steve Morin | Hacker, Entrepreneur, Startup Advisor
twitter.com/SteveMorin | stevemorin.com
*Live the dream start a startup. Make the world ... a better place.*
On Mimic, the requires.io PR that upgraded us to Twisted 16.4 broke the build.
It did so in a really weird way: https://travis-ci.org/rackerlabs/mimic/jobs/156439316
Specifically, our mac app CI tests failed like so:
File "pkg_resources/extern/__init__.pyc", line 61, in load_module
exceptions.ImportError: The 'appdirs' package is required; normally this is bundled with this package so if you get this warning, consult the packager of your distribution.
Any idea why 'appdirs' might suddenly become a hard dependency of pkg_resources, but only in the py2app bundle? Did something change about the way we referenced dependencies?
On behalf of Twisted Matrix Laboratories, I am honoured to announce the release of Twisted 16.4.0.
The highlights of this release are:
- twist, a new command line tool for running Twisted plugins, similar to twistd but with a simpler, cleaner interface.
- A new interface for Protocols, IHandshakeListener, which tells Twisted to tell the Protocol when the TLS handshake has been completed.
- async/await support for Deferreds, allowing you to write Python 3.5+ coroutines using Twisted
- Trial can be invoked with "python -m twisted.trial".
- All Twisted executables (trial, twistd, etc) are now Setuptools console scripts, meaning they will work much better on Windows.
- 35+ more modules ported to Python 3, and many many cleanups on the way to Python 3 on Windows support.
- All the security fixes of Twisted 16.3.1 + 16.3.2 (httpoxy, HTTP session identifier strengthening, HTTP+TLS consuming sockets)
- 240+ closed tickets overall.
For more information, check the NEWS file (link provided below).
You can find the downloads at <https://pypi.python.org/pypi/Twisted <https://pypi.python.org/pypi/Twisted>> (or alternatively <http://twistedmatrix.com/trac/wiki/Downloads <http://twistedmatrix.com/trac/wiki/Downloads>>). The NEWS file is also available at <https://github.com/twisted/twisted/blob/twisted-16.4.0/NEWS <https://github.com/twisted/twisted/blob/twisted-16.4.0/NEWS>>.
Many thanks to everyone who had a part in this release - the supporters of the Twisted Software Foundation, the developers who contributed code as well as documentation, and all the people building great things with Twisted!
Amber Brown (HawkOwl)
PS: Twisted 16.4.1 will be coming soon after this with a patch mitigating SWEET32, by updating the acceptable cipher list.
Just a note to say that the HTTP/1 + TLS leaking CLOSE_WAIT sockets issue, fixed in 16.3.2 and 16.4.0, has been assigned a CVE, CVE-2016-7100. It'll start showing up on the various CVE databases soon.
Two things to let you all know in this email:
1. The new trial console script does not add the current directory to the PATH. Meaning, you can't use it to test a checkout of your code anymore! Instead, you should only use it for things that are actually on your path -- we recommend using something like tox to automate installing your package and testing your code. Hynek goes into detail here: https://hynek.me/articles/testing-packaging/ . If you really want to do this, you can use 'python -m twisted.trial', but you should really be testing installed versions of your code instead!
2. The next release of Twisted (tentatively named 16.5) will be the last to support Python 3.3. It's not in any LTS platforms, and the only reason we cared was PyPy3 -- but PyPy3.3.5 is not exactly production ready, and since they're working hard on the move to 3.5, I think there's no reason hanging around on 3.3. Hence, 16.5 will still support it in line with our compat policy, but 16.6 (the next release -- might be called 16.11 or 16.12 by that time!) will drop it completely.