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-10.16:59:22
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1486745964.0.0.186467108997.issue29514@psf.upfronthosting.co.za>
In-reply-to
Content
There are a couple of pieces to it:

- first, there's the problem of breaking anyone that actually is doing pyc-only distribution, even though nothing in Fedora itself does that. While that aspect doesn't break Fedora per se, it does break Fedora's compatibility expectations for end user components, which maintenance updates shouldn't do

- however, more importantly in this case, ordinary users don't have write access to the system site-packages directory, so the pyc files have to be pre-compiled when generating the system RPMs.

While CPython falls back to the slow path of recompiling from source when those precompiled files are invalidated so nothing obviously breaks, it still generates a lot of SELinux warnings related to unauthorised write attempts to system-owned directories: https://bodhi.fedoraproject.org/updates/python3-3.5.3-1.fc25%20python3-docs-3.5.3-1.fc25#comment-559458

(Debian uses a similar pre-compilation trick for the same reasons, so I expect you'd also see comparable warnings under AppArmor if packages weren't rebuilt after a magic number change)

This all means that CPython changing the magic number in a maintenance release ends up being akin to breaking the C ABI in a maintenance release - while it isn't quite as dire (since there's still the slow path fallback to recompiling from source), it does still invalidate all of the pyc files in the system RPMs until they're rebuilt against the new version. "Requires a mass rebuild of all the Python packages in the distro to get things working properly again" is again a major concern for what's nominally a low impact maintenance update.

I realise those consequences aren't particularly obvious for non-distro developers, which is why I'd like to see the previous policy of "don't change the magic number in maintenance releases" captured as a test case.
History
Date User Action Args
2017-02-10 16:59:24ncoghlansetrecipients: + ncoghlan, barry, brett.cannon, doko, petr.viktorin
2017-02-10 16:59:23ncoghlansetmessageid: <1486745964.0.0.186467108997.issue29514@psf.upfronthosting.co.za>
2017-02-10 16:59:23ncoghlanlinkissue29514 messages
2017-02-10 16:59:22ncoghlancreate