René's URL Explorer Experiment


Title: RustPython 3.13 uses CPython 3.12 magic number 3531 · Issue #6555 · RustPython/RustPython · GitHub

Open Graph Title: RustPython 3.13 uses CPython 3.12 magic number 3531 · Issue #6555 · RustPython/RustPython

X Title: RustPython 3.13 uses CPython 3.12 magic number 3531 · Issue #6555 · RustPython/RustPython

Description: Feature RustPython as of Dec 26, 2025 uses CPython magic number 3531 when it should not. $ cargo run -- -V Python 3.13.0alpha (heads/main:27ab62de4, Dec 26 2025, 11:16:09) [RustPython 0.4.0 with rustc 1.90.0 (1159e78c4 2025-09-14)] $ car...

Open Graph Description: Feature RustPython as of Dec 26, 2025 uses CPython magic number 3531 when it should not. $ cargo run -- -V Python 3.13.0alpha (heads/main:27ab62de4, Dec 26 2025, 11:16:09) [RustPython 0.4.0 with ru...

X Description: Feature RustPython as of Dec 26, 2025 uses CPython magic number 3531 when it should not. $ cargo run -- -V Python 3.13.0alpha (heads/main:27ab62de4, Dec 26 2025, 11:16:09) [RustPython 0.4.0 with ru...

Opengraph URL: https://github.com/RustPython/RustPython/issues/6555

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"RustPython 3.13 uses CPython 3.12 magic number 3531","articleBody":"## Feature\n\nRustPython as of Dec 26, 2025 uses CPython magic number 3531 when it should not. \n\n```\n$ cargo run --  -V\n\nPython 3.13.0alpha (heads/main:27ab62de4, Dec 26 2025, 11:16:09)  [RustPython 0.4.0 with rustc 1.90.0 (1159e78c4 2025-09-14)]\n\n$ cargo run --  -\n\n\u003e\u003e\u003e\u003e\u003e from importlib.util import MAGIC_NUMBER\n\u003e\u003e\u003e\u003e\u003e MAGIC_NUMBER\nb'\\xcb\\r\\r\\n'\n\u003e\u003e\u003e\u003e\u003e import struct\n\u003e\u003e\u003e\u003e\u003e struct.unpack(\"\u003cHcc\", b'\\xcb\\r\\r\\n')[0]\n3531\n```\n\nThis is also reflected in the magic number written in RustPython's bytecode file: \n\n```\n\u003e\u003e\u003e\u003e\u003e import py_compile\n\u003e\u003e\u003e\u003e\u003e py_compile.compile(\"hello.py\", \"hello.pyc\")\n'hello.pyc'\n```\n\n```\n00000000: cb0d 0d0a 0000 0000 3900 5069 1700 0000  ........9.Pi....\n00000010: 6305 0000 0041 003c 0011 014d 0050 0105  c....A.\u003c...M.P..\n00000020: 0000 0001 0000 0000 0000 0001 0000 0006  ................\n00000030: 0000 0001 0000 0006 0000 0001 0000 0006  ................\n00000040: 0000 0001 0000 0006 0000 0001 0000 0000  ................\n00000050: 0000 0000 0000 0000 0008 0000 0068 656c  .............hel\n00000060: 6c6f 2e70 7901 0000 0002 0000 0008 0000  lo.py...........\n00000070: 003c 6d6f 6475 6c65 3e08 0000 003c 6d6f  .\u003cmodule\u003e....\u003cmo\n00000080: 6475 6c65 3e00 0000 0002 0000 0075 0d00  dule\u003e........u..\n00000090: 0000 4865 6c6c 6f2c 2057 6f72 6c64 214e  ..Hello, World!N\n000000a0: 0100 0000 0500 0000 7072 696e 7400 0000  ........print...\n000000b0: 0000 0000 0000 0000 0004 0000 0080 0083  ................\n000000c0: 6000 0000 00  \n```\n\nThe magic number at the beginning of a file is not just a Python convention, but a POSIX file system convention:\n\n```\n$ file hello.pyc\nhello.pyc: Byte-compiled Python module for CPython 3.12 or newer, timestamp-based, .py timestamp: Sat Dec 27 15:50:17 2025 UTC, .py size: 23 bytes\n```\n\nThis is wrong. This file does not run on CPython 3.12; it is neither CPython nor 3.12.\n\nI came across this in extending the cross-version Python interpreter [xdis](https://pypi.org/project/xdis/) to handle RustPython bytecode.\n\n\n## Python Documentation or reference to CPython source code\n\nFrom Python's [PEP 3147](https://peps.python.org/pep-3147/#background) describing Magic numbers:\n\n\u003e The magic number changes whenever Python changes the byte code format, e.g. by adding new byte codes to its virtual machine. This ensures that pyc files built for previous versions of the VM won’t cause problems.\n\nThis implies that if RustPython's 3.13 bytecode format is different from CPython's 3.12 bytecode format, it should not use the same magic number value.\n","author":{"url":"https://github.com/rocky","@type":"Person","name":"rocky"},"datePublished":"2025-12-27T16:10:53.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/6555/RustPython/issues/6555"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:b4ea7315-22a3-4f06-ce89-bcdc6907ed53
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id8E24:21279A:CFA9B1:10C1315:696B2924
html-safe-nonce5c9bced5ccdd48bf3236e0e94af7939b2aace694b22d57012584a6bb92356769
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4RTI0OjIxMjc5QTpDRkE5QjE6MTBDMTMxNTo2OTZCMjkyNCIsInZpc2l0b3JfaWQiOiI4NzgxOTc4OTc5NzU3OTI2NjkyIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmacacfceb8140848a57dabb07c3cf133e746343c71ef2d8069e8613d033b2ec8c67
hovercard-subject-tagissue:3764885480
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/RustPython/RustPython/6555/issue_layout
twitter:imagehttps://opengraph.githubassets.com/caa8c6e6ac815f4a5494eb2545e3496d96a4b3a3b7f90f6e5d66dd33eb54b376/RustPython/RustPython/issues/6555
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/caa8c6e6ac815f4a5494eb2545e3496d96a4b3a3b7f90f6e5d66dd33eb54b376/RustPython/RustPython/issues/6555
og:image:altFeature RustPython as of Dec 26, 2025 uses CPython magic number 3531 when it should not. $ cargo run -- -V Python 3.13.0alpha (heads/main:27ab62de4, Dec 26 2025, 11:16:09) [RustPython 0.4.0 with ru...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamerocky
hostnamegithub.com
expected-hostnamegithub.com
None5f99f7c1d70f01da5b93e5ca90303359738944d8ab470e396496262c66e60b8d
turbo-cache-controlno-preview
go-importgithub.com/RustPython/RustPython git https://github.com/RustPython/RustPython.git
octolytics-dimension-user_id39710557
octolytics-dimension-user_loginRustPython
octolytics-dimension-repository_id135201145
octolytics-dimension-repository_nwoRustPython/RustPython
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id135201145
octolytics-dimension-repository_network_root_nwoRustPython/RustPython
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release82560a55c6b2054555076f46e683151ee28a19bc
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/RustPython/RustPython/issues/6555#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FRustPython%2FRustPython%2Fissues%2F6555
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FRustPython%2FRustPython%2Fissues%2F6555
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=RustPython%2FRustPython
Reloadhttps://github.com/RustPython/RustPython/issues/6555
Reloadhttps://github.com/RustPython/RustPython/issues/6555
Reloadhttps://github.com/RustPython/RustPython/issues/6555
RustPython https://github.com/RustPython
RustPythonhttps://github.com/RustPython/RustPython
Notifications https://github.com/login?return_to=%2FRustPython%2FRustPython
Fork 1.4k https://github.com/login?return_to=%2FRustPython%2FRustPython
Star 21.7k https://github.com/login?return_to=%2FRustPython%2FRustPython
Code https://github.com/RustPython/RustPython
Issues 278 https://github.com/RustPython/RustPython/issues
Pull requests 92 https://github.com/RustPython/RustPython/pulls
Discussions https://github.com/RustPython/RustPython/discussions
Actions https://github.com/RustPython/RustPython/actions
Projects 0 https://github.com/RustPython/RustPython/projects
Wiki https://github.com/RustPython/RustPython/wiki
Security Uh oh! There was an error while loading. Please reload this page. https://github.com/RustPython/RustPython/security
Please reload this pagehttps://github.com/RustPython/RustPython/issues/6555
Insights https://github.com/RustPython/RustPython/pulse
Code https://github.com/RustPython/RustPython
Issues https://github.com/RustPython/RustPython/issues
Pull requests https://github.com/RustPython/RustPython/pulls
Discussions https://github.com/RustPython/RustPython/discussions
Actions https://github.com/RustPython/RustPython/actions
Projects https://github.com/RustPython/RustPython/projects
Wiki https://github.com/RustPython/RustPython/wiki
Security https://github.com/RustPython/RustPython/security
Insights https://github.com/RustPython/RustPython/pulse
New issuehttps://github.com/login?return_to=https://github.com/RustPython/RustPython/issues/6555
New issuehttps://github.com/login?return_to=https://github.com/RustPython/RustPython/issues/6555
#6638https://github.com/RustPython/RustPython/pull/6638
RustPython 3.13 uses CPython 3.12 magic number 3531https://github.com/RustPython/RustPython/issues/6555#top
#6638https://github.com/RustPython/RustPython/pull/6638
C-compatA discrepancy between RustPython and CPythonhttps://github.com/RustPython/RustPython/issues?q=state%3Aopen%20label%3A%22C-compat%22
https://github.com/rocky
https://github.com/rocky
rockyhttps://github.com/rocky
on Dec 27, 2025https://github.com/RustPython/RustPython/issues/6555#issue-3764885480
xdishttps://pypi.org/project/xdis/
PEP 3147https://peps.python.org/pep-3147/#background
C-compatA discrepancy between RustPython and CPythonhttps://github.com/RustPython/RustPython/issues?q=state%3Aopen%20label%3A%22C-compat%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.