Re: Socket module bug on OpenVMS

2006-10-24 Thread Jean-François Piéronne
Irmen de Jong wrote: > Martin v. Löwis wrote: [snip] >> Perhaps you had some different work-around in mind? > > Nope, I was indeed thinking about splitting up the recv() into > smaller blocks internally. > Maybe a more elaborate check in Python's build system (to remove > the MSG_WAITALL on VMS) w

Re: Socket module bug on OpenVMS

2006-10-23 Thread Martin v. Löwis
Irmen de Jong schrieb: > Although I'm not yet convinced about the all-or-nothing failure > model you were talking about. How can I know if recv() fails > with a MemoryError (or socket error) that it actually didn't > receive anything? Is that even an assumption I can rely on? Yes, you can. It can'

Re: Socket module bug on OpenVMS

2006-10-23 Thread Irmen de Jong
Martin v. Löwis wrote: > Irmen de Jong schrieb: >> In my opinion Python's socket module itself could implement these >> workarounds. That would make user code a lot cleaner and less >> error prone, and more portable. What do other people think? > > It depends: when VMS defines MSG_WAITALL, but doe

Re: Socket module bug on OpenVMS

2006-10-23 Thread Martin v. Löwis
Irmen de Jong schrieb: > In my opinion Python's socket module itself could implement these > workarounds. That would make user code a lot cleaner and less > error prone, and more portable. What do other people think? It depends: when VMS defines MSG_WAITALL, but doesn't implement it correctly, the

Re: Socket module bug on OpenVMS

2006-10-23 Thread Irmen de Jong
Fredrik Lundh wrote: > Irmen de Jong wrote: > >> This also raises the question to what extent Python itself should >> work around platform specific "peculiarities", such as this one. >> There's another problem with socket code on Windows and VMS systems, >> where you get strange exceptions when us

Re: Socket module bug on OpenVMS

2006-10-22 Thread Fredrik Lundh
Irmen de Jong wrote: > This also raises the question to what extent Python itself should > work around platform specific "peculiarities", such as this one. > There's another problem with socket code on Windows and VMS systems, > where you get strange exceptions when using a "too big" recv() buffer

Re: Socket module bug on OpenVMS

2006-10-22 Thread Irmen de Jong
Jean-Paul Calderone wrote: > On Sun, 22 Oct 2006 19:58:44 +0200, Irmen de Jong > <[EMAIL PROTECTED]> wrote: >> Jean-Paul Calderone wrote: >>> I think everyone can agree that Python shouldn't crash. >> >> Well, it doesn't really crash in a bad way, in my example: >> it doesn't work because it simpl

Re: Socket module bug on OpenVMS

2006-10-22 Thread Jean-François Piéronne
Irmen de Jong a écrit : > Jean-François Piéronne wrote: > >> Which Python version, OpenVMS version, IP stack and stack version? > > OpenVMS 7.3-2, Python 2.3.5, no idea about IP stack version. > Thanks, may be upgrade to Python 2.5 will solve the problem. >> If you think this is a Python on Ope

Re: Socket module bug on OpenVMS

2006-10-22 Thread Irmen de Jong
Jean-François Piéronne wrote: > Which Python version, OpenVMS version, IP stack and stack version? OpenVMS 7.3-2, Python 2.3.5, no idea about IP stack version. > If you think this is a Python on OpenVMS problem, send me a small > reproduced anf I will take a look. I don't have any small case ly

Re: Socket module bug on OpenVMS

2006-10-22 Thread Irmen de Jong
Jean-Paul Calderone wrote: > I think everyone can agree that Python shouldn't crash. Well, it doesn't really crash in a bad way, in my example: it doesn't work because it simply raises a socket exception all the time. > Whether Python should propagate other kinds of errors from the underlying > p

Re: Socket module bug on OpenVMS

2006-10-22 Thread Jean-Paul Calderone
On Sun, 22 Oct 2006 19:58:44 +0200, Irmen de Jong <[EMAIL PROTECTED]> wrote: >Jean-Paul Calderone wrote: >> I think everyone can agree that Python shouldn't crash. > >Well, it doesn't really crash in a bad way, in my example: >it doesn't work because it simply raises a socket exception all the time

Re: Socket module bug on OpenVMS

2006-10-22 Thread Jean-François Piéronne
> Hi, > > Recently I was bitten by an apparent bug in the BSD socket layer > on Open VMS. Specifically, it appears that VMS defines MSG_WAITALL > in socket.h but does not implement it (it is not in the documentation). > And I use the socket.MSG_WAITALL flag on my recv() calls... and > then they cr

Re: Socket module bug on OpenVMS

2006-10-22 Thread Jean-Paul Calderone
On Sun, 22 Oct 2006 19:00:22 +0200, Irmen de Jong <[EMAIL PROTECTED]> wrote: >Hi, > >Recently I was bitten by an apparent bug in the BSD socket layer >on Open VMS. Specifically, it appears that VMS defines MSG_WAITALL >in socket.h but does not implement it (it is not in the documentation). >And I u

Socket module bug on OpenVMS

2006-10-22 Thread Irmen de Jong
Hi, Recently I was bitten by an apparent bug in the BSD socket layer on Open VMS. Specifically, it appears that VMS defines MSG_WAITALL in socket.h but does not implement it (it is not in the documentation). And I use the socket.MSG_WAITALL flag on my recv() calls... and then they crash on OpenVMS