<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/cpython-git.git/Lib/py_compile.py, branch fix-cf-feature-versiob</title>
<subtitle>github.com: python/cpython.git
</subtitle>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/'/>
<entry>
<title>bpo-22640: Add silent mode to py_compile.compile() (GH-12976)</title>
<updated>2019-05-28T16:29:04+00:00</updated>
<author>
<name>Joannah Nanjekye</name>
<email>33177550+nanjekyejoannah@users.noreply.github.com</email>
</author>
<published>2019-05-28T16:29:04+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=2e33ecd7c9b0cac3efc6fcbdd4547fd086b4e2d1'/>
<id>2e33ecd7c9b0cac3efc6fcbdd4547fd086b4e2d1</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-34022: Stop forcing of hash-based invalidation with SOURCE_DATE_EPOCH (GH-9607)</title>
<updated>2018-10-10T16:43:14+00:00</updated>
<author>
<name>Elvis Pranskevichus</name>
<email>elvis@magic.io</email>
</author>
<published>2018-10-10T16:43:14+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=a6b3ec5b6d4f6387820fccc570eea08b9615620d'/>
<id>a6b3ec5b6d4f6387820fccc570eea08b9615620d</id>
<content type='text'>
Unconditional forcing of ``CHECKED_HASH`` invalidation was introduced in
3.7.0 in bpo-29708.  The change is bad, as it unconditionally overrides
*invalidation_mode*, even if it was passed as an explicit argument to
``py_compile.compile()`` or ``compileall``.  An environment variable
should *never* override an explicit argument to a library function.
That change leads to multiple test failures if the ``SOURCE_DATE_EPOCH``
environment variable is set.

This changes ``py_compile.compile()`` to only look at
``SOURCE_DATE_EPOCH`` if no explicit *invalidation_mode* was specified.
I also made various relevant tests run with explicit control over the
value of ``SOURCE_DATE_EPOCH``.

While looking at this, I noticed that ``zipimport`` does not work
with hash-based .pycs _at all_, though I left the fixes for
subsequent commits.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Unconditional forcing of ``CHECKED_HASH`` invalidation was introduced in
3.7.0 in bpo-29708.  The change is bad, as it unconditionally overrides
*invalidation_mode*, even if it was passed as an explicit argument to
``py_compile.compile()`` or ``compileall``.  An environment variable
should *never* override an explicit argument to a library function.
That change leads to multiple test failures if the ``SOURCE_DATE_EPOCH``
environment variable is set.

This changes ``py_compile.compile()`` to only look at
``SOURCE_DATE_EPOCH`` if no explicit *invalidation_mode* was specified.
I also made various relevant tests run with explicit control over the
value of ``SOURCE_DATE_EPOCH``.

