Re: [Python-Dev] [Python-checkins] cpython: Issue #12049: Add RAND_bytes() and RAND_pseudo_bytes() functions to the ssl

2011-05-25 Thread Petri Lehtinen
Terry Reedy wrote: On 5/24/2011 12:06 PM, Victor Stinner wrote: Le mardi 24 mai 2011 à 11:27 -0400, Terry Reedy a écrit : +.. function:: RAND_bytes(num) + + Returns *num* cryptographically strong pseudo-random bytes. + + .. versionadded:: 3.3 + +.. function:: RAND_pseudo_bytes(num)

[Python-Dev] Extending os.chown() to accept user/group names

2011-05-25 Thread Sandro Tosi
Hi all, before opening an issue to track the request, I'd like to ask advice here about this: extend os.chown() to accept even user/group names instead of just uid and gid. On a Unix system, you can call chown command passing either id or names, so it seems (to me at least) natural to expect

Re: [Python-Dev] [Python-checkins] Daily reference leaks (234021dcad93): sum=61

2011-05-25 Thread Victor Stinner
Le mercredi 25 mai 2011 à 15:13 +1000, Nick Coghlan a écrit : On Wed, May 25, 2011 at 1:09 PM, solip...@pitrou.net wrote: results for 234021dcad93 on branch default test_packaging leaked [128, 128, 128] references, sum=384 Is there a new

Re: [Python-Dev] [Python-checkins] cpython: Issue #12049: Add RAND_bytes() and RAND_pseudo_bytes() functions to the ssl

2011-05-25 Thread Victor Stinner
Le mercredi 25 mai 2011 à 15:09 +1000, Nick Coghlan a écrit : The RAND_bytes() documentation should probably make it clearer that unlike the random module and RAND_pseudo_bytes(), RAND_bytes() can *fail* (by raising SSLError) if it isn't in a position to provide the requested random data.

Re: [Python-Dev] Deprecate codecs.open() and StreamWriter/StreamReader

2011-05-25 Thread M.-A. Lemburg
Walter Dörwald wrote: On 24.05.11 12:58, Victor Stinner wrote: Le mardi 24 mai 2011 à 12:42 +0200, Łukasz Langa a écrit : Wiadomość napisana przez Walter Dörwald w dniu 2011-05-24, o godz. 12:16: I don't see which usecase is not covered by TextIOWrapper. But I know some cases which are not

Re: [Python-Dev] [Python-checkins] cpython: Issue #12049: Add RAND_bytes() and RAND_pseudo_bytes() functions to the ssl

2011-05-25 Thread Victor Stinner
Le mercredi 25 mai 2011 à 08:59 +0300, Petri Lehtinen a écrit : So it seems to me that RAND_bytes() either returns cryptographically strong data or fails (is it possible to detect the failure with the Python function? Should this be documented?). RAND_bytes() raises an SSLError on error. You

Re: [Python-Dev] [Python-checkins] cpython: Issue #12049: Add RAND_bytes() and RAND_pseudo_bytes() functions to the ssl

2011-05-25 Thread Petri Lehtinen
Victor Stinner wrote: I already patched the doc of the random module to add a security warning. Well, you don't really need to know how a CSPRNG is implemented, just that random cannot be used for security and that ssl.RAND_bytes() raises an error if was seeded with enough data. Tell me if

Re: [Python-Dev] [Python-checkins] cpython: Issue #12049: Add RAND_bytes() and RAND_pseudo_bytes() functions to the ssl

2011-05-25 Thread Eric Smith
Victor Stinner wrote: I already patched the doc of the random module to add a security warning. Well, you don't really need to know how a CSPRNG is implemented, just that random cannot be used for security and that ssl.RAND_bytes() raises an error if was seeded with enough data. Tell me if

Re: [Python-Dev] Deprecate codecs.open() and StreamWriter/StreamReader

2011-05-25 Thread Victor Stinner
Le mercredi 25 mai 2011 à 11:38 +0200, M.-A. Lemburg a écrit : You are missing the point: we have StreamReader and StreamWriter APIs on codecs to allow each codecs to implement more efficient ways of encoding and decoding streams. Examples of such optimizations are reading the stream in

