Re: [Twisted-Python] Twisted 21.7.0 Pre-Release Announcement

2021-07-18 Thread Richard van der Hoff
On 16/07/2021 20:27, Glyph wrote: One particular problem I came across was the type annotation on inlineCallbacks. I've filed https://twistedmatrix.com/trac/ticket/10231 about it - would appreciate thoughts. This definitely looks wrong; there should be a TypeVar in there.  Adi, I'd go so

Re: [Twisted-Python] Twisted 21.7.0 Pre-Release Announcement

2021-07-16 Thread Richard van der Hoff
On 16/07/2021 00:18, Glyph wrote: On Jul 15, 2021, at 9:00 AM, Richard van der Hoff <mailto:rich...@matrix.org>> wrote: We can't just go and add type annotations because we need to maintain compatibility with older Twisted (to make it possible to package in Debian et a

Re: [Twisted-Python] Twisted 21.7.0 Pre-Release Announcement

2021-07-15 Thread Richard van der Hoff
On 11/07/2021 00:49, Glyph wrote: Thank you Adi!  Very glad to see us collectively getting back on the release-management horse again!  And it was super encouraging to see how quickly you were able to get this out, with all the automation that everyone (not least of all yourself) has been

Re: [Twisted-Python] startTLS errors not propagating to Factory

2021-04-29 Thread Richard van der Hoff
On 29/04/2021 07:36, Glyph wrote: In my tests at least, TLSMemoryBIOProtocol.connectionLost is doing exactly the right thing - it is called with an unhelpful reason, but substitutes back in the helpful reason which has already been stashed. Rather, the problem, as I see it, is that it's not

Re: [Twisted-Python] startTLS errors not propagating to Factory

2021-04-28 Thread Richard van der Hoff
On 28/04/2021 07:06, Glyph wrote: Is the SMTP code holding the Factory wrong? Or is it reasonable to expect the verification error to propagate into clientConnectionFailed - in which case, how could this work? Thanks for your thoughts! Hi Richard, Sorry for the delayed response here.

[Twisted-Python] startTLS errors not propagating to Factory

2021-04-09 Thread Richard van der Hoff
Hi folks, I've been investigating https://github.com/matrix-org/synapse/issues/9566, which amounts to: "when there is a TLS error connecting to the SMTP server, the resultant exception is unreadable". I think I've traced the problem to the fact that SMTPSenderFactory.clientConnectionFailed

Re: [Twisted-Python] Twisted v21.2.0 breaks Crossbar.io

2021-03-03 Thread Richard van der Hoff
On 03/03/2021 18:47, Glyph wrote: I'll take this to the Synapse team to discuss further, but we could probably easily arrange for one of our CI runs to install Twisted trunk from git instead of pypi, which might be a good start. This is specifically the approach I'd really rather /not/ take

Re: [Twisted-Python] Twisted v21.2.0 breaks Crossbar.io

2021-03-03 Thread Richard van der Hoff
On 03/03/2021 08:07, Glyph wrote: If dependencies could start testing against Twisted trunk in some capacity, we could get notified close to when unintentionally breaking changes occur, and dependencies can let us know well before the release happens, and we can either revert or they can

Re: [Twisted-Python] Twisted 21.2.0rc1 Release Candidate Announcement

