Re: [Python-Dev] hash randomization in 3.3

2012-02-22 Thread Stephen J. Turnbull
Brett Cannon writes: I think that's inviting trouble if you can provide the seed. It leads to a false sense of security I thought the point of providing the seed was for reproducability of tests and the like? As for false sense, can't we document this and chalk up hubristic behavior to

Re: [Python-Dev] hash randomization in 3.3

2012-02-22 Thread Barry Warsaw
On Feb 22, 2012, at 09:04 PM, Stephen J. Turnbull wrote: Brett Cannon writes: I think that's inviting trouble if you can provide the seed. It leads to a false sense of security I thought the point of providing the seed was for reproducability of tests and the like? As for false sense,

Re: [Python-Dev] hash randomization in 3.3

2012-02-22 Thread Antoine Pitrou
On Wed, 22 Feb 2012 12:59:33 -0500 Barry Warsaw ba...@python.org wrote: On Feb 22, 2012, at 09:04 PM, Stephen J. Turnbull wrote: Brett Cannon writes: I think that's inviting trouble if you can provide the seed. It leads to a false sense of security I thought the point of providing

Re: [Python-Dev] hash randomization in 3.3

2012-02-22 Thread Terry Reedy
On 2/22/2012 1:57 AM, Nick Coghlan wrote: In the tracker, someone proposed that the option is necessary to synchronize the seed across processes in a cluster. I'm sure people will use it for that if they can. Yeah, that use case sounds reasonable, too. Another example is that, even within a

Re: [Python-Dev] hash randomization in 3.3

2012-02-22 Thread Stephen J. Turnbull
Antoine Pitrou writes: How is it a false sense of security at all? It's the same as setting a private secret for e.g. session cookies in Web applications. As long as you don't leak the seed, it's (should be) secure. That's true. The problem is, the precondition that you won't leak the

Re: [Python-Dev] hash randomization in 3.3

2012-02-21 Thread Benjamin Peterson
2012/2/21 Antoine Pitrou solip...@pitrou.net: Hello, Shouldn't it be enabled by default in 3.3? Should you be able to disable it? -- Regards, Benjamin ___ Python-Dev mailing list Python-Dev@python.org

Re: [Python-Dev] hash randomization in 3.3

2012-02-21 Thread Antoine Pitrou
On Tue, 21 Feb 2012 14:58:41 -0500 Benjamin Peterson benja...@python.org wrote: 2012/2/21 Antoine Pitrou solip...@pitrou.net: Hello, Shouldn't it be enabled by default in 3.3? Should you be able to disable it? PYTHONHASHSEED=0 should disable it. Do we also need a command-line option?

Re: [Python-Dev] hash randomization in 3.3

2012-02-21 Thread Benjamin Peterson
2012/2/21 Antoine Pitrou solip...@pitrou.net: On Tue, 21 Feb 2012 14:58:41 -0500 Benjamin Peterson benja...@python.org wrote: 2012/2/21 Antoine Pitrou solip...@pitrou.net: Hello, Shouldn't it be enabled by default in 3.3? Should you be able to disable it? PYTHONHASHSEED=0 should

Re: [Python-Dev] hash randomization in 3.3

2012-02-21 Thread Glenn Linderman
On 2/21/2012 11:58 AM, Benjamin Peterson wrote: 2012/2/21 Antoine Pitrousolip...@pitrou.net: Hello, Shouldn't it be enabled by default in 3.3? Should you be able to disable it? Yes, absolutely. ___ Python-Dev mailing list Python-Dev@python.org

Re: [Python-Dev] hash randomization in 3.3

2012-02-21 Thread Brett Cannon
On Tue, Feb 21, 2012 at 15:05, Barry Warsaw ba...@python.org wrote: On Feb 21, 2012, at 02:58 PM, Benjamin Peterson wrote: 2012/2/21 Antoine Pitrou solip...@pitrou.net: Hello, Shouldn't it be enabled by default in 3.3? Yes. Should you be able to disable it? No, but you should be

Re: [Python-Dev] hash randomization in 3.3