Re: [Python-Dev] [Python-checkins] Daily reference leaks (234021dcad93): sum=61

2011-05-25 Thread Nick Coghlan
On Wed, May 25, 2011 at 7:10 PM, Victor Stinner victor.stin...@haypocalc.com wrote: Le mercredi 25 mai 2011 à 15:13 +1000, Nick Coghlan a écrit : On Wed, May 25, 2011 at 1:09 PM,  solip...@pitrou.net wrote: results for 234021dcad93 on branch default

Re: [Python-Dev] [Python-checkins] cpython: Issue #12049: Add RAND_bytes() and RAND_pseudo_bytes() functions to the ssl

2011-05-25 Thread Eric Smith
On 05/25/2011 06:58 AM, Petri Lehtinen wrote: Eric Smith wrote: Victor Stinner wrote: I already patched the doc of the random module to add a security warning. Well, you don't really need to know how a CSPRNG is implemented, just that random cannot be used for security and that

Re: [Python-Dev] Extending os.chown() to accept user/group names

2011-05-25 Thread Barry Warsaw
On May 25, 2011, at 10:24 AM, Sandro Tosi wrote: before opening an issue to track the request, I'd like to ask advice here about this: extend os.chown() to accept even user/group names instead of just uid and gid. On a Unix system, you can call chown command passing either id or names, so it

Re: [Python-Dev] Deprecate codecs.open() and StreamWriter/StreamReader

2011-05-25 Thread M.-A. Lemburg
Victor Stinner wrote: Le mercredi 25 mai 2011 à 11:38 +0200, M.-A. Lemburg a écrit : You are missing the point: we have StreamReader and StreamWriter APIs on codecs to allow each codecs to implement more efficient ways of encoding and decoding streams. Examples of such optimizations are

Re: [Python-Dev] Extending os.chown() to accept user/group names

2011-05-25 Thread Antoine Pitrou
On Wed, 25 May 2011 09:41:46 -0400 Barry Warsaw ba...@python.org wrote: On May 25, 2011, at 10:24 AM, Sandro Tosi wrote: before opening an issue to track the request, I'd like to ask advice here about this: extend os.chown() to accept even user/group names instead of just uid and gid. On

Re: [Python-Dev] Extending os.chown() to accept user/group names

2011-05-25 Thread Dirkjan Ochtman
On Wed, May 25, 2011 at 15:41, Barry Warsaw ba...@python.org wrote: I think it would be a nice feature, and I can see the conflict.  OT1H you want to keep os.chown() a thin wrapper, but OTOH you'd rather not have to add a new, arguably more difficult to discover, function.  Given those two

Re: [Python-Dev] Extending os.chown() to accept user/group names

2011-05-25 Thread Barry Warsaw
On May 25, 2011, at 04:15 PM, Dirkjan Ochtman wrote: Right. Please add a mention of shutil.chown() to the os.chown() docs, though. Brilliant! -Barry signature.asc Description: PGP signature ___ Python-Dev mailing list Python-Dev@python.org

Re: [Python-Dev] Deprecate codecs.open() and StreamWriter/StreamReader

2011-05-25 Thread Victor Stinner
Le mercredi 25 mai 2011 à 15:43 +0200, M.-A. Lemburg a écrit : For UTF-16 it would e.g. make sense to always read data in blocks with even sizes, removing the trial-and-error decoding and extra buffering currently done by the base classes. For UTF-32, the blocks should have size % 4 == 0.

Re: [Python-Dev] Deprecate codecs.open() and StreamWriter/StreamReader

2011-05-25 Thread Victor Stinner
Le mercredi 25 mai 2011 à 13:10 +0200, Victor Stinner a écrit : codecs is always faster (between 1.07 and 1.15 times faster than io) to read the whole content of file using read(-1). Something should maybe be optimized in TextIOWrapper.read() ;-) Oh, I understood: it's maybe the universal

Re: [Python-Dev] Extending os.chown() to accept user/group names

2011-05-25 Thread Charles-François Natali
While we're at it, adding a recursive argument to this shutil.chown could also be useful. ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe:

Re: [Python-Dev] cpython: Fix closes issue #11109 - socketserver.ForkingMixIn leaves zombies, also fails

