Re: [Python-Dev] How to interpret get_code from PEP 302?

2007-08-21 Thread Greg Ewing
Paul Moore wrote: > What the sentence you quote > is trying to say is that if there's a need to compile source, the > get_code method must do this on behalf of the caller - it can't return > None and expect the caller to try get_source and compile it manually. Why not simply say that it must retur

Re: [Python-Dev] backport new server-side SSL to older Pythons?

2007-08-21 Thread Bill Janssen
> > I'd like to be able to backport this server-side SSL support to older > > Pythons, like the 2.3.4 in CentOS 4 and the 2.3.5 in OS X 10.4. > > That would have to be a private fork or a 3rd party extension module; > python.org is committed to keeping existing releases stable > (feature-wise). Y

Re: [Python-Dev] [Python-3000] Documentation switch imminent

2007-08-21 Thread Paul Moore
On 21/08/07, Georg Brandl <[EMAIL PROTECTED]> wrote: > Okay, I uploaded a new version without JavaScript and with hidden permalink > markers. Very nice! Works fine now. Thanks for the quick fix. Paul ___ Python-Dev mailing list Python-Dev@python.org http

Re: [Python-Dev] backport new server-side SSL to older Pythons?

2007-08-21 Thread Guido van Rossum
On 8/21/07, Bill Janssen <[EMAIL PROTECTED]> wrote: > I'd like to be able to backport this server-side SSL support to older > Pythons, like the 2.3.4 in CentOS 4 and the 2.3.5 in OS X 10.4. That would have to be a private fork or a 3rd party extension module; python.org is committed to keeping exi

[Python-Dev] backport new server-side SSL to older Pythons?

