[Twisted-Python] mailing list settings

2017-09-28 Thread Phil Mayers
What's the current way to change list setting e.g. subscribed address? The mailman links seem to be giving tracebacks e.g. exceptions.OSError: [Errno 24] Too many open files ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com https://twis

Re: [Twisted-Python] trial.unitest-specific segfault with lxml

2017-08-17 Thread Phil Mayers
On 18/08/2017 07:05, Tristan Seligmann wrote: Note that I don't think you're allowed to catch GeneratorExit like this; Interesting, I cribbed that from the lxml docs. Will look into it, thanks for the pointer. Given that the crash only occurs at exit, I suspect this has something to do wit

[Twisted-Python] trial.unitest-specific segfault with lxml

2017-08-17 Thread Phil Mayers
This is an odd one; I have a simple test using the incremental xmlfile() feature of lxml, that crashes *only* if the test case inherits from trial.unittest.TestCase; it works if inheriting from unittest.TestCase. SSCCE - well, hopefully correct - here: https://gist.github.com/philmayers/387597

Re: [Twisted-Python] WebSockets and QUIC for Twisted

2017-07-08 Thread Phil Mayers
On 08/07/17 03:59, Glyph wrote: Ironically the goals of QUIC are, I believe, similar to Vertex ;o) Really? How so? Sorry, memory not serving me well. I'm thinking of the PTCP bits, I'd managed to remember that, but forget about all the rest! So no, not similar - my mistake.

Re: [Twisted-Python] COMMERCIAL:Re: WebSockets and QUIC for Twisted

2017-07-07 Thread Phil Mayers
On 07/07/17 13:17, Barry Scott wrote: As someone else noted, maybe you're thinking of SPDY? I know abnout SPDY, it is indeed QUIC that I'm researching into. I was talking to Glyph ;o) Sorry for any confusion. ___ Twisted-Python mailing list Twiste

Re: [Twisted-Python] WebSockets and QUIC for Twisted

2017-07-07 Thread Phil Mayers
On 06/07/17 03:58, Glyph wrote: On Jul 5, 2017, at 2:32 AM, Barry Scott > wrote: I am interested in using Twisted with a couple of technologies: WebSockets and QUIC. I'm researching what is already available. Why are you interested in QUIC? My understandi

Re: [Twisted-Python] HTTP PUT a GET's streaming response with treq

2017-05-05 Thread Phil Mayers
On 05/05/17 12:40, Nagy, Attila wrote: Cool. If you're happy using private members, knock yourself out. I'm not happy with that of course. The really cool thing would be if Twisted could support this task without the need of complicated and error-prone code. I don't disagree, of course. Cory

Re: [Twisted-Python] HTTP PUT a GET's streaming response with treq

