Re: [Twisted-Python] Twisted Release Planning

2021-07-09 Thread Tom Most
 Automating all this is a great project! Please feel free to ping me for reviews. ---Tom On Thu, Jul 8, 2021, at 10:16 AM, Adi Roiban wrote: > > > On Tue, 6 Jul 2021 at 14:21, Adi Roiban wrote: >> >> >> On Tue, 6 Jul 2021 at 01:55, Glyph wrote: >>> >>> On July 5, 2021 at 3:55:38 PM, Adi

Re: [Twisted-Python] IRC still alive?

2021-07-05 Thread Tom Most
Hi Adi, IRC has moved to Libera.Chat due to the Freenode implosion . The channel names are the same --- #twisted, #twisted-dev, #twisted.web. ---Tom On Mon, Jul 5, 2021, at 3:45 PM, Adi Roiban wrote: > Hi, > > Only now I had time to

Re: [Twisted-Python] Strange recursion error with twisted.web

2021-06-15 Thread Tom Most
On Tue, Jun 15, 2021, at 2:46 AM, Peter Westlake wrote: > On Tue, 15 Jun 2021, at 01:58, Wim Lewis wrote: > > On Mon, Jun 14, 2021 at 05:25:42PM +0100, Peter Westlake wrote: > > > Do we have any idea when the fix for "RecursionError with synchronous > > > deferreds (#1549)" will appear in a

Re: [Twisted-Python] Twisted 21.2.0 Release Announcement

2021-03-01 Thread Tom Most
over the codebase during CI to help > detect problems, and help improve the use of types > - code in is now formatted with Black (thanks to Tom Most) > - many CI and automation improvements (thanks to Adi Roiban and Thomas > Grainger) > - many more fixes (225 tickets closed!) > >

Re: [Twisted-Python] Logging and SpawnProcess

2020-12-30 Thread Tom Most
I'm not entirely following the question (is the log output intermixed with other data on stdout?) but I think that you might find the implementation of twisted.internet.endpoints.ProcessEndpoint a useful example. It relays stderr to the logging stream:

Re: [Twisted-Python] Current twisted dns client just doesn't work

2020-12-05 Thread Tom Most
ery > > On Sat, Dec 5, 2020 at 5:07 AM Tom Most wrote: > > > > Why do an ANY query at all? As Glyph noted[1] the correct solution is to > > query A and concurrently. If you want a temporary hack wouldn't the > > most straightforward thing

Re: [Twisted-Python] Current twisted dns client just doesn't work

2020-12-04 Thread Tom Most
Why do an ANY query at all? As Glyph noted[1] the correct solution is to query A and concurrently. If you want a temporary hack wouldn't the most straightforward thing be to query just A instead of ANY + A? ---Tom [1]: https://twistedmatrix.com/trac/ticket/9691#comment:5 On Fri, Dec 4,

Re: [Twisted-Python] towncrier review policies and etiquette (and maybe releases too)

2020-10-21 Thread Tom Most
I think that it's fine to fall back to the twisted/twisted policies[1] for any project in the Twisted GitHub organization. The workflow won't apply directly --- no Trac, etc. --- but the core "someone must review all changes" and "test all the things" principles are relevant. That's how I treat

Re: [Twisted-Python] Broken Javascript on https://twistedmatrix.com ?

2020-09-17 Thread Tom Most
Access-Control-Allow-Origin is a header that would need to be set on PayPal/Flattr's side. They may have newer versions of these buttons that permit hotlinking, but the best solution is probably to host the images locally. That's what's best for performance of the page because you avoid extra

Re: [Twisted-Python] Black enabled in trunk

2020-09-16 Thread Tom Most
On Tue, Sep 15, 2020, at 7:26 AM, Kyle Altendorf wrote: > On 2020-09-14 13:43, Glyph wrote: > > >> On Sep 13, 2020, at 11:45 PM, Tom Most wrote: > >> To adjust the formatting: > >> > >> tox -e black-reformat > >> > >> The formatting i

[Twisted-Python] Black enabled in trunk

