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.

Author ncoghlan
Recipients barry, brett.cannon, doko, ncoghlan, petr.viktorin
Date 2017-02-09.15:30:09
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1486654210.44.0.116789566768.issue29514@psf.upfronthosting.co.za>
In-reply-to
Content
The magic number change in 3.5.3 broke the world when Fedora attempted to rebase from 3.5.2, but upstream CPython developers don't currently get an automated notification that it isn't permitted to change the magic number in a maintenance release - instead, the current approach relies on people "just knowing" not to do that, and we just saw the limitations of relying on the code review process to catch this particular problem.


I think we can keep this from happening again by having an importlib test case that fails if sys.version_info.releaselevel is "candidate" or "final" and either:

- no "expected magic number" is defined; or
- the actual magic number in importlib.util.MAGIC_NUMBER doesn't match the expected one

The comments on the new test case would then explain the policy and why it isn't OK to break pyc file compatibility in a maintenance release.

We'd also propose an update to the release PEP warning release managers to expect this error as part of prepping the first release candidate, and that they should lock in the magic number for the release at that time.
History
Date User Action Args
2017-02-09 15:30:10ncoghlansetrecipients: + ncoghlan, barry, brett.cannon, doko, petr.viktorin
2017-02-09 15:30:10ncoghlansetmessageid: <1486654210.44.0.116789566768.issue29514@psf.upfronthosting.co.za>
2017-02-09 15:30:10ncoghlanlinkissue29514 messages
2017-02-09 15:30:09ncoghlancreate