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
The @deprecated decorator (at leas on py2.7) does not work when paired
For deprecated instance variables, our deprecation policy recommend
converting them into properties and emitted the warning from there.
It would be nice if we could use the standard @deprecated decorator here.
The problem is that when property are used the fget/fset are received by
the @deprecated wrapper as functions and not as methods
Is there a way to get the class in which a property is defined... or there
is no way to use the @deprecated decorator with the @property .. and we
should create a dedicated deprecatedMember method which is called as a
1) Is template block processing done top to bottom sequentially? I've
included example.py - it's interesting that by having a blocking call first
the second request is blocked, but having the blocking call after a
non-blocking call the second request is not. I would've thought it would
behave as a deferred list, but looking at _flattenTree and guessing not.
Maybe related to wait_for_it example?
2) Is it possible for a Resource to act as an Element too? I've included a
non-working elementresource.py. I'm a total hack, but I would think that
if an instance had a loader attr it could be processable.
3) Is it possible to include xmlns:t="
http://twistedmatrix.com/ns/twisted.web.template/0.1" not in a tag itself?
Or perhaps have a tag like 'render-block' that could be transparent-like?
4) Is it possible to have xmlns:t="
http://twistedmatrix.com/ns/twisted.web.template/0.1" in multiple places in
a template? I have some cases with inline scripts that bonk out with > or
< characters. This is very much related to #3.
5) Is it possible for a render element to return something like "<~sometag
t:render>..." and process recursively?
6) Is there any examples of connection keep-alive long polling?
7) Examples of request based scoping would be great. All the examples on
have flatten(None... - I've included request_scope.py
8) The wait_for_it example, is that meant as a chunked transfer example?
It would be cool to have an example I could open in a browser. Trying to
wrap my head around this and subviews in the meantime.
I’m trying to get twisted installed on OS X 10.11 with virtualenv and python3.5. All dependencies are satisfied.
It seems to install correctly and it seems that OpenSSL is working pretty well with it.
But when I try to load
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named ‘twisted.conch'
on inspection, in the folder site-packages/twisted there is no conch folder.
I tried to build twisted from source and conch doesn’t seem to build either
What can I do to solve this?
It's been brought to my attention that I misworded something in the release notes and it slipped through the cracks. In the NEWS I said:
> This is the last Twisted release where Python 2.6 is supported, on any platform.
However, I meant that this is the first Twisted release to drop 2.6 support wholesale, preventing import on this platform. Twisted 15.4 will still operate, so if you have Python 2.6 deployment requirements, bracket the maximum to 15.4 on that platform by using an if statement in your setup.py, and `Twisted >=*minreq*,<=15.4; python_version < '2.7'` under requires_dist in your setup.cfg, where minreq is the minimum required Twisted.
Sorry for the inconvenience!
- Amber "HawkOwl" Brown
Twisted Release Manager
What is the purpose of IOpenSSLTrustRoot ?
It it documented as a private interface, it has only private methods, but
then it is exposed in twisted.internet.ssl.optionsForClientTLS
I am confused while trying to review
Please take a look at my review and add your wisdom :)
I'm writing a MUD server, and I want a way for transports to be notified
ofa shutdown before being disconnected, and the reactor being stopped.
for t in transports:
This doesn't seem to notify the transports.
I also tried:
for t in transports:
That just blocked and did nothing, presumably something do with my while
Is there a stopWhenEmpty function on the somewhere? I did look over the
methods, and I couldn't find anything promising.
I'm just using the standard from twisted.internet import reactor
reactor, so no special cases here. In case it matters the transports I'm
using are twisted.protocols.basic.LineReceiver, and everything else
works with them.
Cheers in advance for the help.
We've been attempting to port twisted.web.wsgi to Python 3, as of recent. The existence of PEP-3333 makes this easier, but due to our backwards compatibility policy, implementing stricter checks to make sure t.w.wsgi-using applications are actually PEP-3333 may be a change which cannot be easily done.
The patch we have currently, which is based on work by jMyles (of Hendrix), tirelessly worked on allennap (of Canonical MAAS), and sheparded along by the wonderful Adi (our other Twisted Fellow), is in very good shape, bringing Twisted's WSGI support to be compliant with PEP-3333. PEP-3333 is much stricter on bytes/Unicode, and the patch introduces some further type checking that the original PEP-333 describes as a must, even though we did not check this before.
This branch cannot currently be merged because of backwards compatibility issues -- the spirit of our Compatibility Policy is that 'apps keep working', and sufficiently Unicode unclean WSGI applications may break due to it, even though PEP-333 is very explicit in saying that "HTTP does not directly support Unicode, and neither does this interface".
So, I am looking to get a compat exception for this -- WSGI is very explicit in its types, and any misbehaving applications are violating the specification grossly enough for there to possibly not need a compat exception -- but going through this way may catch the attention of anyone with a potentially misbehaving application and fix it before Twisted 16.0, when I expect this will be merged.
The ticket is https://twistedmatrix.com/trac/ticket/7993, and the branch you should test against is linked at the top. The compatibility policy will allow a week before we move to merge the ticket, although we may have some changes to the branch to make warnings turn into errors, if we are breaking backwards compat, so please ensure no exceptions *or warnings* are produced by your code.
Twisted Fellow, RM, Python 3 Overlord
I've been fooling around with the Twisted SSL APIs.
I'd like to add a "loadPEM" and documentation to ssl.KeyPair; shall I
open a ticket and start this, or is there a reason it doesn't have a
loadPEM() like some of the other classes (or any docstrings)? It is
exported as a public class in "ssl".
Also I'm wondering why CertificateOptions takes actual OpenSSL objects
for args, instead of the Twisted equivalents; this leads to code
accessing ".original" all the time if you use Twisted APIs to load
Certificate (and friends) which seems .. odd. Perhaps either a
Certificate *or* the correct underlying OpenSSL object could be
There also doesn't seem to be a way around importing
OpenSSLCertificateAuthorities from _sslverify (i.e. "private" class) if
you want to give optionsForClientTLS() more than a single certificate as
trustRoot. The only way I can see is to construct one of those from a
list of OpenSSL certificate instances and pass that as trustRoot=
Thanks for any hints,