2017-05-05 Thread Phil Mayers
On 05/05/17 12:10, Cory Benfield wrote: As a second note, you may lock yourself out of HTTP/2. HTTP/2 is not guaranteed to give you access to a raw transport object (though it FWIW this kind of thing was, more or less, what I was thinking. It seems unlikely that stealing the TCP connection fr

Re: [Twisted-Python] HTTP PUT a GET's streaming response with treq

2017-05-05 Thread Phil Mayers
On 05/05/17 10:41, Nagy, Attila wrote: What possible side effects do you see here? What problems could it cause? So far I've tried to copy a lot of files in parallel, arbitrarily drop connections. Everything seems OK. The file is either transferred in its entirety or (in case of dropped connec

Re: [Twisted-Python] HTTP PUT a GET's streaming response with treq

2017-05-05 Thread Phil Mayers
On 04/05/17 16:30, Nagy, Attila wrote: I would like to use the simplest (and correct of course) solution. Juggling with buffering/data by hand seems even more risky to me. The problem with the approach you've outlined is that it treats the transport (a private member) in ways that I suspect a

Re: [Twisted-Python] HTTP PUT a GET's streaming response with treq

2017-05-04 Thread Phil Mayers
On 04/05/17 14:32, Nagy, Attila wrote: Are there any problems with this approach? You're poking at a private member of the .original IResponse there, and moreover the transport object which seems risky. The single treq.collect call to consumer.write will also not necessarily respect the co

Re: [Twisted-Python] HTTP PUT a GET's streaming response with treq

2017-05-04 Thread Phil Mayers
On 04/05/17 13:04, Nagy, Attila wrote: Hi, I would like to copy a file between two HTTP servers in the most efficient manner, which probably means a streaming down/upload (GET/PUT) with the producer/consumer scheme. Can this be done easily, could somebody write a simple example? I guess it

Re: [Twisted-Python] Twisted and Flask or Django

2017-04-19 Thread Phil Mayers
On 18/04/17 06:09, Hynek Schlawack wrote: Oh and I’d like to propose to officially merge the twisted-web mailing list into this one. I don’t think it makes any sense to Seconded. ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http

Re: [Twisted-Python] Python3 twistd daemon for Ubuntu 14.04 alternatives

2017-02-23 Thread Phil Mayers
On 23/02/17 09:11, Glyph Lefkowitz wrote: Yes, and building these binary artifacts is often harder than some people (cough, alpine, cough) seem to think. But there are better ways to square this circle than restricting yourself to the versions of /python/ libraries that happen to be available i

Re: [Twisted-Python] Python3 twistd daemon for Ubuntu 14.04 alternatives

2017-02-23 Thread Phil Mayers
On 23/02/17 10:27, Hynek Schlawack wrote: What I don't quite understand is how people can be in love with Go’s static linking but complaining about Virtualenvs in deployments. Unwieldy as virtualenvs are: *for Python code* they are exactly that: statically linked build artifacts. The principles

Re: [Twisted-Python] Python3 twistd daemon for Ubuntu 14.04 alternatives

2017-02-22 Thread Phil Mayers
On 22/02/17 20:59, Cory Benfield wrote: The permitted C dependencies *for dynamic linking* are tiny, sure. But those libraries may statically link as they please. The likely scenario for most such packages is that they statically link whatever they need. This is the approach taken by some that I

Re: [Twisted-Python] Python3 twistd daemon for Ubuntu 14.04 alternatives

2017-02-22 Thread Phil Mayers
On 22/02/17 17:42, Hynek Schlawack wrote: I have to disagree here: I don’t want build tools of any kind in my final containers therefore I build my artifacts separately no matter what language. Of course you can just build the venv on your build Agreed, 100%. Apologies if I gave you the impr

Re: [Twisted-Python] Python3 twistd daemon for Ubuntu 14.04 alternatives

2017-02-22 Thread Phil Mayers
On 22/02/17 17:35, Steve Waterbury wrote: On 02/22/2017 12:23 PM, Phil Mayers wrote: On 22/02/17 15:00, Steve Waterbury wrote: Have you considered the 'conda' package manager? I've never come across it. It looks too big for me to give a quick opinion on, but I'll bear it

Re: [Twisted-Python] Python3 twistd daemon for Ubuntu 14.04 alternatives

2017-02-22 Thread Phil Mayers
On 22/02/17 15:00, Steve Waterbury wrote: Have you considered the 'conda' package manager? I've never come across it. It looks too big for me to give a quick opinion on, but I'll bear it in mind. Thanks for the pointer. ___ Twisted-Python mailing

Re: [Twisted-Python] Python3 twistd daemon for Ubuntu 14.04 alternatives

2017-02-22 Thread Phil Mayers
On 22/02/17 13:06, Jean-Paul Calderone wrote: Ah! They are now, maybe you haven't seen them? Check out https://github.com/pypa/manylinux and https://github.com/pypa/python-manylinux-demo I had not seen this. Thanks, this looks like a big leap forward. A lot of people seem to be thinking th

Re: [Twisted-Python] Python3 twistd daemon for Ubuntu 14.04 alternatives

2017-02-22 Thread Phil Mayers
On 22/02/17 12:49, Hynek Schlawack wrote: That’s why you should use a build server and not ship build environments. Which we do. I don’t see how that’s tedious since a compute does that for me. Although I don’t see any value at wheeling them (and some packages cannot be wheeled); my CI build

Re: [Twisted-Python] Python3 twistd daemon for Ubuntu 14.04 alternatives

2017-02-22 Thread Phil Mayers
On 22/02/17 11:12, Glyph Lefkowitz wrote: I'm tempted to launch into a diatribe about namespacing, containers, and application isolation generally, but before I do - why is it that you /want/ to use the system Python environment? Had you just not considered the option of virtual environments?

Re: [Twisted-Python] Twisted 17.1 Release Announcement

2017-02-12 Thread Phil Mayers
On 12/02/2017 01:44, Glyph Lefkowitz wrote: Yeah, this is a lack of test coverage for the 'default' case. Technically it /is/ a regression, but it's probably pretty unusual to use the default; point being, I don't think we need an emergency release here. Agreed. It's completely tolerable. N

Re: [Twisted-Python] Twisted 17.1 Release Announcement

2017-02-11 Thread Phil Mayers
On 11/02/17 18:12, Phil Mayers wrote: On 11/02/2017 17:28, Tristan Seligmann wrote: String endpoint descriptions, as used by twist/twistd among other things, for listening on tcp ports now require the "tcp:": that is, "80" is no longer accepted, you need to use "

Re: [Twisted-Python] Twisted 17.1 Release Announcement

2017-02-11 Thread Phil Mayers
On 11/02/2017 17:28, Tristan Seligmann wrote: String endpoint descriptions, as used by twist/twistd among other things, for listening on tcp ports now require the "tcp:": that is, "80" is no longer accepted, you need to use "tcp:80". In which case there's a regression in the "portforward" twis

Re: [Twisted-Python] Problems with inlineCallback, Deferred, yield and Python 3 in buildbot

2017-01-25 Thread Phil Mayers
On 24/01/2017 21:14, Glyph Lefkowitz wrote: I've encountered this before and quickly worked around it, but I think this might actually be a bug in python 3, or at least its documentation. The language docs officially say that a "list display" (which is what I believe we're looking at here) "yie

