[2.7] bpo-25083: Python 2 can sometimes create incorrect .pyc files#8449
[2.7] bpo-25083: Python 2 can sometimes create incorrect .pyc files#8449encukou merged 1 commit into
Conversation
|
backport-pr is failing, because this is a Python 2 only issue. |
Sorry, something went wrong.
|
This looks good except for the use of |
Sorry, something went wrong.
|
And don't worry about the backport title check; that's for the person who'll merge this. |
Sorry, something went wrong.
|
Done. |
Sorry, something went wrong.
|
Here is a script to check for the bug: |
Sorry, something went wrong.
|
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
Sorry, something went wrong.
Python 2 never checked for I/O error when reading .py files and thus could mistake an I/O error for EOF and create incorrect .pyc files. This adds an check for this and aborts on an error.
|
I have made the requested changes; please review again |
Sorry, something went wrong.
|
Thanks for making the requested changes! @vstinner: please review the changes made to this pull request. |
Sorry, something went wrong.
vstinner
left a comment
There was a problem hiding this comment.
LGTM, but I would prefer that someone else merge it.
Sorry, something went wrong.
|
@encukou I'm waiting for the convincing part :) I think it's best to merge this ASAP (if it's plan to be used), so it has maximum exposure before a new release. |
Sorry, something went wrong.
Python 2 never checked for I/O error when reading .py files and
thus could mistake an I/O error for EOF and create incorrect .pyc
files. This adds an check for this and aborts on an error.
https://bugs.python.org/issue25083