2020-09-14 Thread Tom Most
Hi all, Craig and I have been working to land a switch to The *Black* Coding Style . It's in! The tree has been reformatted . Some notable

Re: [Twisted-Python] Pycodestyle disabled in trunk, time to enable black?

2020-09-12 Thread Tom Most
On Mon, Aug 31, 2020, at 10:06 AM, Craig Rodrigues wrote: > In this PR: > https://github.com/twisted/twisted/pull/1365 > > pycodestyle was disabled in trunk in order to make it easier to merge changes > and not have pycodestyle error out, due to the code not meeting existing > Twisted style

Re: [Twisted-Python] DNS custom response (NXDOMAIN)

2020-08-05 Thread Tom Most
On Wed, Aug 5, 2020, at 3:59 PM, Rob Gormley wrote: > But I tried with dns.Record_NULL to generate an NXDOMAIN-like response > without success. How can I implement this? You need to fail with AuthoritativeDomainError. The pieces go together something like this: from twisted.names import dns,

Re: [Twisted-Python] new code: 3.5 or 3.6?

2020-06-26 Thread Tom Most
On Thu, Jun 25, 2020, at 1:50 AM, Ian Haywood wrote: > when writing new code for twisted today, can we use 3.6 features or is > 3.5 still required? (it's actually a library feature enum.IntFlag I'm > curious about, not type annotations) We'll drop Python 3.5 after the next release, so for now

Re: [Twisted-Python] Running tests with monkeytype

2020-06-20 Thread Tom Most
On Sat, Jun 20, 2020, at 3:10 PM, Maarten ter Huurne wrote: > Which also brings up the question: in the long term (*), do we want to > have both type annotations and types in the docstring? Or do we only > want to document types in docstrings if there is no exact annotations > possible in

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

2020-05-28 Thread Tom Most
On Fri, May 22, 2020, at 10:54 PM, Glyph wrote: > So, pidfd's cool, we should totally use it. Also we should use posix_spawn > and maybe some other stuff too. But I wonder if there's any heuristic we > could use to speed up our current strategy, like ordering the to-reap list by > putting

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

2020-05-19 Thread Tom Most
On Tue, May 19, 2020, at 5:41 AM, Jean-Paul Calderone wrote: > On Tue, May 19, 2020 at 8:33 AM Barry Scott > wrote: >> Why not waitpid for all children (pid=0 or pid=-1) in a single call? > > Because then you might reap a child process someone launched with a different > API - eg the Python

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

2020-05-18 Thread Tom Most
On Sun, May 17, 2020, at 12:22 PM, Glyph wrote: >> In the one case that may be complicated I think that pinning Twisted will be >> acceptable, since the service in question is a process supervisor without >> direct external exposure. > Well in that case I'll just do my best to add lots of

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

2020-05-17 Thread Tom Most
On Sun, May 17, 2020, at 11:31 AM, Glyph wrote: > >> On May 16, 2020, at 3:12 PM, Tom Most wrote: >> I'm (unfortunately) still shipping some Twisted apps on Ubuntu 16.04's >> Python 3.5. However, I am fine with dropping Python 3.5 support. I think >> it's cert

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

2020-05-16 Thread Tom Most
I'm (unfortunately) still shipping some Twisted apps on Ubuntu 16.04's Python 3.5. However, I am fine with dropping Python 3.5 support. I think it's certainly worth it for variable annotations and contextvars. ---Tom On Fri, May 15, 2020, at 10:56 PM, Glyph wrote: > > >> On May 15, 2020, at

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

2020-03-24 Thread Tom Most
I'll offer a dissenting opinion: I've worked on systems where the reactor is patched to use monotonic time. (This is essential on embedded systems that lack a real-time clock.) I'm not aware of this causing any issues, and it fixed real problems. HTTPFactory is quite unusual in assuming that

Re: [Twisted-Python] Inheriting DatagramProtocol, which is an old-style class

2020-02-07 Thread Tom Most
Old-style classes remain old-style for compatibility reasons. You have some options, though: 1. Set the TWISTED_NEWSTYLE environment variable [1] to make all such old-style classes new-style. 2. When subclassing it, also subclass object, making the result new-style. 3. Switch to Python 3, where

