Re: [Python-Dev] About SSL tests

2007-04-04 Thread Facundo Batista
Martin v. Löwis wrote: > I don't like it. I would rather rely on the private _handle member. > If that ever gets changed, the test fails. I made it using _handle. Right now, we have test_socket_ssl.py using a local openssl and passing all the tests in all the buildbots, :D Thanks for your (you

Re: [Python-Dev] About SSL tests

2007-04-03 Thread Martin v. Löwis
> Another difference I believe is that TerminateProcess on Windows > doesn't kill the tree of processes like kill would. I believe you are wrong here: kill on Unix would *not* kill the tree of processes. Killing the parent process just does that: kill the parent process. Killing process groups i

Re: [Python-Dev] About SSL tests

2007-04-03 Thread Martin v. Löwis
> I don't like the idea of rely on the private _handle and do: > > process = subprocess.Popen(...) > ... > subprocess.TerminateProcess(int(process._handle), -1) > > so, I'll end doing this: > > process = subprocess.Popen(...) > ... > handle =ctypes.windll.kernel32.OpenProcess(1, Fals

Re: [Python-Dev] About SSL tests

2007-04-03 Thread Facundo Batista
Raghuram Devarakonda wrote: >Q end the current SSL connection and exit." > > Can a command "Q" be sent to the server once testing is complete? For openssl to recognize your "Q", you need to have a connection active. So, we need a better way to kill the external openssl in the tests (don

Re: [Python-Dev] About SSL tests

2007-04-03 Thread Trent Mick
Steven Bethard wrote: > Another difference I believe is that TerminateProcess on Windows > doesn't kill the tree of processes like kill would. It would be nice > if Popen.terminate() did the same thing on both Unix and Windows. (I > assume that would mean making *all* the appropriate TerminatePro

Re: [Python-Dev] About SSL tests

2007-04-03 Thread Trent Mick
Christian Heimes wrote: >> I'd be willing to look at adding it, if the group thinks it's the right >> thing to do. > > I like the idea and I'm proposing to add two more methods to subprocess > Popen. > > class Popen(...): > ... > def signal(self, signal): > """Send a signal to th

Re: [Python-Dev] About SSL tests

2007-04-03 Thread Josiah Carlson
"Steven Bethard" <[EMAIL PROTECTED]> wrote: > On 4/3/07, Christian Heimes <[EMAIL PROTECTED]> wrote: > > > I'd be willing to look at adding it, if the group thinks it's the right > > > thing to do. > > > > I like the idea and I'm proposing to add two more methods to subprocess > > Popen. > > > > c

Re: [Python-Dev] About SSL tests

2007-04-03 Thread Raghuram Devarakonda
On 4/2/07, Facundo Batista <[EMAIL PROTECTED]> wrote: > I launch openssl through subprocess, but I do *not* find a way to tell > him to quit serving, so all I can do is to kill the process (through the > pid from the Popen object). > > The problem is that os.kill only works in Unix and Macintosh.

Re: [Python-Dev] About SSL tests

2007-04-03 Thread Steven Bethard
On 4/3/07, Christian Heimes <[EMAIL PROTECTED]> wrote: > > I'd be willing to look at adding it, if the group thinks it's the right > > thing to do. > > I like the idea and I'm proposing to add two more methods to subprocess > Popen. > > class Popen(...): > ... > def signal(self, signal): >

Re: [Python-Dev] About SSL tests

2007-04-03 Thread Facundo Batista
Eric V. Smith wrote: > I'd be willing to look at adding it, if the group thinks it's the right > thing to do. +1 to have the functionality of "kill the process you started" in subprocess. -- . Facundo . Blog: http://www.taniquetil.com.ar/plog/ PyAr: http://www.python.org/ar/ __

Re: [Python-Dev] About SSL tests

2007-04-03 Thread Christian Heimes
> I'd be willing to look at adding it, if the group thinks it's the right > thing to do. I like the idea and I'm proposing to add two more methods to subprocess Popen. class Popen(...): ... def signal(self, signal): """Send a signal to the process (UNIX only) signal is c

Re: [Python-Dev] About SSL tests

2007-04-03 Thread Eric V. Smith
Facundo Batista wrote: > Eric V. Smith wrote: > >> Would it not be better to put a platform-independent version of this >> into subprocess, so that this code doesn't have to be duplicated all >> over the place? Maybe a method on a Popen object called terminate()? > > Yes. But I'm not up to th

Re: [Python-Dev] About SSL tests

2007-04-03 Thread Facundo Batista
Eric V. Smith wrote: > Would it not be better to put a platform-independent version of this > into subprocess, so that this code doesn't have to be duplicated all > over the place? Maybe a method on a Popen object called terminate()? Yes. But I'm not up to that task. Really don't know how to

Re: [Python-Dev] About SSL tests

2007-04-03 Thread Eric V. Smith
[sorry if you see 2 copies of this] Facundo Batista wrote: > The problem of TerminateProcess is that I need the handle of the > process. > > I don't like the idea of rely on the private _handle and do: > > process = subprocess.Popen(...) > ... > subprocess.TerminateProcess(int(process._han

Re: [Python-Dev] About SSL tests

2007-04-03 Thread Facundo Batista
Martin v. Löwis wrote: > On Win32, you also have subprocess.TerminateProcess, if you have the > subprocess module in the first place. The problem of TerminateProcess is that I need the handle of the process. I don't like the idea of rely on the private _handle and do: process = subprocess.Pop

Re: [Python-Dev] About SSL tests

2007-04-03 Thread Facundo Batista
Martin v. Löwis wrote: > On Win32, you also have subprocess.TerminateProcess, if you have the > subprocess module in the first place. The problem of TerminateProcess is that I need the handle of the process. I don't like the idea of rely on the private _handle and do: process = subprocess.Pop

Re: [Python-Dev] About SSL tests

2007-04-02 Thread Josiah Carlson
"Martin v. Löwis" <[EMAIL PROTECTED]> wrote: > > >> The problem is that os.kill only works in Unix and Macintosh. So, > >> there's a better way to do this? Or I shall check if I'm in one of those > >> both platforms and only execute the tests there? > > > > If you have a compilation of pywin32 (

Re: [Python-Dev] About SSL tests

2007-04-02 Thread Martin v. Löwis
>> The problem is that os.kill only works in Unix and Macintosh. So, >> there's a better way to do this? Or I shall check if I'm in one of those >> both platforms and only execute the tests there? > > If you have a compilation of pywin32 (isn't it shipped by default in > Python 2.5+?), you can kil

Re: [Python-Dev] About SSL tests

2007-04-02 Thread Josiah Carlson
Facundo Batista <[EMAIL PROTECTED]> wrote: > Jean-Paul Calderone wrote: > > If the openssl binary is available, when the test starts, launch it in > > a child process, talk to it for the test, then kill it when the test is > > done. > > Ok, I have a demo of this. > > Right now, I face this probl

Re: [Python-Dev] About SSL tests

2007-04-02 Thread Facundo Batista
Jean-Paul Calderone wrote: > If the openssl binary is available, when the test starts, launch it in > a child process, talk to it for the test, then kill it when the test is > done. Ok, I have a demo of this. Right now, I face this problem. I launch openssl through subprocess, but I do *not* f

Re: [Python-Dev] About SSL tests

2007-03-30 Thread Facundo Batista
Jean-Paul Calderone wrote: > If the openssl binary is available, when the test starts, launch it in > a child process, talk to it for the test, then kill it when the test is > done. Ok. I'll try to do something like this. I'm assigning the bug to myself. Regards, -- . Facundo . Blog: http://

Re: [Python-Dev] About SSL tests

2007-03-28 Thread Jean-Paul Calderone
On Thu, 29 Mar 2007 00:22:23 + (UTC), Facundo Batista <[EMAIL PROTECTED]> wrote: >Jean-Paul Calderone wrote: > >> Take a look at "openssl s_server". This is still a pretty terrible way >> to test the SSL functionality, but it's loads better than connecting to >> a site on the public internet.

Re: [Python-Dev] About SSL tests

2007-03-28 Thread Facundo Batista
Jean-Paul Calderone wrote: > Take a look at "openssl s_server". This is still a pretty terrible way > to test the SSL functionality, but it's loads better than connecting to > a site on the public internet. How would you deal with the deployment and maintenance of this server in all buildbot's m

Re: [Python-Dev] About SSL tests

2007-03-28 Thread Jean-Paul Calderone
On Wed, 28 Mar 2007 16:38:45 -0700, Brett Cannon <[EMAIL PROTECTED]> wrote: >On 3/28/07, Facundo Batista <[EMAIL PROTECTED]> wrote: >> There's this bug (#451607) about the needing of tests for socket SSL... >> >> Last interesting update in the tracker is five years ago, and since a >> lot of work h

Re: [Python-Dev] About SSL tests

2007-03-28 Thread Brett Cannon
On 3/28/07, Facundo Batista <[EMAIL PROTECTED]> wrote: > There's this bug (#451607) about the needing of tests for socket SSL... > > Last interesting update in the tracker is five years ago, and since a > lot of work has been done in test_socket_ssl.py (Brett, Neal, Tim, > George Brandl). > > Do yo

[Python-Dev] About SSL tests

2007-03-28 Thread Facundo Batista
There's this bug (#451607) about the needing of tests for socket SSL... Last interesting update in the tracker is five years ago, and since a lot of work has been done in test_socket_ssl.py (Brett, Neal, Tim, George Brandl). Do you think is useful to leave this bug opened? Regards, -- . Facu