2012-02-21 Thread Benjamin Peterson
2012/2/21 Antoine Pitrou solip...@pitrou.net: Hello, Shouldn't it be enabled by default in 3.3? I've now enabled it by default in 3.3. -- Regards, Benjamin ___ Python-Dev mailing list Python-Dev@python.org

Re: [Python-Dev] hash randomization in 3.3

2012-02-21 Thread Xavier Morel
On 2012-02-21, at 21:24 , Brett Cannon wrote: On Tue, Feb 21, 2012 at 15:05, Barry Warsaw ba...@python.org wrote: On Feb 21, 2012, at 02:58 PM, Benjamin Peterson wrote: 2012/2/21 Antoine Pitrou solip...@pitrou.net: Hello, Shouldn't it be enabled by default in 3.3? Yes. Should

Re: [Python-Dev] hash randomization in 3.3

2012-02-21 Thread Brett Cannon
On Tue, Feb 21, 2012 at 15:58, Xavier Morel python-...@masklinn.net wrote: On 2012-02-21, at 21:24 , Brett Cannon wrote: On Tue, Feb 21, 2012 at 15:05, Barry Warsaw ba...@python.org wrote: On Feb 21, 2012, at 02:58 PM, Benjamin Peterson wrote: 2012/2/21 Antoine Pitrou

Re: [Python-Dev] hash randomization in 3.3

2012-02-21 Thread Barry Warsaw
On Feb 21, 2012, at 09:58 PM, Xavier Morel wrote: On 2012-02-21, at 21:24 , Brett Cannon wrote: On Tue, Feb 21, 2012 at 15:05, Barry Warsaw ba...@python.org wrote: On Feb 21, 2012, at 02:58 PM, Benjamin Peterson wrote: 2012/2/21 Antoine Pitrou solip...@pitrou.net: Hello, Shouldn't it

Re: [Python-Dev] hash randomization in 3.3

2012-02-21 Thread Martin v. Löwis
Am 21.02.2012 20:59, schrieb Antoine Pitrou: On Tue, 21 Feb 2012 14:58:41 -0500 Benjamin Peterson benja...@python.org wrote: 2012/2/21 Antoine Pitrou solip...@pitrou.net: Hello, Shouldn't it be enabled by default in 3.3? Should you be able to disable it? PYTHONHASHSEED=0 should disable

Re: [Python-Dev] hash randomization in 3.3

2012-02-21 Thread Martin v. Löwis
Should you be able to disable it? No, but you should be able to provide a seed. Why exactly is that? We should take an attitude that Python hash values are completely arbitrary and can change at any point without notice. The only strict requirement should be that hashing must be consistent

Re: [Python-Dev] hash randomization in 3.3

2012-02-21 Thread Antoine Pitrou
On Tue, 21 Feb 2012 22:51:48 +0100 Martin v. Löwis mar...@v.loewis.de wrote: Am 21.02.2012 20:59, schrieb Antoine Pitrou: On Tue, 21 Feb 2012 14:58:41 -0500 Benjamin Peterson benja...@python.org wrote: 2012/2/21 Antoine Pitrou solip...@pitrou.net: Hello, Shouldn't it be enabled by

Re: [Python-Dev] hash randomization in 3.3

2012-02-21 Thread Nick Coghlan
On Wed, Feb 22, 2012 at 8:07 AM, Antoine Pitrou solip...@pitrou.net wrote: On Tue, 21 Feb 2012 22:51:48 +0100 Martin v. Löwis mar...@v.loewis.de wrote: On the contrary. PYTHONHASHSEED should go in 3.3, as should any facility to disable or otherwise fix the seed. Being able to reproduce exact

Re: [Python-Dev] hash randomization in 3.3

2012-02-21 Thread martin
I'm with Antoine here - being able to force a particular seed still matters for testing purposes. However, the documentation of the option may need to be updated for 3.3 to emphasise that it should only be used to reproduce sporadic failures. Using it to work around applications that can't cope

Re: [Python-Dev] hash randomization in 3.3

2012-02-21 Thread Nick Coghlan
On Wed, Feb 22, 2012 at 3:20 PM, mar...@v.loewis.de wrote: I'm with Antoine here - being able to force a particular seed still matters for testing purposes. However, the documentation of the option may need to be updated for 3.3 to emphasise that it should only be used to reproduce sporadic