Cameron Simpson wrote:
On 16Jun2009 02:18, MRAB pyt...@mrabarnett.plus.com wrote:
My itch is that peek() _feels_ like it should be look into the buffer
but actually can block and/or change the buffer.
Can block, but not if you don't want it too. You might just want to see
what, if anything,
On Tue, 16 Jun 2009 01:20:53 pm Cameron Simpson wrote:
I don't think all
pythons do immediate ref-counted GC.
Jython and IronPython don't. I don't know about PyPy, CLPython, Unladen
Swallow, etc.
--
Steven D'Aprano
___
Python-Dev mailing list
Steven D'Aprano wrote:
On Tue, 16 Jun 2009 01:20:53 pm Cameron Simpson wrote:
I don't think all
pythons do immediate ref-counted GC.
Jython and IronPython don't. I don't know about PyPy, CLPython, Unladen
Swallow, etc.
PyPy doesn't, Unladen Swallow won't.
Michael
--
Cameron Simpson wrote:
Indeed, though arguably read1() is a lousy name too, on the same basis.
My itch is that peek() _feels_ like it should be look into the buffer
but actually can block and/or change the buffer.
I guess all the buffer operations should be transparent to the user if
he
MRAB wrote:
I was thinking along the lines of:
def peek(self, size=None, block=True)
I think this is fine too. :)
If 'block' is True then return 'size' bytes, unless the end of the
file/stream is reached; if 'block' is False then return up to 'size'
bytes, without blocking. The blocking
On Tue, Jun 16, 2009 at 1:21 PM, Michael Foordfuzzy...@voidspace.org.uk wrote:
Steven D'Aprano wrote:
On Tue, 16 Jun 2009 01:20:53 pm Cameron Simpson wrote:
I don't think all pythons do immediate ref-counted GC.
Jython and IronPython don't. I don't know about PyPy, CLPython, Unladen
Swallow,
Hi all,
I have a few questions about validating SSL certificates. From what I
gather, this validation occurs in the OpenSSL code called from _ssl.c. Is
this correct?
Also, I have looked through the docs and code, but haven't been able to
figure out exactly what is included in certificate
Cameron Simpson c...@zip.com.au wrote:
On 14Jun2009 16:42, Mark Seaborn m...@mythic-beasts.com wrote:
| I use a convenience function like this, so that GC takes care of the FDs:
|
| def make_pipe():
| read_fd, write_fd = os.pipe()
| return os.fdopen(read_fd, r), os.fdopen(write_fd,
On approximately 6/16/2009 11:20 AM, came the following characters from
the keyboard of Scott David Daniels:
MRAB wrote:
I was thinking along the lines of:
def peek(self, size=None, block=True)
If 'block' is True then return 'size' bytes, unless the end of the
file/stream is reached; if
Scott David Daniels Scott.Daniels at Acm.Org writes:
MRAB wrote:
I was thinking along the lines of:
def peek(self, size=None, block=True)
If 'block' is True then return 'size' bytes, unless the end of the
file/stream is reached; if 'block' is False then return up to 'size'
bytes,
I have a few questions about validating SSL certificates. From what I
gather, this validation occurs in the OpenSSL code called from _ssl.c.
Is this correct?
This question is really off-topic for python-dev. As a python-dev
poster, you should do research upfront, and only post on what you
On Tue, Jun 16, 2009 at 3:23 PM, Martin v. Löwismar...@v.loewis.de wrote:
I have a few questions about validating SSL certificates. From what I
gather, this validation occurs in the OpenSSL code called from _ssl.c.
Is this correct?
This question is really off-topic for python-dev. As a
This question is really off-topic for python-dev. As a python-dev
poster, you should do research upfront, and only post on what you
consider facts.
Martin, I told him to ask his question about _ssl internals on
python-dev as he is new, and looking to work on some of the
internals/make a
But I really do believe that this is what he need to do next:
familiarize himself with OpenSSL. There is a lot of APIs in that
library, and it takes a while (i.e.: several months) to get
productive, in particular since OpenSSL doesn't have the most
intuitive API.
Well, I realized this as
Devin Cook devin.c.c...@gmail.com wrote:
Also, I have looked through the docs and code, but haven't been able to
figure out exactly what is included in certificate validation. Is it just
validating the chain? Does it check the NotBefore and NotAfter dates?
I believe so, but you'll have to
On Tue, Jun 16, 2009 at 5:31 PM, Devin Cookdevin.c.c...@gmail.com wrote:
But I really do believe that this is what he need to do next:
familiarize himself with OpenSSL. There is a lot of APIs in that
library, and it takes a while (i.e.: several months) to get
productive, in particular since
If this isn't the place to ask these kinds of questions, I apologise.
I can take the discussion elsewhere if I need to.
It really depends on what these questions are. If your question is
I have this patch, is it correct?, then the question is entirely
appropriate. If it is I just have barely
Cameron Simpson wrote:
I normally avoid
non-blocking requirements by using threads, so that the thread gathering
from the stream can block.
If you have a thread dedicated to reading from that
stream, then I don't see why you need to peek into
the buffer. Just have it loop reading a packet at a
Lenard Lindstrom wrote:
I assumed that since PyModule_AddObject is documented as
stealing a reference, it always stole a reference. But in reality it
only does so conditionally, when it succeeds.
As an aside, is this a general feature of functions
that steal references, or is
Benjamin Peterson schrieb:
2009/6/16 Greg Ewing greg.ew...@canterbury.ac.nz:
Lenard Lindstrom wrote:
I assumed that since PyModule_AddObject is documented as stealing a
reference, it always stole a reference. But in reality it only does so
conditionally, when it succeeds.
As an aside, is
Greg Ewing greg.ewing at canterbury.ac.nz writes:
Anything else such as peek() that doesn't explicitly
mention the buffer should fit into the abstraction
properly.
peek() doesn't fit into the abstraction since it doesn't even exist on raw
streams.
While buffered and non-buffered streams
Christian Heimes wrote:
But it is a convenient oddity nonetheless.
What's convenient about it? Seems to me it's the
opposite, since you can't just bail out if it
fails, but have to decref the reference you
thought it was going to take care of for you.
--
Greg
On 17Jun2009 10:55, Greg Ewing greg.ew...@canterbury.ac.nz wrote:
Cameron Simpson wrote:
I normally avoid
non-blocking requirements by using threads, so that the thread gathering
from the stream can block.
If you have a thread dedicated to reading from that
stream, then I don't see why you
On Sat, 13 Jun 2009 12:33:46 + (UTC)
Antoine Pitrou solip...@pitrou.net wrote:
This proposal looks reasonable to me. Please note that it's too late for 3.1
anyway - we're in release candidate phase. Once you have a patch, you can post
it on the bug tracker.
Thanks I will do that.
24 matches
Mail list logo