2021-02-28 Thread Richard van der Hoff
On 28/02/2021 07:38, Craig Rodrigues wrote: Thomas Grainger and Adi Roiban have worked together to bump up the minimum Python version to 3.5.3 for this release ( https://github.com/twisted/twisted/pull/1524 ), and are not approving the PR that I have submitted in PR 1525.  Even though you

Re: [Twisted-Python] Twisted 21.2.0rc1 Release Candidate Announcement

2021-02-22 Thread Richard van der Hoff
On 21/02/2021 01:36, Craig Rodrigues wrote: Awww, this is unfortunate. It looks like our CI on GitHub Actions is testing *Python 3.5.10*. Over the past year, we have added a lot of type annotations to the codebase, and it has been a struggle to still keep things working with Python 3.5, but

Re: [Twisted-Python] Twisted 21.2.0rc1 Release Candidate Announcement

2021-02-20 Thread Richard van der Hoff
On 21/02/2021 00:31, Richard van der Hoff wrote: On 15/02/2021 02:53, Craig Rodrigues wrote: It's time for another Twisted release! There are two major announcements for this release: - *Python 2.7 support has been dropped*.  Twisted 21.2.0 supports Python 3.5 and higher only

Re: [Twisted-Python] Twisted 21.2.0rc1 Release Candidate Announcement

2021-02-20 Thread Richard van der Hoff
On 15/02/2021 02:53, Craig Rodrigues wrote: It's time for another Twisted release! There are two major announcements for this release: - *Python 2.7 support has been dropped*.  Twisted 21.2.0 supports Python 3.5 and higher only - *This will be the last Twisted release to support Python 3.5*.

Re: [Twisted-Python] [RFC] Drop support for Python 3.5 sometime after May 2021?

2020-06-08 Thread Richard van der Hoff
On 08/06/2020 08:04, Glyph wrote: > I'm going to start here by saying: I agree with almost all of what you wrote, but at the end of the day, I don't get to determine our customers' policies. You can try to explain to them why their policies are misguided, but particularly when you're

Re: [Twisted-Python] [RFC] Drop support for Python 3.5 sometime after May 2021?

2020-05-19 Thread Richard van der Hoff
On 16/05/2020 06:56, Glyph wrote: On May 15, 2020, at 8:40 PM, Craig Rodrigues > wrote: Maybe it would be OK to do one more release of Twisted and announce that as the last release supporting Python 3.5, before dropping support? Yeah; whenever we drop a

Re: [Twisted-Python] Help with twisted.conch.manhole

2020-04-20 Thread Richard van der Hoff
Or peek in matrix-synapse's code, which has a telnet-based one. synapse's manhole is SSH-based :) (dunno why, given it uses hardcoded auth, so all security depends on the manhole port being locked down, but still) ___ Twisted-Python mailing list

Re: [Twisted-Python] IReactorTime.seconds: epoch time or no?

2020-03-27 Thread Richard van der Hoff
On 26/03/2020 09:23, Barry Scott wrote: Why does Twisted need to duplicate the built in python time features? > What was wrong with using time.time() for the access logs? I feel like glyph's already answered this: use of `time` makes for poor testability. You might argue you don't care for

[Twisted-Python] IReactorTime.seconds: epoch time or no?

2020-03-23 Thread Richard van der Hoff
HTTPFactory seems to think that `reactor.seconds` is reliably an epoch time (see https://github.com/twisted/twisted/blob/trunk/src/twisted/web/http.py#L3110, etc). On the other hand. AsyncioSelectorReactor.seconds() returns a monotonic time: python3 -c 'from twisted.internet import

Re: [Twisted-Python] Twisted 20.3.0rc1 Release Candidate Announcement

2020-03-20 Thread Richard van der Hoff
, Richard van der Hoff <mailto:rich...@matrix.org>> wrote: Hi Amber and team! Firstly, I can confirm that I've been using 20.3.0rc1 on a production server, and all seems fine. So... I'm keen to see a final release, particularly in light of the request smuggling attacks. Any idea

Re: [Twisted-Python] Twisted 20.3.0rc1 Release Candidate Announcement

2020-03-18 Thread Richard van der Hoff
Hi Amber and team! Firstly, I can confirm that I've been using 20.3.0rc1 on a production server, and all seems fine. So... I'm keen to see a final release, particularly in light of the request smuggling attacks. Any idea what sort of timeframe looks likely? R On 14/03/2020 07:03, Glyph

Re: [Twisted-Python] Waiting for a contended resource

2018-03-12 Thread Richard van der Hoff
Thank you for all for all the answers so far, particularly to Ilya and Jean-Paul who provided some very helpful code samples. It's interesting to realise that, by avoiding locking, we can end up with a much more efficient implementation. I'll have to figure out how widely we can apply this

[Twisted-Python] Waiting for a contended resource

2018-03-12 Thread Richard van der Hoff
Hi folks, I thought I'd poll the list on the best way to approach a problem in Twisted. The background is that we have a number of resources which can be requested by a REST client, and which are calculated on demand. The calculation is moderately expensive (can take multiple seconds), so