Issue 40385: Tools/checkpyc.py has been broken since PEP 552 - Python tracker

This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: ammar2, benjamin.peterson
Priority: normal Keywords: patch

Created on 2020-04-25 03:32 by ammar2, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 19709 merged ammar2, 2020-04-25 04:12
Messages (3)
msg367250 - (view) Author: Ammar Askar (ammar2) * (Python committer) Date: 2020-04-25 03:32
Looks like checkpyc.py has been broken since PEP 552 was implemented https://github.com/python/cpython/blob/0e80b561d442769631d66f1cc8813ac30f97378e/Tools/scripts/checkpyc.py#L44-L46

It fails to read the 4 bytes for the `flags` field nor does it handle hash based files. 

Considering it's been broken since 2017 and no one has complained, it might be safe to remove this particular script.
msg367252 - (view) Author: Benjamin Peterson (benjamin.peterson) * (Python committer) Date: 2020-04-25 03:46
I'd vote for axing it.
msg367255 - (view) Author: Benjamin Peterson (benjamin.peterson) * (Python committer) Date: 2020-04-25 04:34
New changeset f82807746d26b4c047f7f3115065f20bb63fb5ff by Ammar Askar in branch 'master':
closes bpo-40385: Remove Tools/scripts/checkpyc.py (GH-19709)
https://github.com/python/cpython/commit/f82807746d26b4c047f7f3115065f20bb63fb5ff