Heads-up: .pyc magic number change in 3.14.0rc2

Hello,
There’s a bug in 3.14.0rc1 code generation that will probably require bumping the importlib magic number. [edit: PR is merged; this is happening]
This means that if you distribute .pyc files, you will need to re-build them with 3.14.0rc2.
(If you don’t know whether you’re distributing .pyc files, you probably aren’t. Wheels on PyPI are generally not affected.)

Long version: If we bump the number, __pycache__/*.pyc files compiled for rc1 won’t be usable in rc2. Python will re-compile them automatically, so this will only affect you if the user running the code doesn’t have permissions to the __pycache__ directories – typically, if they’re installed in a read-only, “system-wide” or otherwise shared location. In that case, Python will skip writing the cache, making repeated imports slow. In the past, we also saw security warnings due to failed attemps to write to such “shared” locations.

7 Likes

Wow, glad we caught it now!

2 Likes

Let’s do an extra release candidate for this: Early 3.14.0 rc2 and extra rc3

3 Likes

This is now out, please test: