[Python-Dev] Issue 13703 is closed for the Python 2.6 branch

Gregory P. Smith greg at krypto.org
Wed Feb 22 23:05:07 CET 2012


On Wed, Feb 22, 2012 at 10:14 AM, Barry Warsaw <barry at python.org> wrote:
> Two more small details to address, and then I think we're ready to start
> creating release candidates.
>
>  - sys.flags.hash_randomization
>
>   In the tracker issue, I had previously stated a preference that this flag
>   only reflect the state of the -R command line option, not the
>   $PYTHONHASHSEED environment variable.  Well, that's not the way other
>   options/envars such as -O/$PYTHONOPTIMIZE work.  sys.flags.optimize gets
>   set if either of those two things set it, so sys.flags.hash_randomization
>   needs to follow that convention.  Thus no change is necessary here.
>
>  - sys.hash_seed
>
>   In the same tracker issue, I expressed my opinion that the hash seed should
>   be exposed in sys.hash_seed for reproducibility.  There's a complication
>   that Victor first mentioned in IRC, but I didn't quite understand the
>   implications of at first.  When PYTHONHASHSEED=random is set, there *is no*
>   hash seed.  We pull random data straight out of urandom and use that
>   directly as the secret, so there's nothing to expose in sys.hash_seed.
>
> In that case, sys.hash_seed is pretty much redundant, since Python code could
> just check getenv('PYTHONHASHSEED') and be done with it.  I don't think
> there's anything useful to expose to Python or communicated between Python
> executables when truly random hash data is used.
>
> Thus, unless there are objections, I consider the current state of the Python
> 2.6 branch to be finished wrt issue 13703.

+10


More information about the Python-Dev mailing list