New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bpo-34726: Fix handling of hash-based pycs in zipimport #10327
bpo-34726: Fix handling of hash-based pycs in zipimport #10327
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
zipimport
is rathersparse, 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.
https://bugs.python.org/issue34022
https://bugs.python.org/issue34726