2011-05-25 Thread Antoine Pitrou
On Wed, 25 May 2011 18:26:46 +0200 senthil.kumaran python-check...@python.org wrote: A new method called service_action is made available in BaseServer, called by serve_forever loop. This useful in cases where Mixins can use it for cleanup action. ForkingMixin class uses service_action to

Re: [Python-Dev] Extending os.chown() to accept user/group names

2011-05-25 Thread Victor Stinner
Le mercredi 25 mai 2011 à 18:46 +0200, Charles-François Natali a écrit : While we're at it, adding a recursive argument to this shutil.chown could also be useful. I don't like the idea of a recursive flag. I would prefer a map-like function to apply a function on all files of a directory.

Re: [Python-Dev] Extending os.chown() to accept user/group names

2011-05-25 Thread Eric Smith
On 5/25/2011 1:17 PM, Victor Stinner wrote: Le mercredi 25 mai 2011 à 18:46 +0200, Charles-François Natali a écrit : While we're at it, adding a recursive argument to this shutil.chown could also be useful. I don't like the idea of a recursive flag. I would prefer a map-like function to

Re: [Python-Dev] Extending os.chown() to accept user/group names

2011-05-25 Thread Petri Lehtinen
Victor Stinner wrote: Le mercredi 25 mai 2011 à 18:46 +0200, Charles-François Natali a écrit : While we're at it, adding a recursive argument to this shutil.chown could also be useful. I don't like the idea of a recursive flag. I would prefer a map-like function to apply a function on all

Re: [Python-Dev] Python 3.3 release schedule posted

2011-05-25 Thread Michael Foord
On 26/03/2011 00:33, Laurens Van Houtven wrote: On Thu, Mar 24, 2011 at 12:18 AM, Thomas Wouters tho...@python.org mailto:tho...@python.org wrote: It ended up that Jim Fulton is actually writing the PEP (with input from Twisted people and others.) -- Thomas Wouters

Re: [Python-Dev] Extending os.chown() to accept user/group names

2011-05-25 Thread Charles-François Natali
While we're at it, adding a recursive argument to this shutil.chown could also be useful. I don't like the idea of a recursive flag. I would prefer a map-like function to apply a function on all files of a directory. Something like shutil.apply_recursive(shutil.chown)... I was also

Re: [Python-Dev] cpython: Fix closes issue #11109 - socketserver.ForkingMixIn leaves zombies, also fails

2011-05-25 Thread Charles-François Natali
A new method called service_action is made available in BaseServer, called by serve_forever loop. This useful in cases where Mixins can use it for cleanup action. ForkingMixin class uses service_action to collect the zombie child processes. Initial Patch by Justin Wark. Is it reasonable,

[Python-Dev] multibytecodex

2011-05-25 Thread Laura Creighton
This just in from pypy-dev. I am reposting it here because I am fairly certain that nobody on the pypy-dev mailing list uses the multibytecodex, but there has got to be at least one person here who does. Please reply to the pypy-dev article, not here, or mail to pypy-...@python.org if you are

Re: [Python-Dev] multibytecodex

2011-05-25 Thread Victor Stinner
Le mercredi 25 mai 2011 à 23:41 +0200, Laura Creighton a écrit : One reason I didn't implement the classes yet is that I couldn't understand two points in how they are supposed to work. But it seems that there are really two bugs, as I've been pointed to: http://bugs.python.org/issue12100 and

Re: [Python-Dev] Extending os.chown() to accept user/group names

2011-05-25 Thread Tim Delaney
2011/5/26 Victor Stinner victor.stin...@haypocalc.com Le mercredi 25 mai 2011 à 18:46 +0200, Charles-François Natali a écrit : While we're at it, adding a recursive argument to this shutil.chown could also be useful. I don't like the idea of a recursive flag. I would prefer a map-like

Re: [Python-Dev] cpython: Fix closes issue #11109 - socketserver.ForkingMixIn leaves zombies, also fails

2011-05-25 Thread Senthil Kumaran
Antoine Pitrou wrote: A new method called service_action is made available in BaseServer, called by serve_forever loop. This useful in cases where Mixins can use it for cleanup action. ForkingMixin class uses service_action to collect the zombie child processes. Initial Patch by