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

2011-05-25 Thread Petri Lehtinen
Nick Coghlan wrote: > 2011/5/26 Charles-François Natali : > > Then, I wonder why shutil.copytree and shutil.rmtree are provided. > > Recursive rm/copy/chown/chmod are extremely useful in system > > administration scripts. Furthermore, it's not as simple as it seems > > because of symlinks, see for

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

2011-05-25 Thread Nick Coghlan
2011/5/26 Charles-François Natali : > Then, I wonder why shutil.copytree and shutil.rmtree are provided. > Recursive rm/copy/chown/chmod are extremely useful in system > administration scripts. Furthermore, it's not as simple as it seems > because of symlinks, see for example http://bugs.python.org

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. Ini

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

2011-05-25 Thread Tim Delaney
2011/5/26 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"

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

[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 no

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 reason

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 wa

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 > wrote: It ended up that Jim Fulton is actually writing the PEP (with input from Twisted people and others.) -- Thomas Wouters mailto:tho...@python.org>>

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 fu

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" > func

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] 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 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 >

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: http://mail.python.org/mailman/options/python-de

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

2011-05-25 Thread Terry Reedy
On 5/25/2011 1:09 AM, Nick Coghlan wrote: The more important feature here is that it is exposing *OpenSSL's* random number generation, rather than our own. I agree, thought from a different stance, I think. The issue is whether we should 'automatically' expose everything is a wrapped library,

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 ne

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] 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 http://ma

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 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 choices, > I still

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 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 a Un

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 optimization

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 i

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] [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 wrote: > Le mercredi 25 mai 2011 à 15:13 +1000, Nick Coghlan a écrit : >> On Wed, May 25, 2011 at 1:09 PM,   wrote: >> > results for 234021dcad93 on branch "default" >> > >> > >> > test_packaging leaked [1

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] cpython: Issue #12049: Add RAND_bytes() and RAND_pseudo_bytes() functions to the ssl

2011-05-25 Thread Petri Lehtinen
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 > >> ssl.RAND_bytes() raises an error if was se

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. >> >>

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 m

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] 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 cas

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] [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, wrote: > > results for 234021dcad93 on branch "default" > > > > > > test_packaging leaked [128, 128, 128] references, sum=384 > > Is there a new cache in

[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 os.ch