Re: [Twisted-Python] How do you determine the buffer size of a transport - a use-case for not using back pressure

2016-08-22 Thread Phil Mayers
On 17/08/16 23:43, Steve Morin wrote: Twisted Community 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? You haven't received many responses, so I'll add a short note here: The ideal way to do this IMO

[Twisted-Python] Style/testing for log-related changes

2016-06-06 Thread Phil Mayers
All, I'd like to submit a patch to convert t.conch.ssh to the new logging. The main reason is that the conch code logs a *lot* of really, really, really boring crap that I want to throw away because it just clutters up the logs e.g. https://github.com/twisted/twisted/blob/twisted-16.2.0/twis

Re: [Twisted-Python] twisted listening on UDP port, why?

2016-04-23 Thread Phil Mayers
On 23/04/16 03:36, Jonathan Vanasco wrote: Thanks for all this. A few quick notes: On Apr 20, 2016, at 9:15 PM, Glyph wrote: This isn't so much a feature of Python as it is a feature of the BSD sockets API. Sending traffic through a socket, whether it's TCP or UDP, has to bind a client port.

Re: [Twisted-Python] twisted listening on UDP port, why?

2016-04-20 Thread Phil Mayers
On 20/04/16 01:01, Glyph wrote: Perhaps this is libc's DNS client? Twisted doesn't do anything like this. It does something similar with win32reactor IIRC? http://twistedmatrix.com/trac/browser/tags/releases/twisted-16.1.1/twisted/internet/posixbase.py#L60 ...but that binds to 127.0.0.1 not

Re: [Twisted-Python] [Twisted-web] upcoming changes to twistedmatrix.com mail infrastructure

2016-03-19 Thread Phil Mayers
On 16/03/16 18:52, Glyph wrote: Over the last few months, twistedmatrix.com 's mailman installation has been used increasingly frequently to execute denial-of-service attacks against people's mailboxes. This is My sympathies; this exact problem was the reason we CAPTC

Re: [Twisted-Python] Twisted + OpenSSL 1.0.2f issues resolved