Re: [Twisted-Python] The Python 2.7 Plan

2019-12-30 Thread Tom Most
On Wed, Dec 11, 2019, at 1:06 PM, Wilfredo Sánchez Vega wrote: > [snip] > > Glyph also notes some infrastructure we use that is blocked on code fixes: > > - Trac: https://trac.edgewall.org/ticket/12130 > Looks like we can leave the Trac instance running in a Twisted 19 WCGI > server

Re: [Twisted-Python] Twisted tips for designing highly concurrent twisted REST API

2019-07-12 Thread Tom Most
On Thu, Jul 11, 2019, at 1:46 AM, Scott, Barry wrote: > On Tuesday, 9 July 2019 22:04:11 BST Tom Most wrote: > > ...snip... > > > The reactor's own thread pool is really for DNS resolution. > > Is that still true in the default case? We are use the twisted code that &

Re: [Twisted-Python] Twisted tips for designing highly concurrent twisted REST API

2019-07-09 Thread Tom Most
Hi, There are likely a few things wrong here. 1. You are using requests.get() to make a HTTP request. This is blocking. You might consider using Twisted's Agent API instead (or treq

Re: [Twisted-Python] Twisted Agent Python 2 ->3 Porting Pitfalls

2019-05-26 Thread Tom Most
I filed https://twistedmatrix.com/trac/ticket/9643 and submitted a PR: https://github.com/twisted/twisted/pull/1146 ---Tom On Thu, May 23, 2019, at 11:50 PM, Glyph wrote: > I definitely agree with this! > > -g > > > On May 23, 2019, at 9:08 PM, Tom Most wrote: > &

Re: [Twisted-Python] Twisted Agent Python 2 ->3 Porting Pitfalls

2019-05-23 Thread Tom Most
-- Tom Most t...@freecog.net On Mon, May 20, 2019, at 12:22 AM, Thomas Westfeld wrote: > Dear all, > > I just migrated some quite basic twisted code from Python 2.7 to Python > 3. Everything worked quite nicely, the main issue was the correct > handling of st

Re: [Twisted-Python] Drop support for Python 3.4?

2019-03-29 Thread Tom Most
I'm happy to drop 3.4 support and prune our build matrix a bit, as well as that in downstream projects. -- Tom Most t...@freecog.net On Tue, Mar 26, 2019, at 7:59 PM, Craig Rodrigues wrote: > What do people think of dropping Twisted support for Python 3.4? > > According

Re: [Twisted-Python] A Proposal for reducing the burden of developing on Twisted by dropping Python 2 support

2019-03-29 Thread Tom Most
This also works for me and at $EMPLOYER. We expect the same or similar to happen in many more parts of the Python ecosystem. -- Tom Most t...@freecog.net On Mon, Mar 25, 2019, at 3:15 AM, Amber Brown wrote: > Hi everyone, > > Since the Python 2 EOL date is rapidly approaching,

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

