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, ishcherb, larry, mark.dickinson, ncoghlan, petr.viktorin, serhiy.storchaka
Date 2017-02-24.08:23:36
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1487924617.57.0.610943227002.issue29537@psf.upfronthosting.co.za>
In-reply-to
Content
I updated the PR to cover both Serhiy's change to make the legacy bytecode safe to interpret, and a tweaked version of Petr's change to allow the legacy bytecode to be imported.

The main tweaks to the latter were:

- more in depth comments explaining the changes
- switching the C level changes to rely on a couple of extern variables exported from import.c rather than scattering the backwards compatibility numbers throughout the code

I'm also cc'ing Larry into the discussion as 3.5 release manager. Larry, most of the context for this change is actually in http://bugs.python.org/issue29514 where we reported the problems with the magic number change that prompted Petr to create a downstream patch for Fedora to restore compatibility with the legacy bytecode magic number.

While the answer for 3.6+ is "Let's try to avoid ever doing this again", it turns out this is tricky enough to handle that it would be nice to have a shared solution upstream in 3.5.4+ that redistributors can collectively adopt, rather than everyone needing to come up with their own workaround for the problem.
History
Date User Action Args
2017-02-24 08:23:37ncoghlansetrecipients: + ncoghlan, barry, mark.dickinson, larry, petr.viktorin, serhiy.storchaka, ishcherb
2017-02-24 08:23:37ncoghlansetmessageid: <1487924617.57.0.610943227002.issue29537@psf.upfronthosting.co.za>
2017-02-24 08:23:37ncoghlanlinkissue29537 messages
2017-02-24 08:23:36ncoghlancreate