2016-02-23 Thread Phil Mayers
On 22/02/16 21:18, Glyph Lefkowitz wrote: On Feb 22, 2016, at 09:26, Phil Mayers wrote: On 20/02/16 09:33, Glyph Lefkowitz wrote: I assume that they subscribed by accident (spammers seem to periodically attempt to mass-subscribe people using our listserv, I have no idea why, and some of

Re: [Twisted-Python] Twisted + OpenSSL 1.0.2f issues resolved

2016-02-22 Thread Phil Mayers
On 20/02/16 09:33, Glyph Lefkowitz wrote: I assume that they subscribed by accident (spammers seem to periodically attempt to mass-subscribe people using our listserv, I have no idea why, and some of them click the "yes subscribe me" link for some reason). FWIW, our local mailman install is pa

Re: [Twisted-Python] Python 2.7 on CentOS 6

2015-12-16 Thread Phil Mayers
On 15/12/2015 16:40, Ray Cote wrote: We have a fair bit of Python 2.7 Twisted code deployed on RHEL and CentOS 5 and 6. In each case, we build from source and do a make altinstall so we’re running a Python separate from the system’s. We build an RPM, but basically yes; put it in a different pat

Re: [Twisted-Python] Python 2.7 on CentOS 6

2015-12-15 Thread Phil Mayers
On 15/12/15 04:16, Amber "Hawkie" Brown wrote: There is a solution to this, and Nick Coghlan has mentioned it to me many times -- Software Collections for RHEL and CentOS. Software Collections is RH's answer to "new software" on "stable distributions" -- SCLs operate side-by-side with system pa

Re: [Twisted-Python] Writing a low-level network debugging tool

2015-11-27 Thread Phil Mayers
On 27/11/15 14:39, Phil Mayers wrote: But the info above may be a helpful start. You may also want to look at TCP_CC_INFO. See the kernel source: https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/net/ipv4/tcp.c?id=refs/tags/v4.4-rc2 ...for an idea of what else is

Re: [Twisted-Python] Writing a low-level network debugging tool

2015-11-27 Thread Phil Mayers
On 27/11/15 14:05, Jonathan Ballet wrote: * how long does it take to resolv the domain name to (at least) one of its IP address - against a specified name server or using the system configured servers That is relatively straightforward. - how many tries did it require * if there w

[Twisted-Python] doc breakage

2015-11-27 Thread Phil Mayers
Does this look right? https://twistedmatrix.com/documents/current/api/twisted.internet.interfaces.IReadWriteDescriptor.html Looks like docs for logPrefix has stomped on docs for all the other interface methods? ___ Twisted-Python mailing list Twiste

Re: [Twisted-Python] Asynchronously initializing objects in twisted.web?

2015-09-08 Thread Phil Mayers
On 08/09/15 15:51, Nagy, Attila wrote: The goal here is that the HTTP server shouldn't start until it can fetch the desired data. Of course I can do this in a synchronous way, but it feels so unnatural and bad practice to fetch the same stuff Load the resources in a callback using "reactor.cal

[Twisted-Python] List admin attention

2015-08-11 Thread Phil Mayers
Someone please un-sub this person? Forwarded Message Subject:Re: [Twisted-Python] ANN: Eliot 0.8, the logging system with causality Date: Mon, 10 Aug 2015 12:59:48 -0600 From: Judy Craig Reply-To: Twisted general discussion To: twisted-python@twistedmatr

Re: [Twisted-Python] Deprecating subproject packaging

2015-04-22 Thread Phil Mayers
On 22/04/15 09:04, HawkOwl wrote: Hi, I think that Twisted should deprecate subproject packaging -- they Agreed. It's largely pointless. ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listin

Re: [Twisted-Python] Add support for Next Protocol Negotiation and Application Layer Protocol Negotiation

2015-04-21 Thread Phil Mayers
On 21/04/15 16:25, Adi Roiban wrote: Hi, I just want to let you know about this patch which is in work : https://twistedmatrix.com/trac/ticket/7860 Nice. I did an initial review but it would help to get more feedback for this new API. I would very, very much like to see something along th

Re: [Twisted-Python] Adding support for Diameter protocol

2015-04-14 Thread Phil Mayers
On 14/04/15 06:42, Glyph wrote: On Apr 14, 2015, at 00:22, Hamza Sheikh mailto:fehr...@codeghar.com>> wrote: I am new to Twisted and its community Welcome, we are happy to have you! and exploring adding Diameter support. What is Diameter? It's a bit like RADIUS-over-TCP but with knob

Re: [Twisted-Python] Removing Python 2.6 Support after Twisted 15.1

2015-03-24 Thread Phil Mayers
On 20/03/15 00:23, David Ripton wrote: On 03/19/2015 08:05 AM, Phil Mayers wrote: On 18/03/15 23:57, Glyph Lefkowitz wrote: Rather than just suggest we preserve the status quo and stay on 2.6 forever to do indefinite free work to support Red Hat's obsolescence You *definitely* shouldn

Re: [Twisted-Python] Removing Python 2.6 Support after Twisted 15.1

2015-03-19 Thread Phil Mayers
On 18/03/15 23:57, Glyph Lefkowitz wrote: Rather than just suggest we preserve the status quo and stay on 2.6 forever to do indefinite free work to support Red Hat's obsolescence You *definitely* shouldn't do that. Push back on RedHat, and tell customers to push back on RedHat. I say this to

Re: [Twisted-Python] Removing Python 2.6 Support after Twisted 15.1

2015-03-19 Thread Phil Mayers
On 19/03/15 00:42, Donald Stufft wrote: If you want newer than that you could possibly convince PyPy to build RPMs with COPR. I’m doing that for python-pip and co and it’s not very hard once you have the RPM spec file originally written, which could probably just be taken from Fedora. IME that

Re: [Twisted-Python] Removing Python 2.6 Support after Twisted 15.1

2015-03-18 Thread Phil Mayers
On 18/03/15 12:29, Donald Stufft wrote: Isn’t the RHEL answer here to just use SCLs to install Python 2.7? I've never actually come across the SCL stuff before. Thanks for the pointer. My latter point still stands - don't do it because others do it, do it because it's good for Twisted (or

Re: [Twisted-Python] Removing Python 2.6 Support after Twisted 15.1

2015-03-18 Thread Phil Mayers
On 18/03/15 10:45, HawkOwl wrote: Hi, As Python 2.6 has been officially abandoned for a year+ (and will receive no further official security updates) and Python 2.7 has been available for almost five years, it might be time to put Python 2.6 support to bed. The only currently supported distro th

Re: [Twisted-Python] spawnProcess - reapProcess not retrying on failures

2014-09-05 Thread Phil Mayers
On 05/09/14 13:13, exar...@twistedmatrix.com wrote: I don't. :) ProcessProtocol means you can't re-use any of your existing IProtocol implementations. Oops. On the other hand, it's possible to build this on top of ProcessProtocol and no one ever has... I do this about 3 times a year. Ye

[Twisted-Python] Process pools and logging

2014-07-29 Thread Phil Mayers
Before I re-invent the wheel, is there a twisted library that will let me: 1. Fire up child worker processes 2. That log to a logObserver coming out in the parent 3. Manage the whole lot as a .tac file Note I *don't* need deferToProcess or similar in this situation. I just need to fire up N

Re: [Twisted-Python] some competition and hopefully inspiration for conch

2014-07-17 Thread Phil Mayers
On 16/07/14 22:40, Glyph Lefkowitz wrote: There's a new Python-based asynchronous SSH client and server in town: This looks to have a much more straightforward API and /way/ better The client endpoint API is great. It is what Conch should always have be

Re: [Twisted-Python] FTP box disconnecting after 60 seconds

2014-07-08 Thread Phil Mayers
On 08/07/14 15:45, Paul Wiseman wrote: Hey, This is a bit of a stab in the dark, but I'm really not sure what to try next. Basically I've got a custom twisted FTP server, recently (not sure when it started) I've noticed that connections to it seem to disconnect after 60 seconds if they haven't

Re: [Twisted-Python] adbapi.ConnectionPool - reconnecting to postgresql

2014-06-10 Thread Phil Mayers
On 10/06/2014 19:24, Jonathan Vanasco wrote: I had to restart postgresql , and that triggered some endless errors in my logs. i don't have anything that can handle a suddenly dropped / resumed connection. does anyone have a recommendation for trying to reconnect or handle this in general fro

Re: [Twisted-Python] Fwd: Trouble with session id reuse/disabling with twisted TLS

2014-04-30 Thread Phil Mayers
On 30/04/14 17:43, Henrik Thostrup Jensen wrote: Hi I have a twisted service, which uses TLS and I seeing some odd behaviour. New connections are accepted fine, but if a client tries to re-use a TLS session id with a new connection, the services rejects the connection. This example: https://

Re: [Twisted-Python] Twisted 14.0.0-pre2 Announcement

2014-04-09 Thread Phil Mayers
On 09/04/14 18:47, Glyph wrote: On Apr 9, 2014, at 9:42 AM, exar...@twistedmatrix.com wrote: This is a warning that just about every Twisted user is going to see and it's confusing (_sslverify.py? what?) and poorly formatted. I can definitely fix the format

Re: [Twisted-Python] t.w.client.Agent exceptions

2014-03-05 Thread Phil Mayers
On 05/03/2014 22:08, Glyph Lefkowitz wrote: You're right; this is a bug in Agent. And it must be said, really quite an infuriating one ;o) For right now, yes, you're going to have to import some crappy private APIs. Any chance I could convince y

[Twisted-Python] t.w.client.Agent exceptions

2014-03-05 Thread Phil Mayers
All, I'm having a head-poundingly annoying time getting detailed exception info out of the new Agent stuff. Specifically, I have some bug inside my code somewhere, but I can't get decent tracebacks out because _WrapperException is the base class for RequestGenerationFailed, but there's no pu

Re: [Twisted-Python] Configuration options for twisted code

2014-03-03 Thread Phil Mayers
On 04/03/2014 00:52, Itamar Turner-Trauring wrote: On 03/03/2014 01:09 PM, Adi Roiban wrote: What do you think? Should I go ahead and add options as __init__ arguments or think of a configuration system? A configuration system would take a while to design and meanwhile these unrelated featur

Re: [Twisted-Python] Exit all threads upon KeyboardInterrupt

2014-01-14 Thread Phil Mayers
On 14/01/14 15:10, Dustin J. Mitchell wrote: On Tue, Jan 14, 2014 at 10:05 AM, Phil Mayers wrote: I'm wondering if TCP keepalive isn't any use to you in this regard? It is, but only in cases where we can tweak kernel parameters appropriately so that the timeout is not >2h.

Re: [Twisted-Python] Exit all threads upon KeyboardInterrupt

2014-01-14 Thread Phil Mayers
On 14/01/14 14:27, Dustin J. Mitchell wrote: There are two things wrong with your scenario. First, in any production or production-ready environment, your software needs to correctly handle stuck TCP connections. With the proliferation of "smart" network equipment (session-tracking firewalls, e

Re: [Twisted-Python] Twisted names client.getHostbyName dual-stack operation

2014-01-09 Thread Phil Mayers
On 08/01/14 23:05, Glyph Lefkowitz wrote: However, if you’re building a big service to run in the cloud, or on a VPN, on specially-tuned machines that you configured, using twisted.names can be more scalable and allow you to react more reasonably to high load situations. Or, at least, it will g

Re: [Twisted-Python] Twisted names client.getHostbyName dual-stack operation

2014-01-06 Thread Phil Mayers
On 06/01/14 08:26, Maciej Wasilak wrote: Hello, I've tried to use Twisted names.client.getHostByName() method to resolve some addresses for my UDP based app. By default getHostByName() always returns IPv6 address. I don't always have end-to-end IPv6 connectivity, I'm not sure if t.n.client imp

Re: [Twisted-Python] Reliable way to check if Twisted has IPv6 support?

2013-12-13 Thread Phil Mayers
On 13/12/13 03:22, Amit Saha wrote: Is there a more reliable way (which works with the Twisted-8.0+) to check this? Check the Twisted version. You should also note that IPv6 features have appeared in multiple versions; HostnameEndpoint was added in 13.2.0 for example, whereas basic "connect

Re: [Twisted-Python] Queries about connecting to a XML-RPC server over IPv6

2013-12-12 Thread Phil Mayers
On 12/12/13 12:23, Amit Saha wrote: - Original Message - From: "Amit Saha" To: "Twisted general discussion" Sent: Tuesday, December 10, 2013 11:59:27 AM Subject: Re: [Twisted-Python] Queries about connecting to a XML-RPC server over IPv6 - Original Messag

Re: [Twisted-Python] ISSLTransport.getPeerCertificate returning None?

2013-12-10 Thread Phil Mayers
On 10/12/13 13:21, exar...@twistedmatrix.com wrote: On 08:41 am, p.may...@imperial.ac.uk wrote: On 09/12/13 22:19, Laurens Van Houtven wrote: ... but in the server's AMP protocol, self.transport.getPeerCertificate() is still None :/ Unless you set the appropriate verify options on the server

Re: [Twisted-Python] ISSLTransport.getPeerCertificate returning None?

2013-12-10 Thread Phil Mayers
On 09/12/13 22:19, Laurens Van Houtven wrote: ... but in the server's AMP protocol, self.transport.getPeerCertificate() is still None :/ Unless you set the appropriate verify options on the server side too, the client cert isn't available for inspection.

Re: [Twisted-Python] Queries about connecting to a XML-RPC server over IPv6

2013-12-09 Thread Phil Mayers
On 09/12/13 14:54, Phil Mayers wrote: On 09/12/13 13:28, Glyph wrote: On Dec 9, 2013, at 1:33 AM, Phil Mayers mailto:p.may...@imperial.ac.uk>> wrote: The IPv6 support in Twisted is very new - check your version even *has* it - and it's still a work in progress. You might find tha

Re: [Twisted-Python] Queries about connecting to a XML-RPC server over IPv6

2013-12-09 Thread Phil Mayers
On 09/12/13 13:28, Glyph wrote: On Dec 9, 2013, at 1:33 AM, Phil Mayers mailto:p.may...@imperial.ac.uk>> wrote: The IPv6 support in Twisted is very new - check your version even *has* it - and it's still a work in progress. You might find that you can't do this. I'd have t

Re: [Twisted-Python] Queries about connecting to a XML-RPC server over IPv6

2013-12-09 Thread Phil Mayers
On 09/12/13 05:28, Amit Saha wrote: proxy = Proxy('http://localhost6:8000') proxy.callRemote('my_proxy_method').addCallbacks(printValue, printError) When I run it, i get "No route to host: 101, Network is unreachable". However, 'curl -6 localhost:8000' succeeds. What could be going on here?

Re: [Twisted-Python] carbon-relay eating CPU - EAGAIN (Resource temporarily unavailable)?

2013-11-26 Thread Phil Mayers
On 26/11/13 04:05, Quan Tong Anh wrote: - Python 2.7.3 - [twisted, version 13.1.0] - xen-domU I assume xen-domU means "Linux" as the guest OS; which kernel version, out of interest. `atop` shows that `carbon-relay` is eating 80, 90% USRCPU. From the I don't know about anyone else,

Re: [Twisted-Python] txThings - simple library for CoAP protocol

2013-11-23 Thread Phil Mayers
On 23/11/13 12:03, Maciej Wasilak wrote: 3. There is a problem with txThings IPv6 server, because in most operating systems source address of datagram is determined in round robin fashion. It may cause the source address of the response to be different than destination address of the request.

Re: [Twisted-Python] twisted irc client + packet capturing

2013-11-08 Thread Phil Mayers
Another option is to run tcpdump as a sub-process writing to stdout, and write a ProcessProtocol to parse the pcap stream. This is not terribly difficult, and can actually have some advantages - if your python process blocks for too long you can lose captured packets, but by letting tcpdump agg

Re: [Twisted-Python] epoll keep sharing state between process even after fork.

2013-10-23 Thread Phil Mayers
On 23/10/13 17:39, Phil Mayers wrote: 2. Arrange for the epoll object (or FD) to be closed after fork, but before exec, so that the child process can't fiddle with it See also: http://bugs.python.org/issue8713 ...which suggests Python 3.4 added fork+exec support to multiprocessing

Re: [Twisted-Python] epoll keep sharing state between process even after fork.

2013-10-23 Thread Phil Mayers
On 23/10/13 16:46, Flint wrote: Hi everybody I a came across a surprising problem when using the epoll based reactor. (ticket here https://twistedmatrix.com/trac/ticket/6796) As you can see on the ticket, the epoll object seems to share some state even after fork. Which means even after having

Re: [Twisted-Python] Twisted as a full solution for web hosting [WSGI + other]

2013-10-21 Thread Phil Mayers
Does the Twisted wsgi runner have support for process rather than threading models to avoid the gil? Because if so I should take a look at it... -- Sent from my phone with, please excuse brevity and typos___ Twisted-Python mailing list Twisted-Python@tw

Re: [Twisted-Python] AutobahnPython 0.6.3 - WebSocket compression and more

2013-10-07 Thread Phil Mayers
On 07/10/2013 18:58, Glyph wrote: If you have a disagreement, please say /what the disagreement is/ (not just "disagree") and then link to resources instead of abstractly claiming people may find them themselves somehow. You don't have to get into a big back-and-forth, but I believe DNSSEC impl

Re: [Twisted-Python] AutobahnPython 0.6.3 - WebSocket compression and more

2013-10-07 Thread Phil Mayers
On 07/10/13 12:35, Tobias Oberstein wrote: DNSSEC seems to follow a centralized/hierachical trust model. Won't help. The NSA will (does?) own those. The default trust model is to have parent sign the child. Other models are not only possible, they're deployed. Google "DLV" and "trust anchor".

Re: [Twisted-Python] AutobahnPython 0.6.3 - WebSocket compression and more

2013-10-07 Thread Phil Mayers
On 07/10/13 11:56, Donald Stufft wrote: DNSSEC solves none of the problems with the CA system. It just moves the problem around. Disagree. However - there are other, better forums to have this argument in (and to be frank, I've no interest in having it at all) so I won't respond further. I

Re: [Twisted-Python] AutobahnPython 0.6.3 - WebSocket compression and more

2013-10-07 Thread Phil Mayers
On 10/07/2013 09:50 AM, Phil Mayers wrote: Right now, none are useful in a browser, but personally I have high hopes for raw keys, trust-anchored by DNSSEC via RFC 6698. In this model, X.509 is essentially just a payload format for certs Sorry, "payload format for

Re: [Twisted-Python] AutobahnPython 0.6.3 - WebSocket compression and more

2013-10-07 Thread Phil Mayers
On 10/07/2013 08:51 AM, Tobias Oberstein wrote: I did some further looking around: turns out there is TLS-PGP http://tools.ietf.org/html/rfc6091 Does someone know whether OpenSSL supports that? There are *lots* of TLS extensions that eliminate or obviate the need for the (horrible) PKIX tr

Re: [Twisted-Python] Conch - Why does one piece of code "fail" while another works

2013-10-02 Thread Phil Mayers
On 02/10/13 15:00, exar...@twistedmatrix.com wrote: BTW, I'm not sure what you plan to do with this connection, but if you haven't seen `twisted.conch.endpoints` (and ) then you probably want to look. ZOMG I had not seen the (existing) Conch endpoints before. Amazing, and

Re: [Twisted-Python] twisted linux netfilter_log protocol

2013-10-02 Thread Phil Mayers
On 02/10/13 09:25, David Stainton wrote: In examples of Twisted UDP clients they all do this: reactor.listenUDP(3000,MyProtocol()) What would I do instead? reactor.addReader makes sense to me since what I have is a file descriptor, and the reactor loop and use select or epoll find out when the

Re: [Twisted-Python] twisted linux netfilter_log protocol

2013-10-02 Thread Phil Mayers
On 10/02/2013 07:14 AM, David Stainton wrote: Hi, I am wondering how I should combine various twisted interfaces in a way that makes sense. It probably shows here... that I'm new to twisted. The Linux iptables can log packets to the netfilter_log which can give access to user space. I wrote a s

Re: [Twisted-Python] raw socket IWriteDescriptor

2013-10-01 Thread Phil Mayers
On 01/10/13 09:05, David Stainton wrote: I just now realized that my fileno() method was incorrect. It now returns the descriptor instead of the python socket: return self.socket.fileno() I add the socket to the reactor in the constructor like this: reactor.addWriter(self) Oops sorry didn't s

Re: [Twisted-Python] raw socket IWriteDescriptor

2013-10-01 Thread Phil Mayers
On 10/01/2013 08:30 AM, David Stainton wrote: Hi, I'm trying to implement an IWriteDescriptor using raw sockets. So far this is what I wrote... but it doesn't work: https://github.com/david415/hushTCP/blob/master/hush_writer.py Am I doing something obviously wrong here? I don't see you tryin

Re: [Twisted-Python] Clean pb solution for two-way object sync?

2013-09-27 Thread Phil Mayers
On 09/27/2013 05:48 AM, Daniel Sank wrote: Upon re-reading the Cacheable docs I still don't understand how to use it. Have you seen this: http://twistedmatrix.com/documents/current/core/howto/pb-copyable.html#auto9 Essentially, you move all attribute access to accessor methods and do callRem

Re: [Twisted-Python] question about subprocess

2013-09-27 Thread Phil Mayers
On 09/27/2013 02:51 AM, Jonathan Vanasco wrote: i was looking at reactor.SpawnProcess -- which I know is more correct. it just seems to be a bit annoying to use Are you aware of twisted.internet.utils.getProcessOutputAndValue? For simple spawn/check cases, that's pretty much always the best

Re: [Twisted-Python] Cancelling a pb callRemote

2013-09-19 Thread Phil Mayers
On 18/09/13 17:34, exar...@twistedmatrix.com wrote: On 04:08 pm, p.may...@imperial.ac.uk wrote: On 18/09/13 17:00, bu...@nehbit.net wrote: +1 for AMP. Wow, lots of people using AMP. Maybe I'm missing out on something... Don't people miss the symmetry of PB? Not to mention you can be lazy and

Re: [Twisted-Python] Cancelling a pb callRemote

2013-09-18 Thread Phil Mayers
On 18/09/13 17:00, bu...@nehbit.net wrote: +1 for AMP. Wow, lots of people using AMP. Maybe I'm missing out on something... Don't people miss the symmetry of PB? Not to mention you can be lazy and avoid defining a schema! Or are people using Twisted->Other AMP connections? _

Re: [Twisted-Python] Twisted at PyConUK 2013

2013-09-18 Thread Phil Mayers
On 17/09/13 19:08, Glyph wrote: On Sep 17, 2013, at 10:43 AM, Phil Mayers mailto:p.may...@imperial.ac.uk>> wrote: On 17/09/13 17:05, exar...@twistedmatrix.com <mailto:exar...@twistedmatrix.com> wrote: p.s. the "How to review" docs on Trac are AWFUL if you've never

Re: [Twisted-Python] Cancelling a pb callRemote

2013-09-18 Thread Phil Mayers
On 18/09/13 14:00, Phil Mayers wrote: I'll have a look, but from the responses I'll assume neither pb nor AMP can do this, and will file a couple of tickets for reference. #6753 and #6754, for the curious. As the latter indicates, I don't really understand the AMP stuff; I

Re: [Twisted-Python] Cancelling a pb callRemote

2013-09-18 Thread Phil Mayers
On 18/09/13 13:34, exar...@twistedmatrix.com wrote: On 12:03 pm, p.may...@imperial.ac.uk wrote: Is there any support, or any interest in / way to add support for deferred cancellation in pb? Specifically I'd like do have something like: class blah(pb...): def remote_somelongtask(self, args):

[Twisted-Python] Cancelling a pb callRemote

2013-09-18 Thread Phil Mayers
Is there any support, or any interest in / way to add support for deferred cancellation in pb? Specifically I'd like do have something like: class blah(pb...): def remote_somelongtask(self, args): ... taskid = somefunc() d = defer.Deferred(lambda : canceltask(taskid)) return d

Re: [Twisted-Python] Twisted Names EDNS(0) support [Was Twisted at PyConUK 2013]

2013-09-17 Thread Phil Mayers
On 17/09/13 17:18, Richard Wall wrote: On 17 September 2013 16:34, Phil Mayers wrote: On 17/09/13 15:29, Richard Wall wrote: PS. I'd love to merge https://tm.tl/5675 before the conference, so if you're familiar with the DNS RFCs, I'd really appreciate a code review. I'm r

Re: [Twisted-Python] Twisted at PyConUK 2013

2013-09-17 Thread Phil Mayers
On 17/09/13 17:05, exar...@twistedmatrix.com wrote: p.s. the "How to review" docs on Trac are AWFUL if you've never done one before. It assumes a *hell* of a lot of prior knowledge. There needs to be a single page checklist for first-time reviewers. This is in progress. Awesome; would it be

Re: [Twisted-Python] Twisted at PyConUK 2013

2013-09-17 Thread Phil Mayers
On 17/09/13 15:29, Richard Wall wrote: PS. I'd love to merge https://tm.tl/5675 before the conference, so if you're familiar with the DNS RFCs, I'd really appreciate a code review. I'm rwall on #twisted-dev and #twisted if you want to discuss it Deep breath... I'll give this a go. p.s. the "H

Re: [Twisted-Python] Passing additional arguments to errback

2013-09-06 Thread Phil Mayers
Maciej Wasilak wrote: >Hello, > >just one more question: > >Well, yes, you should, but still keep in mind that you can actually >just >> pass the request like so: >> >> .addErrback(handleErrors, request) >> >> You don't really have to save the request itself anywhere as an >attribute. >> > >if I u

Re: [Twisted-Python] Twisted serialport dataReceived() provides fragmented data

2013-08-29 Thread Phil Mayers
On 29/08/13 17:15, Sivakumar Balasubramanian wrote: Dear Phil, I replaced thye dataReceived function by stringReceived, and ran the code. But when I do this, the program does not even enter the stringReceived function. That implies your protocol isn't an int16string-prefixed one. I assumed it

Re: [Twisted-Python] Twisted serialport dataReceived() provides fragmented data

2013-08-29 Thread Phil Mayers
On 29/08/13 16:38, Sivakumar Balasubramanian wrote: Is there something that I doing wrong in my code? Yes. You are sub-classing Int16StringReceiver, but then breaking things by overriding dataReceived. You should be implementing stringReceived, and you'll get complete strings. dataReceived

Re: [Twisted-Python] Advice on porting Python application to Twisted

2013-08-28 Thread Phil Mayers
On 28/08/13 14:40, Tom Sheffler wrote: Hi Matthew - I have a couple of idioms I use for #2 and #3 in your message. Here they are. #2) For timer events, I create a function that when called, continuously schedules itself again in the reactor, does some work for the curren Are you aware of t

  1   2   3   >