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
Hello from PyCascades! Straight from the Pacific North-West, a new
Twisted release candidate!
In this release, there is:
- twisted.web.client.HostnameCachingHTTPSPolicy was added as a new
contextFactory option. This reduces the performance overhead for making
many TLS connections to the same host.
- twisted.conch.ssh.keys can now read private keys in the new
"openssh-key-v1" format, introduced in OpenSSH 6.5 and made the default
in OpenSSH 7.8.
- The sample code in the "Twisted Web In 60 Seconds" tutorial runs on
- DeferredLock and DeferredSemaphore can be used as asynchronous context
managers on Python 3.5+.
- twisted.internet.ssl.CertificateOptions now uses 32 random bytes
instead of an MD5 hash for the ssl session identifier context.
- twisted.python.failure.Failure.getTracebackObject now returns
traceback objects whose frames can be passed into traceback.print_stack
for better debugging of where the exception came from.
- Much more! 20+ tickets closed overall.
You can get the tarball and the NEWS file at
https://twistedmatrix.com/Releases/rc/19.2.0rc1/ , or you can try it out
python -m pip install Twisted==19.2.0rc1
Please test it, and let me know how your applications fare, good or bad!
If nothing comes up, 19.2 will release in a week.
Amber Brown (hawkowl)
Is it intentional to trigger this message?
The reason I ask it it comes from defer.py DebugInfo.___del__().
I though that DebugInfo objects are only created
if defer.DebugInfo.debug == True.
But in Deferred._runCallbacks:701 its created without a check in the
The reason I have noticed is that during my app shutdown an
ftp.FTPClient object is deleted that I think is causing the ftp
connection to close and the connectionClosed event is not
> On Feb 20, 2019, at 11:03 PM, Chris Withers <chris(a)withers.org> wrote:
> On 21/02/2019 06:55, Glyph wrote:
>>> The methods being hooked don't necessarily return deferreds.
> Glyph, this bit ^^^
>>> I'd like it to be an explicit choice of the caller, ie:
>>> result = yield SomeProtocol.onMessage.called()
>>> # okay, we got here, we know onMessage was called,
>>> # now we might want to tick a clock, or otherwise simulate
>>> # async state manipulation.
>>> # now I want to make sure the deferred chain on the onMessage result has been completed:
>>> yield result
>> I'm not sure I understand your example here.
> Yeah, this is part of carly, that I posted earlier. It stems from the need to get the results of method calls when you have no reference to the object being calls, or sometimes a result that's a deferred you need to wait on, particularly in a test, but have no way of doing so.
I just can't parse this sentence.
Breaking it down:
> you have no reference to the object being calls,
How do you have no reference to the object being called? Aren't you calling it?
> or sometimes a result that's a deferred you need to wait on, particularly in a test, but have no way of doing so
But... you do have a way of doing so. You yield it from inlineCallbacks or you add a callback to it.
In any case you either have a Deferred or you don't; if you do, then it's clear you should wait on it, if you don't, then it's clear you should not wait on it. If you want an API that allows some user code to do either, that's what 'maybeDeferred' is for.
> If you're feeling brave, have a read of:
>> The assertion in question only happens if you call returnValue or do a return with a Deferred directly; this example doesn't do either of those things.
> This is the test situation where I hit this issue:
> I'd originally wanted to have that read:
> def test1(self):
> result = yield pita.asyncMethod.called()
> with ShouldRaise(Exception(1)):
> yield result
> Now, which I'm actually happier with the end result here, I think the above it legit, if unusual, and that assert trips it up.
Some type annotations might make it a bit clearer what the two states here are :). As it is, it looks to me you want a Deferred to come *out* of a 'yield', which should definitely never happen. If this assert were to be removed, it would be done in such a way that would implicitly wait for the Deferred in question to fire: you should never receive a Deferred as an argument to a function, or as the result of an (inlineCallbacks) 'yield' or (async def) 'await'. It breaks the whole model of what 'awaiting' means.
I am trying to use treq for a project in which I am also going to generate
a progress bar for the downloading session. But the problem I am facing is
that I can't find a way to get the content length header from the response.
The "response.length" gives me "unknown size".So I there a way I can get
the length for all types of content?