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-34990: Treat the pyc header's mtime in compileall as an unsigned int #19708
Conversation
I would prefer to mimick importlib._bootstrap_external which uses:
def _pack_uint32(x):
"""Convert a 32-bit integer to little-endian."""
return (int(x) & 0xFFFFFFFF).to_bytes(4, 'little')
See my comments to #9892. If they be addressed it would be merged a long time ago. |
Co-authored-by: Stéphane Wirtel <stephane@wirtel.be>
Updated to just drop the number down to the lower 32-bits like Not sure if the new test I added is safe though, as in can we assume that file-systems in general will support timestamps of larger than 32-bit? |
Misc/NEWS.d/next/Library/2020-04-24-20-39-38.bpo-34990.3SmL9M.rst
Outdated
Show resolved
Hide resolved
@serhiy-storchaka Just a little ping, is this ready to go or are there any other changes that should be made here? |
If you want to schedule another build, you need to add the " |
Sorry, I missed that this PR was not merged yet. |
@ammaraskar, please merge this branch with main. |
Thanks @ammaraskar for the PR, and @serhiy-storchaka for merging it |
…int (pythonGH-19708) Co-authored-by: Stéphane Wirtel <stephane@wirtel.be> (cherry picked from commit bb21e28) Co-authored-by: Ammar Askar <ammar@ammaraskar.com>
GH-27928 is a backport of this pull request to the 3.10 branch. |
GH-27929 is a backport of this pull request to the 3.9 branch. |
…int (pythonGH-19708) Co-authored-by: Stéphane Wirtel <stephane@wirtel.be> (cherry picked from commit bb21e28) Co-authored-by: Ammar Askar <ammar@ammaraskar.com>
Thank you for merging Serhiy, I was asleep when you LGTM'd :) |
Created with @matrixise's blessing to continue their work. This is an alternative to changing the timestamps to 64-bit. Should last for a while.
I didn't update
Tools/checkpyc.py
like the original PR there pending a decision on a bug I made to remove ithttps://bugs.python.org/issue34990
The text was updated successfully, but these errors were encountered: