FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-128089: Bump the PYC magic number by JelleZijlstra · Pull Request #128097 · python/cpython · GitHub

Repository navigation

gh-128089: Bump the PYC magic number - #128097

Merged
vstinner merged 3 commits into
python:mainfrom
JelleZijlstra:bump-magic
Jan 6, 2025
Merged

vstinner merged 3 commits into
python:mainfrom
JelleZijlstra:bump-magic

Conversation

JelleZijlstra commented Dec 19, 2024 •
edited by bedevere-app Bot
Loading

Copy link
Copy Markdown
Member

merwok changed the title gh-128089: Bump the magic number gh-128089: Bump the PYC magic number Dec 19, 2024

vstinner left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

LGTM

Copy link
Copy Markdown
Member Author

Unrelated failure in test_glob

======================================================================
FAIL: test_selflink (test.test_glob.SymlinkLoopGlobTests.test_selflink)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/runner/work/cpython/cpython-ro-srcdir/Lib/test/test_glob.py", line 543, in test_selflink
    self.assertIn(path, results)
    ~~~~~~~~~~~~~^^^^^^^^^^^^^^^
AssertionError: 'dir/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/file' not found in {'dir/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/file', 'dir/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/file', 'dir/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/link/file'}

Copy link
Copy Markdown
Member

I re-ran the failed job.

Copy link
Copy Markdown
Member Author

Seems like another PR bumping the magic number just went in. Is it still worth it to merge this change @hroncok? I could bump the number further but then the patch wouldn't apply cleanly to 3.14a3 anyway.

Eclips4 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

LGTM, but it seems to have a merging conflict now. By looking at d2f1d91, it appears that d2f1d91 should use Python 3.14a4 instead of Python 3.14a3, is that right?

hroncok commented Dec 19, 2024

Copy link
Copy Markdown
Contributor

Ah. We cannot backport a version bump that would be equal to a4, or else we'll have the same problem when a4 is out.

hroncok commented Dec 19, 2024

Copy link
Copy Markdown
Contributor

But we can take this, make it 3610. The main branch already had 3611 it seems.

Copy link
Copy Markdown
Member Author

Main is still on 3610, so it's possible the next alpha will get released with that number.

Copy link
Copy Markdown
Member

Since the magic number was bumped to 3610 by another change, I suggest to not bump the magic number again. Maybe just change the magic number comment to mention annotationlib?

Copy link
Copy Markdown
Member

Or if you still want to increase the magic number, maybe the NOT_TAKEN instruction should get 3611, and annotationlib should get 3610. I don't know :-(

hroncok commented Dec 20, 2024

Copy link
Copy Markdown
Contributor

Main is still on 3610...

#define PYC_MAGIC_NUMBER 3611

Copy link
Copy Markdown
Member Author

Oh right, the last comment is for 3610 but the actual number is 3611.

Copy link
Copy Markdown
Member Author

Apparently 3610 was accidentally skipped (#128115). Which gives us the opportunity to retcon 3610 into being the annotations change.

befeleme commented Jan 6, 2025

Copy link
Copy Markdown
Contributor

Hello, is there any chance this could be merged? Or what's the plan forward?

vstinner left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

The NEWS entry is outdated:

Bump the PYC magic number for an internal change in annotate functions. The
magic number should have been increased in release 3.14a3. Users running
3.14a3 with PYC files generated using earlier alphas may run into problems.

I suggest to remove it.

vstinner enabled auto-merge (squash) January 6, 2025 10:08

vstinner commented Jan 6, 2025

Copy link
Copy Markdown
Member

I enabled auto-merge.

vstinner merged commit d50fa05 into python:main Jan 6, 2025

vstinner commented Jan 6, 2025

Copy link
Copy Markdown
Member

@befeleme: magic number 3610 is now assigned to annotationlib VALUE_WITH_FAKE_GLOBALS. You can backport this change to alpha3 if you want.

vstinner commented Jan 6, 2025

Copy link
Copy Markdown
Member

PR merged, thanks @JelleZijlstra.

befeleme commented Jan 6, 2025

Copy link
Copy Markdown
Contributor

@befeleme: magic number 3610 is now assigned to annotationlib VALUE_WITH_FAKE_GLOBALS. You can backport this change to alpha3 if you want.

Thank you

srinivasreddy pushed a commit to srinivasreddy/cpython that referenced this pull request Jan 8, 2025
…thon#128097)

Assign 3610 PYC magic number to VALUE_WITH_FAKE_GLOBALS
format of annotationlib.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants


Back | FazBrowse Home | New Git URL