<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/cpython-git.git/Lib/compileall.py, branch constant-kind</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-29877: compileall: import ProcessPoolExecutor only when needed (GH-4856)</title>
<updated>2018-11-23T17:06:55+00:00</updated>
<author>
<name>Dustin Spicuzza</name>
<email>dustin@virtualroadside.com</email>
</author>
<published>2018-11-23T17:06:55+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=1d817e4c8259f49602eefe9729743f6d9d748e8d'/>
<id>1d817e4c8259f49602eefe9729743f6d9d748e8d</id>
<content type='text'>
Importing ProcessPoolExecutor may hang or cause an error when the import
accesses urandom on a low resource platform


https://bugs.python.org/issue29877</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Importing ProcessPoolExecutor may hang or cause an error when the import
accesses urandom on a low resource platform


https://bugs.python.org/issue29877</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>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 #28485: Merge single-threading fix from 3.5 into 3.6</title>
<updated>2016-11-05T01:35:25+00:00</updated>
<author>
<name>Martin Panter</name>
<email>vadmium+py@gmail.com</email>
</author>
<published>2016-11-05T01:35:25+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=cee93c3b73a115e9f2982b9210be15c417a482dc'/>
<id>cee93c3b73a115e9f2982b9210be15c417a482dc</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Issue #28485: Check for negative workers even without ProcessPoolExecutor</title>
<updated>2016-11-05T01:11:36+00:00</updated>
<author>
<name>Martin Panter</name>
<email>vadmium+py@gmail.com</email>
</author>
<published>2016-11-05T01:11:36+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=88281ceed02d8f4599cb22f196e40bc30f4fb689'/>
<id>88281ceed02d8f4599cb22f196e40bc30f4fb689</id>
<content type='text'>
This matches the documentation, and passes the test suite when multithreading
is disabled.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This matches the documentation, and passes the test suite when multithreading
is disabled.
</pre>
</div>
</content>
</entry>
<entry>
<title>Issue #28226: compileall now supports pathlib</title>
<updated>2016-09-30T21:54:18+00:00</updated>
<author>
<name>Berker Peksag</name>
<email>berker.peksag@gmail.com</email>
</author>
<published>2016-09-30T21:54:18+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=812a2b65af1897aa9694ff65fc62516a4e10269c'/>
<id>812a2b65af1897aa9694ff65fc62516a4e10269c</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Issue #25768: Make compileall functions return booleans and document</title>
<updated>2015-12-27T21:17:04+00:00</updated>
<author>
<name>Brett Cannon</name>
<email>brett@python.org</email>
</author>
<published>2015-12-27T21:17:04+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=1e3c3e906c9f1fcc463cfb3641d078eec773666f'/>
<id>1e3c3e906c9f1fcc463cfb3641d078eec773666f</id>
<content type='text'>
the return values as well as test them.

Thanks to Nicholas Chammas for the bug report and initial patch.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
the return values as well as test them.

Thanks to Nicholas Chammas for the bug report and initial patch.
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge: #24903: Remove misleading error message to fix regression.</title>
<updated>2015-12-05T04:04:37+00:00</updated>
<author>
<name>R David Murray</name>
<email>rdmurray@bitdance.com</email>
</author>
<published>2015-12-05T04:04:37+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=939614c48c3b0b5adeb408294a032118411ab987'/>
<id>939614c48c3b0b5adeb408294a032118411ab987</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>#24903: Remove misleading error message to fix regression.</title>
<updated>2015-12-05T03:54:38+00:00</updated>
<author>
<name>R David Murray</name>
<email>rdmurray@bitdance.com</email>
</author>
<published>2015-12-05T03:54:38+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=ced699b4c7e79e0a53e3ca7f2d789b761d4a9e76'/>
<id>ced699b4c7e79e0a53e3ca7f2d789b761d4a9e76</id>
<content type='text'>
Before the argparse conversion, compileall would (sometimes) accept multiple
paths when -d was specified.  Afterward, it does not.  The corresponding check
in the original code claimed to prevent multiple *directories* from being
specified...but it didn't really work even to do that.  So this patch fixes
the regression by invoking the consenting adults rule: if you specify a
combination of arguments to compileall that produces files with inconsistent
destdirs (which you could do before), it is on you.

Patch by Jake Garver.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Before the argparse conversion, compileall would (sometimes) accept multiple
paths when -d was specified.  Afterward, it does not.  The corresponding check
in the original code claimed to prevent multiple *directories* from being
specified...but it didn't really work even to do that.  So this patch fixes
the regression by invoking the consenting adults rule: if you specify a
combination of arguments to compileall that produces files with inconsistent
destdirs (which you could do before), it is on you.

Patch by Jake Garver.
</pre>
</div>
</content>
</entry>
<entry>
<title>Issue #23917: Fall back to sequential compilation when ProcessPoolExecutor doesn't exist.</title>
<updated>2015-04-22T06:39:19+00:00</updated>
<author>
<name>Berker Peksag</name>
<email>berker.peksag@gmail.com</email>
</author>
<published>2015-04-22T06:39:19+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=d86ef05a02e820adfd1e3a11cd56d3444d9aa2c9'/>
<id>d86ef05a02e820adfd1e3a11cd56d3444d9aa2c9</id>
<content type='text'>
Patch by Claudiu Popa.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Patch by Claudiu Popa.
</pre>
</div>
</content>
</entry>
</feed>
