On Sat, 13 Jun 2009 12:33:46 + (UTC)
Antoine Pitrou 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. Sometime in the next cou
On 17Jun2009 10:55, Greg Ewing 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 need to peek into
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
_
Greg Ewing 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 have a rea
Benjamin Peterson schrieb:
> 2009/6/16 Greg Ewing :
>> 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
2009/6/16 Greg Ewing :
> 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 stea
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 PyModule_AddObje
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
> 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 bar
On Tue, Jun 16, 2009 at 5:31 PM, Devin Cook 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 OpenSSL doesn't h
Devin Cook 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 check the OpenSSL cod
> 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
>> 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/
On Tue, Jun 16, 2009 at 3:23 PM, "Martin v. Löwis" 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 python-dev
> po
> 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
co
Scott David Daniels 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, with
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 'blo
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, without blocking
I tend to prefer zero-ish defaults, how ab
Cameron Simpson wrote:
> On 14Jun2009 16:42, Mark Seaborn 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, "w")
>
> Not guarrenteed to
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 "validat
On Tue, Jun 16, 2009 at 1:21 PM, Michael Foord 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, etc.
>
> PyPy
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
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 wan
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
--
http://w
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
Py
Cameron Simpson wrote:
On 16Jun2009 02:18, MRAB 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, is currently available, up
26 matches
Mail list logo