bpo-34726: Fix handling of hash-based pycs in zipimport#10327
bpo-34726: Fix handling of hash-based pycs in zipimport#10327serhiy-storchaka merged 3 commits intopython:masterfrom
Conversation
Current support for hash-based bytecode files in `zipimport` is rather sparse, which leads to test failures when the test suite is ran with the ``SOURCE_DATE_EPOCH`` environment variable set. This teaches zipimport to handle hash-based pycs properly.
ncoghlan
left a comment
There was a problem hiding this comment.
The new tests look good to me, and the changes required to make them pass seem sensible.
|
Thanks for the PR @elprans! @serhiy-storchaka @warsaw @brettcannon This looks good to me, but I'd be happier if someone more familiar with the new zipimport code gave it a look before we hit the big green merge button :) |
Misc/NEWS.d/next/Core and Builtins/2018-11-04-18-13-40.bpo-34022.U3btVj.rst
Show resolved
Hide resolved
9297c95 to
a6a5eda
Compare
|
You need to rebuild frozen modules. Run |
|
Done |
These tests are fixed in python/cpython#10327
|
test_zipfile_compiled_checked_hash() fails on Python 3.7: we should backport this bugfix to 3.7, no? |
|
Thanks @elprans for the PR, and @serhiy-storchaka for merging it 🌮🎉.. I'm working now to backport this PR to: 3.7. |
|
Sorry, @elprans and @serhiy-storchaka, I could not cleanly backport this to |
|
Ah, the change cannot be cherry-picked automatically. Maybe because of the generated file. |
|
@vstinner I'll make a backport PR. |
|
It's a bit more difficult than that. In 3.7 |
|
It is easier to skip the test on 3.7. |
These tests are fixed in python/cpython#10327
Current support for hash-based bytecode files in
zipimportis rathersparse, which leads to test failures when the test suite is ran with
the
SOURCE_DATE_EPOCHenvironment variable set.This teaches zipimport to handle hash-based pycs properly.
https://bugs.python.org/issue34022
https://bugs.python.org/issue34726