While looking at this, I noticed that ``zipimport`` does not work
with hash-based .pycs _at all_, though I left the fixes for
subsequent commits.</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-29708: Setting SOURCE_DATE_EPOCH forces hash-based .pyc files (GH-5200)</title>
<updated>2018-01-24T21:26:18+00:00</updated>
<author>
<name>Bernhard M. Wiedemann</name>
<email>githubbmw@lsmod.de</email>
</author>
<published>2018-01-24T21:26:18+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=ccbe5818af20f8c12043f5c30c277a74714405e0'/>
<id>ccbe5818af20f8c12043f5c30c277a74714405e0</id>
<content type='text'>
To support reproducible builds, the setting of of SOURCE_DATE_EPOCH triggers the py_compile module -- and by extension, compileall -- to forcibly compile with hash-based .pyc files. This eliminates the possibility of timestamp-based .pyc files which vary between builds.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
To support reproducible builds, the setting of of SOURCE_DATE_EPOCH triggers the py_compile module -- and by extension, compileall -- to forcibly compile with hash-based .pyc files. This eliminates the possibility of timestamp-based .pyc files which vary between builds.</pre>
</div>
</content>
</entry>
<entry>
<title>closes bpo-31650: PEP 552 (Deterministic pycs) implementation (#4575)</title>
<updated>2017-12-09T18:26:52+00:00</updated>
<author>
<name>Benjamin Peterson</name>
<email>benjamin@python.org</email>
</author>
<published>2017-12-09T18:26:52+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=42aa93b8ff2f7879282b06efc73a31ec7785e602'/>
<id>42aa93b8ff2f7879282b06efc73a31ec7785e602</id>
<content type='text'>
Python now supports checking bytecode cache up-to-dateness with a hash of the
source contents rather than volatile source metadata. See the PEP for details.

While a fairly straightforward idea, quite a lot of code had to be modified due
to the pervasiveness of pyc implementation details in the codebase. Changes in
this commit include:

- The core changes to importlib to understand how to read, validate, and
  regenerate hash-based pycs.

- Support for generating hash-based pycs in py_compile and compileall.

- Modifications to our siphash implementation to support passing a custom
  key. We then expose it to importlib through _imp.

- Updates to all places in the interpreter, standard library, and tests that
  manually generate or parse pyc files to grok the new format.

- Support in the interpreter command line code for long options like
  --check-hash-based-pycs.

- Tests and documentation for all of the above.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Python now supports checking bytecode cache up-to-dateness with a hash of the
source contents rather than volatile source metadata. See the PEP for details.

While a fairly straightforward idea, quite a lot of code had to be modified due
to the pervasiveness of pyc implementation details in the codebase. Changes in
this commit include:

- The core changes to importlib to understand how to read, validate, and
  regenerate hash-based pycs.

- Support for generating hash-based pycs in py_compile and compileall.

- Modifications to our siphash implementation to support passing a custom
  key. We then expose it to importlib through _imp.

- Updates to all places in the interpreter, standard library, and tests that
  manually generate or parse pyc files to grok the new format.

- Support in the interpreter command line code for long options like
  --check-hash-based-pycs.

- Tests and documentation for all of the above.
</pre>
</div>
</content>
</entry>
<entry>
<title>Issue #23911: Move path-based bootstrap code to a separate frozen module.</title>
<updated>2015-05-03T01:15:18+00:00</updated>
<author>
<name>Eric Snow</name>
<email>ericsnowcurrently@gmail.com</email>
</author>
<published>2015-05-03T01:15:18+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=32439d6eb63f1ea31aed1e45459f0f50f965ef51'/>
<id>32439d6eb63f1ea31aed1e45459f0f50f965ef51</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Issue #23811: Add missing newline to the PyCompileError error message.</title>
<updated>2015-04-14T15:58:45+00:00</updated>
<author>
<name>Berker Peksag</name>
<email>berker.peksag@gmail.com</email>
</author>
<published>2015-04-14T15:58:45+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=012e287081f85feebe0a49c73de8b4a84f0a1b02'/>
<id>012e287081f85feebe0a49c73de8b4a84f0a1b02</id>
<content type='text'>
Patch by Alex Shkop.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Patch by Alex Shkop.
</pre>
</div>
</content>
</entry>
<entry>
<title>Issue #23811: Add missing newline to the PyCompileError error message.</title>
<updated>2015-04-14T15:57:55+00:00</updated>
<author>
<name>Berker Peksag</name>
<email>berker.peksag@gmail.com</email>
</author>
<published>2015-04-14T15:57:55+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=34c9be7ebdc135e38914d161b028f5b56bf00642'/>
<id>34c9be7ebdc135e38914d161b028f5b56bf00642</id>
<content type='text'>
Patch by Alex Shkop.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Patch by Alex Shkop.
</pre>
</div>
</content>
</entry>
<entry>
<title>Issue #23731: Implement PEP 488.</title>
<updated>2015-04-13T18:21:02+00:00</updated>
<author>
<name>Brett Cannon</name>
<email>brett@python.org</email>
</author>
<published>2015-04-13T18:21:02+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=f299abdafa0f2b6eb7abae274861b19b361c96bc'/>
<id>f299abdafa0f2b6eb7abae274861b19b361c96bc</id>
<content type='text'>
The concept of .pyo files no longer exists. Now .pyc files have an
optional `opt-` tag which specifies if any extra optimizations beyond
the peepholer were applied.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The concept of .pyo files no longer exists. Now .pyc files have an
optional `opt-` tag which specifies if any extra optimizations beyond
the peepholer were applied.
</pre>
</div>
</content>
</entry>
<entry>
<title>Issue #17222: fix a mix-up in some exception messages.</title>
<updated>2013-06-17T21:48:30+00:00</updated>
<author>
<name>Brett Cannon</name>
<email>brett@python.org</email>
</author>
<published>2013-06-17T21:48:30+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=9674bd0a94dc487dba151636152e9f9fe67b35cc'/>
<id>9674bd0a94dc487dba151636152e9f9fe67b35cc</id>
<content type='text'>
Reported by Arfrever Frehtes Taifersar Arahesis.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Reported by Arfrever Frehtes Taifersar Arahesis.
</pre>
</div>
</content>
</entry>
<entry>
<title>Issue #17177: Stop using imp with py_compile</title>
<updated>2013-06-15T18:07:21+00:00</updated>
<author>
<name>Brett Cannon</name>
<email>brett@python.org</email>
</author>
<published>2013-06-15T18:07:21+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=df960682a5d2d224627c0aaad77279f749af70ba'/>
<id>df960682a5d2d224627c0aaad77279f749af70ba</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