2019-03-05 Thread Tom Most
Another note: > twisted.web.client.Request and twisted.web.client.HTTPClient were both > vulnerable to header injection attacks. They now replace linear whitespace > ('r', 'n', and 'rn') with a single space. (#9421) Headers now assumes the value is a list of string (or bytes). It used to

Re: [Twisted-Python] twisted.web with dynamic + static content

2018-11-20 Thread Tom Most
On Mon, Nov 19, 2018, at 3:06 PM, Jeff Grimmett wrote: > Glyph, > > Belated (I was in the thick of a few unrelated crises) thanks - it > helps to understand a little bit of the background on the way it > works. I have made adjustments and everything works the way I was > hoping for now.> > I

Re: [Twisted-Python] automated tests for a server application

2018-11-08 Thread Tom Most
On Tue, Nov 6, 2018, at 8:43 AM, Kyle Altendorf wrote: > On 2018-11-06 11:28, Chris Withers wrote: > I guess I'm still not clear on what the point of using a 'fake' reactor > over a 'real' one is. Not that I'm an expert here... There are a bunch of advantages! Including: 1. Your tests become

Re: [Twisted-Python] Can transport.write() to hostname instead of IP address?

2018-08-16 Thread Tom Most
Hi Sean, To summarize, you are writing a client application using Twisted which needs to talk with a service behind an Nginx reverse proxy. The reverse proxy requires use of TLS (a.k.a. SSL) and SNI to identify the appropriate backend service. If you were using HTTP, Twisted's

Re: [Twisted-Python] "Cleared to Land"?

2018-07-10 Thread Tom Most
On Sun, Jul 8, 2018, at 11:45 PM, Glyph wrote: >> On Jul 8, 2018, at 6:21 PM, Tom Most wrote: >> >> On Sun, Jul 8, 2018, at 12:06 PM, Glyph wrote: >>>> On Jul 8, 2018, at 7:44 AM, Adi Roiban wrote: >>>> >>>> On Sat, 7 Jul 2018 at 22:45, Gly

Re: [Twisted-Python] "Cleared to Land"?

2018-07-08 Thread Tom Most
On Sun, Jul 8, 2018, at 6:21 PM, Tom Most wrote: > The GitHub UI currently requires this for non-admins, though it can be > bypassed with a manual merge, much like the requirement for a green > build. As a new committer I haven't felt comfortable doing that > bypass, so I spend a

Re: [Twisted-Python] "Cleared to Land"?

2018-07-08 Thread Tom Most
On Sun, Jul 8, 2018, at 12:06 PM, Glyph wrote: >> On Jul 8, 2018, at 7:44 AM, Adi Roiban wrote: >> >> On Sat, 7 Jul 2018 at 22:45, Glyph wrote: >>> On Jul 7, 2018, at 12:36 PM, Tom Most wrote: >> >> [snip] >> >>> Thanks

Re: [Twisted-Python] "Cleared to Land"?

2018-07-07 Thread Tom Most
On Sat, Jul 7, 2018, at 12:08 AM, Glyph wrote: > >> >> On Jul 6, 2018, at 4:11 PM, Wim Lewis wrote: >> >> I have a minor PR that was reviewed and labeled "cleared to land" a >> while back, but three months have passed since then and it's still >> unmerged. Is there something else I need to do

Re: [Twisted-Python] Removing support for old Python 3 versions

2017-02-27 Thread Tom Most
Yes, this is what my Raspbian system reports: Python 3.4.2 (default, Oct 19 2014, 13:31:11) [GCC 4.9.1] on linux ---Tom On Fri, Feb 24, 2017 at 6:01 PM, Glyph Lefkowitz <gl...@twistedmatrix.com> wrote: > > On Feb 24, 2017, at 3:29 PM, Tom Most <tomm...@gmail.com> wrote:

Re: [Twisted-Python] treq POST abborting with: err: ('Could not adapt', '{"....", "..."} )

2017-01-11 Thread Tom Most
Sure, I'd be happy to help (but won't get to it until the weekend). Username is twm. Thanks, Tom On 01/11/2017 04:44 PM, Glyph Lefkowitz wrote: > >> On Jan 10, 2017, at 6:43 PM, Tom Most <tomm...@gmail.com >> <mailto:tomm...@gmail.com>> wrote: >> >> On 01/

Re: [Twisted-Python] treq POST abborting with: err: ('Could not adapt', '{"....", "..."} )

2017-01-10 Thread Tom Most
On 01/08/2017 06:49 PM, Glyph Lefkowitz wrote: > >> On Jan 6, 2017, at 11:03 AM, steven meiers > > wrote: >> >> hi, >> >> >> sending a simple post request with a body (cookies) results in a error >> here. >> >> im using python 3.x with the

Re: [Twisted-Python] Exception's Implicit Public API, and Python 3

2015-09-07 Thread Tom Most
Would str(failure.value) work? It should be stable from 2.x to 3.x, barring Unicode differences: https://docs.python.org/2/library/exceptions.html#exceptions.BaseException https://docs.python.org/3.5/library/exceptions.html#BaseException (This convention is quite handy when you want to defer