This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author pitrou
Recipients cbay, giampaolo.rodola, janssen, pitrou, r.david.murray, vstinner
Date 2010-03-26.18:58:56
SpamBayes Score 0.0001561498
Marked as misclassified No
Message-id <1269630048.3327.16.camel@localhost>
In-reply-to <1269629261.09.0.26318395745.issue8240@psf.upfronthosting.co.za>
Content
> pitrou: that's debatable, since the Python programmer has no control
> over memory pointers.

No, but he has control over whether he always uses the same object, or
generates a new argument everytime.

>  As I said, I have a cStringIO buffer, and two consecutive calls to
> buffer.getvalue() yield different objects. What can I do about it? I
> think it's a rather sane scenario, and I don't feel I'm doing anything
> wrong.

Hmm, indeed. What you can do, very simply, is cache the getvalue()
result once you have generated it.

> If you think the programmer should be alerted about it, however, then
> we should at least say it explicitely in the documentation and
> probably return an explicit Python error. I had to google quite a bit
> before finding out what this error meant:
> 
> error:1409F07F:SSL routines:SSL3_WRITE_PENDING:bad write retry

Indeed, this is cryptic.

By the way, I've found a thread explaining this in greater detail:
http://readlist.com/lists/openssl.org/openssl-users/0/1794.html

Basically, even when SSL_write() says the write must be retried, it does
process and buffer some of your data, so that if you retry with
different data, some junk will be written out on the SSL socket.
History
Date User Action Args
2010-03-26 18:58:59pitrousetrecipients: + pitrou, janssen, vstinner, giampaolo.rodola, r.david.murray, cbay
2010-03-26 18:58:57pitroulinkissue8240 messages
2010-03-26 18:58:56pitroucreate