[Python-Dev] Issue 13703 is closed for the Python 2.6 branch
Barry Warsaw
barry at python.org
Wed Feb 22 19:14:49 CET 2012
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.
Cheers,
-Barry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-dev/attachments/20120222/9e3dd6b6/attachment.pgp>
More information about the Python-Dev
mailing list