Merge branch 'master' of github.com:python/peps

This commit is contained in:
Barry Warsaw 2017-09-07 11:39:08 -07:00
commit bc4e02f147
1 changed files with 6 additions and 6 deletions

View File

@ -60,12 +60,12 @@ version. One magic number will correspond to the current pyc format and the
other to "hash-based" pycs introduced by this PEP. other to "hash-based" pycs introduced by this PEP.
In hash-based pycs, the second field in the pyc header (currently the In hash-based pycs, the second field in the pyc header (currently the
"timestamp" field) will contain the SipHash_ of the contents of the source "timestamp" field) will contain the SipHash_ (with a hardcoded key) of the
file. Another a fast hash like MD5 or BLAKE2_ would also work. We choose SipHash contents of the source file. Another a fast hash like MD5 or BLAKE2_ would also
because Python already has a builtin implementation of it from :pep:`456`. The work. We choose SipHash because Python already has a builtin implementation of
third field in the pyc header (currently the "source size" field) will become a it from :pep:`456`. The third field in the pyc header (currently the "source
bitset of flags. We define the lowest flag in this bitset called size" field) will become a bitset of flags. We define the lowest flag in this
``check_source`` bitset called ``check_source``
When Python encounters a hash-based pyc, its behavior depends on the setting of When Python encounters a hash-based pyc, its behavior depends on the setting of
the ``check_source`` flag. If the ``check_source`` flag is set, Python will the ``check_source`` flag. If the ``check_source`` flag is set, Python will