2007-08-21 Thread Bill Janssen
I'd like to be able to backport this server-side SSL support to older Pythons, like the 2.3.4 in CentOS 4 and the 2.3.5 in OS X 10.4. So I'd like to move all the SSL stuff out of the "socket" module, and add a new top-level module called "ssl" (or "networking.ssl", or whatever the Py3K naming sche

Re: [Python-Dev] How to interpret get_code from PEP 302?

2007-08-21 Thread Phillip J. Eby
At 11:22 AM 8/21/2007 -0700, Brett Cannon wrote: >This also means pkgutil is possibly non-compliant as it's get_code >implementation does the above suggestion (tries for source to avoid >timestamp check, and uses bytecode as backup). That's not actually true, it just *looks* that way. IIRC, mod_t

Re: [Python-Dev] How to interpret get_code from PEP 302?

2007-08-21 Thread Brett Cannon
[Thanks to Guido, Paul, and Nick for replying; going to just reply to Paul since everyone said the same thing and it's his fault I didn't understand the wording. =)] On 8/21/07, Paul Moore <[EMAIL PROTECTED]> wrote: > On 21/08/07, Brett Cannon <[EMAIL PROTECTED]> wrote: > > PEP 302 ("New Import H

Re: [Python-Dev] More on server-side SSL support

2007-08-21 Thread Bill Janssen
> Can the TLS handshake be made to respect timeouts on sockets, or would > this require changes deep inside OpenSSL? I'm not sure. Good test case to try. I believe it will work. By the way, interested parties should read http://www.openssl.org/docs/ssl/SSL_CTX_set_options.html and think about

Re: [Python-Dev] Segfault

2007-08-21 Thread Martin v. Löwis
> I think there might already be a bug report about file not being > thread-safe. (It could have also been socket, but I think Martin > fixed a problem in socket a while ago.) This was a different problem, though: the socket object contained an address structure, which it didn't really need and w

Re: [Python-Dev] More on server-side SSL support

2007-08-21 Thread Bill Janssen
> Should there be an "SSL socket", which is > just like a regular socket? Does that really provide any additional > functionality to anyone? Most apps and classes that use TCP sockets > wrap the socket with socket._fileobject() to get "read" and "write", > anyway -- can't they just wrap it with s

Re: [Python-Dev] [Python-3000] Documentation switch imminent

2007-08-21 Thread Georg Brandl
Paul Moore schrieb: > On 21/08/07, Benji York <[EMAIL PROTECTED]> wrote: >> Georg Brandl wrote: >> > I put the CHM at , if you want >> > to have a look. >> >> Generally looks good. I did get this error when opening the CHM: >> >> """ >> A Runtime Error has

Re: [Python-Dev] More on server-side SSL support

2007-08-21 Thread Graham Horler
+1 for mutual authentication, I would use this. Can the TLS handshake be made to respect timeouts on sockets, or would this require changes deep inside OpenSSL? Graham ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/list

Re: [Python-Dev] Segfault

2007-08-21 Thread Neal Norwitz
On 8/21/07, Hrvoje Nikšić <[EMAIL PROTECTED]> wrote: > On Mon, 2007-08-20 at 20:27 +0200, Maciej Fijalkowski wrote: > > import thread > > > > while 1: > > f = open("/tmp/dupa", "w") > > thread.start_new_thread(f.close, ()) > > f.close() > > file_close inadvertently allows fclose to be c

Re: [Python-Dev] More on server-side SSL support

2007-08-21 Thread Bill Janssen
> This is a self-signed cert, and it's still an open question whether > they should verify, and under what circumstances. I'm currently > thinking that in the CERT_OPTIONAL regime, they could, but with > CERT_REQUIRED, they shouldn't. If an application wanted self-signed certs to verify under CER

Re: [Python-Dev] More on server-side SSL support

2007-08-21 Thread Bill Janssen
> > The simplest way to do verification is to allow the application to > > provide a set of root certs that it would like to verify against, and > > use the built-in OpenSSL verification procedure. > > That's good. I don't recall whether you planned for this, however, > it would then be necessary

Re: [Python-Dev] [Python-3000] Documentation switch imminent

2007-08-21 Thread Paul Moore
On 21/08/07, Benji York <[EMAIL PROTECTED]> wrote: > Georg Brandl wrote: > > I put the CHM at , if you want > > to have a look. > > Generally looks good. I did get this error when opening the CHM: > > """ > A Runtime Error has occurred. > Do you with to De

Re: [Python-Dev] How to interpret get_code from PEP 302?

2007-08-21 Thread Nick Coghlan
Brett Cannon wrote: > PEP 302 ("New Import Hooks") has an optional extensions section so > that tools like py2exe and py2app have an easier time. Part of the > optional extensions is the method get_code that is to return the code > object for the specified method (if the loader can handle it). >

Re: [Python-Dev] [Python-3000] Documentation switch imminent

2007-08-21 Thread Georg Brandl
Benji York schrieb: > Georg Brandl wrote: >> I put the CHM at , if you want >> to have a look. > > Generally looks good. I did get this error when opening the CHM: > > """ > A Runtime Error has occurred. > Do you with to Debug? > > Line: 236 > Error: Ex

Re: [Python-Dev] [Python-3000] Documentation switch imminent

2007-08-21 Thread Benji York
Georg Brandl wrote: > I put the CHM at , if you want > to have a look. Generally looks good. I did get this error when opening the CHM: """ A Runtime Error has occurred. Do you with to Debug? Line: 236 Error: Expected identifier, string or number """ N

Re: [Python-Dev] [Python-3000] Documentation switch imminent

2007-08-21 Thread Georg Brandl
Paul Moore schrieb: > On 21/08/07, Thomas Wouters <[EMAIL PROTECTED]> wrote: >> >> >> On 8/14/07, Georg Brandl <[EMAIL PROTECTED]> wrote: >> > Now that the converted documentation is fairly bug-free, I want to >> > make the switch. >> >> One thing I miss (and I haven't followed the discussions abou

Re: [Python-Dev] [Python-3000] Documentation switch imminent

2007-08-21 Thread Georg Brandl
Thomas Wouters schrieb: > > > On 8/14/07, *Georg Brandl* <[EMAIL PROTECTED] > > wrote: > > Now that the converted documentation is fairly bug-free, I want to > make the switch. > > > One thing I miss (and I haven't followed the discussions about the new > layo

Re: [Python-Dev] [Python-3000] Documentation switch imminent

2007-08-21 Thread Paul Moore
On 21/08/07, Thomas Wouters <[EMAIL PROTECTED]> wrote: > > > On 8/14/07, Georg Brandl <[EMAIL PROTECTED]> wrote: > > Now that the converted documentation is fairly bug-free, I want to > > make the switch. > > One thing I miss (and I haven't followed the discussions about the new > layout at all, so

Re: [Python-Dev] RFC - proposal for urilib. unified module of urlparse, urllib and urllib2

2007-08-21 Thread Facundo Batista
2007/8/19, O.R.Senthil Kumaran <[EMAIL PROTECTED]>: > I am drafting a PEP proposing a module 'urilib', which will be the unified > module of urlparse, urllib and urllib2. Great!! > a) _all_ functions will include from urlparse,urllib and urllib2. > b) overlapping functionality between urllib a

Re: [Python-Dev] How to interpret get_code from PEP 302?

2007-08-21 Thread Paul Moore
On 21/08/07, Brett Cannon <[EMAIL PROTECTED]> wrote: > PEP 302 ("New Import Hooks") has an optional extensions section so > that tools like py2exe and py2app have an easier time. Part of the > optional extensions is the method get_code that is to return the code > object for the specified method (

Re: [Python-Dev] Segfault

2007-08-21 Thread Ronald Oussoren
Please create a patch for this in the tracker to ensure that this patch doesn't get lost. Ronald On Tuesday, August 21, 2007, at 10:47AM, "Hrvoje Nik?i?" <[EMAIL PROTECTED]> wrote: >On Mon, 2007-08-20 at 20:27 +0200, Maciej Fijalkowski wrote: >> import thread >> >> while 1: >> f = open("/

Re: [Python-Dev] Segfault

2007-08-21 Thread Hrvoje Nikšić
On Mon, 2007-08-20 at 20:27 +0200, Maciej Fijalkowski wrote: > import thread > > while 1: > f = open("/tmp/dupa", "w") > thread.start_new_thread(f.close, ()) > f.close() file_close inadvertently allows fclose to be called twice on the same stdio file. This patch should fix the proble

Re: [Python-Dev] [Python-3000] Documentation switch imminent

2007-08-21 Thread Thomas Wouters
On 8/14/07, Georg Brandl <[EMAIL PROTECTED]> wrote: > > Now that the converted documentation is fairly bug-free, I want to > make the switch. One thing I miss (and I haven't followed the discussions about the new layout at all, so I don't know if it came up already) is section numbers. I very oft