René's URL Explorer Experiment


Title: Fix clang-cl version in sys.version on Windows · Issue #157368 · python/cpython · GitHub

Open Graph Title: Fix clang-cl version in sys.version on Windows · Issue #157368 · python/cpython

X Title: Fix clang-cl version in sys.version on Windows · Issue #157368 · python/cpython

Description: Bug report Bug description: Since version 22, clang-cl on Windows includes the repo url and commit hash in __clang_version__ like 22.1.3 (https://github.com/llvm/llvm-project e9846648fd6183ee6d8cbdb4502213fcf902a211) versus just 21.1.4. ...

Open Graph Description: Bug report Bug description: Since version 22, clang-cl on Windows includes the repo url and commit hash in __clang_version__ like 22.1.3 (https://github.com/llvm/llvm-project e9846648fd6183ee6d8cbd...

X Description: Bug report Bug description: Since version 22, clang-cl on Windows includes the repo url and commit hash in __clang_version__ like 22.1.3 (https://github.com/llvm/llvm-project e9846648fd6183ee6d8cbd...

Opengraph URL: https://github.com/python/cpython/issues/157368

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Fix clang-cl version in sys.version on Windows","articleBody":"# Bug report\n\n### Bug description:\n\nSince version 22, clang-cl on Windows includes the repo url and commit hash in `__clang_version__` like\n```\n22.1.3 (https://github.com/llvm/llvm-project e9846648fd6183ee6d8cbdb4502213fcf902a211)\n```\nversus just `21.1.4`. before.\n\u003cdetails>\u003csummary>This results in sys.version being truncated\u003c/summary>\n\u003cp>\n\n`__clang_version__` is used in\nhttps://github.com/python/cpython/blob/7bfa97f4dca58ab45def2ca0a1e8088997a4fa0b/PC/pyconfig.h#L161\nexposed via [getcompiler.c](https://github.com/python/cpython/blob/main/Python/getcompiler.c) and then truncated in\nhttps://github.com/python/cpython/blob/7bfa97f4dca58ab45def2ca0a1e8088997a4fa0b/Python/getversion.c#L17-L23\n\u003c/p>\n\n\u003c/details> \n\n```\n3.16.0a0 (heads/main:7bfa97f4dc, Sep 12 2026, 16:30:16) [Clang 22.1.3 (https://github.com/llvm/llvm-project e9846648fd6183ee6d8cbdb45022 on win32\n```\nversus\n```\n3.16.0a0 (heads/main:7bfa97f4dc, Sep 12 2026, 16:32:39) [Clang 21.1.4 ] 64 bit (AMD64) with MSC v.1951 CRT] on win32\n```\n\nA lot of code depends on being able to parse the now missing `64 bit (AMD64)` part (https://github.com/python/cpython/issues/145410, https://github.com/python/cpython/issues/154200, https://github.com/python/cpython/issues/154199, ...). Let's restore the old behaviour and fix the stray ` ]` as well:\n\n```\n3.16.0a0 (heads/fix_clang_version:e1b196dfab, Sep 12 2026, 16:28:42) [Clang 22.1.3 64 bit (AMD64) with MSC v.1951 CRT] on win32\n```\n\nThis also fixes the failing `test_single_line_statement` of @zware's [AMD64 Windows Server 2025 Clang 3.x](https://buildbot.python.org/?#/builders/2261/builds/344) buildbot (and would also fix all the failing tests of the [3.14](https://buildbot.python.org/?#/builders/2272/builds/163) and [3.15](https://buildbot.python.org/?#/builders/2258/builds/103) Windows clang buildbots).\n\n### CPython versions tested on:\n\nCPython main branch\n\n### Operating systems tested on:\n\nWindows\n\n\u003c!-- gh-linked-prs -->\n### Linked PRs\n* gh-157369\n* gh-157565\n* gh-157569\n* gh-157606\n\u003c!-- /gh-linked-prs -->\n","author":{"url":"https://github.com/chris-eibl","@type":"Person","name":"chris-eibl"},"datePublished":"2026-09-12T16:57:43Z","url":"https://github.com/python/cpython/issues/157368"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:6e3d1a5a-b677-f604-337f-8bcb623f807c
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idC28E:213839:3B7950B:4BF35AE:6B01F9EF
html-safe-nonceee27d436a2798ce450f856a6adc886696cb11f5292f6f8171b095ee09098ed27
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMjhFOjIxMzgzOTozQjc5NTBCOjRCRjM1QUU6NkIwMUY5RUYiLCJ2aXNpdG9yX2lkIjoiNDAzNzIwMTY0NDM2NTE1MDcwMyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac42a29e7473fbef63fa8e9add2b718d712d23cfa12343f47e9b9600b2a026fc68
hovercard-subject-tagissue:5434748871
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/python/cpython/157368/issue_layout
twitter:imagehttps://opengraph.githubassets.com/8ae13bc48bf1d14aa1aa4aacf1517e33033070d6264a94cdac7604c5d978f72a/python/cpython/issues/157368
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/8ae13bc48bf1d14aa1aa4aacf1517e33033070d6264a94cdac7604c5d978f72a/python/cpython/issues/157368
og:image:altBug report Bug description: Since version 22, clang-cl on Windows includes the repo url and commit hash in __clang_version__ like 22.1.3 (https://github.com/llvm/llvm-project e9846648fd6183ee6d8cbd...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamechris-eibl
hostnamegithub.com
expected-hostnamegithub.com
None87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456
turbo-cache-controlno-preview
go-importgithub.com/python/cpython git https://github.com/python/cpython.git
octolytics-dimension-user_id1525981
octolytics-dimension-user_loginpython
octolytics-dimension-repository_id81598961
octolytics-dimension-repository_nwopython/cpython
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id81598961
octolytics-dimension-repository_network_root_nwopython/cpython
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
release423dbb54c5e7bfecc838eb387c1435eb3d0e760d
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/python/cpython/issues/157368#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fissues%2F157368
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
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
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://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/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fissues%2F157368
Sign uphttps://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=python%2Fcpython
Reloadhttps://github.com/python/cpython/issues/157368
Reloadhttps://github.com/python/cpython/issues/157368
Reloadhttps://github.com/python/cpython/issues/157368
pythonhttps://github.com/python
cpythonhttps://github.com/python/cpython
Codehttps://github.com/python/cpython
Issues5k+ (5k+)https://github.com/python/cpython/issues
Pull requests2.4k (2.4k)https://github.com/python/cpython/pulls
Actionshttps://github.com/python/cpython/actions
Projectshttps://github.com/python/cpython/projects
Security and qualityhttps://github.com/python/cpython/security
Insightshttps://github.com/python/cpython/insights
https://github.com/python/cpython
New issuehttps://github.com/login?return_to=https://github.com/python/cpython/issues/157368
New issuehttps://github.com/login?return_to=https://github.com/python/cpython/issues/157368
Fix clang-cl version in sys.version on Windowshttps://github.com/python/cpython/issues/157368#top
https://github.com/chris-eibl
OS-unsupportedhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22OS-unsupported%22
OS-windowshttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22OS-windows%22
interpreter-core(Objects, Python, Grammar, and Parser dirs)https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22interpreter-core%22
type-bugAn unexpected behavior, bug, or errorhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22type-bug%22
https://github.com/chris-eibl
chris-eiblhttps://github.com/chris-eibl
on Sep 12, 2026https://github.com/python/cpython/issues/157368#issue-5434748871
cpython/PC/pyconfig.hhttps://github.com/python/cpython/blob/7bfa97f4dca58ab45def2ca0a1e8088997a4fa0b/PC/pyconfig.h#L161
7bfa97fhttps://github.com/python/cpython/commit/7bfa97f4dca58ab45def2ca0a1e8088997a4fa0b
getcompiler.chttps://github.com/python/cpython/blob/main/Python/getcompiler.c
cpython/Python/getversion.chttps://github.com/python/cpython/blob/7bfa97f4dca58ab45def2ca0a1e8088997a4fa0b/Python/getversion.c#L17-L23
7bfa97fhttps://github.com/python/cpython/commit/7bfa97f4dca58ab45def2ca0a1e8088997a4fa0b
#145410https://github.com/python/cpython/issues/145410
#154200https://github.com/python/cpython/issues/154200
#154199https://github.com/python/cpython/issues/154199
@zwarehttps://github.com/zware
AMD64 Windows Server 2025 Clang 3.xhttps://buildbot.python.org/#/builders/2261/builds/344
3.14https://buildbot.python.org/#/builders/2272/builds/163
3.15https://buildbot.python.org/#/builders/2258/builds/103
gh-157368: Fix clang-cl version in sys.version on Windows #157369https://github.com/python/cpython/pull/157369
[3.15] gh-157368: Fix clang-cl version in sys.version on Windows (GH-157369) #157565https://github.com/python/cpython/pull/157565
[3.14] gh-157368: Fix clang-cl version in sys.version on Windows (GH-157369) #157569https://github.com/python/cpython/pull/157569
[3.13] gh-157368: Fix clang-cl version in sys.version on Windows (GH-157369) #157606https://github.com/python/cpython/pull/157606
chris-eiblhttps://github.com/chris-eibl
type-bugAn unexpected behavior, bug, or errorhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22type-bug%22
OS-windowshttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22OS-windows%22
interpreter-core(Objects, Python, Grammar, and Parser dirs)https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22interpreter-core%22
OS-unsupportedhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22OS-unsupported%22
on Sep 12, 2026https://github.com/python/cpython/issues/157368#event-31027314773
github-project-automationhttps://github.com/apps/github-project-automation
Unsupported platformshttps://github.com/orgs/python/projects/27
on Sep 12, 2026https://github.com/python/cpython/issues/157368#event-31027344572
StanFromIrelandhttps://github.com/StanFromIreland
OS-unsupportedhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22OS-unsupported%22
on Sep 12, 2026https://github.com/python/cpython/issues/157368#event-31027407562
https://github.com/StanFromIreland
StanFromIrelandhttps://github.com/StanFromIreland
on Sep 12, 2026https://github.com/python/cpython/issues/157368#issuecomment-5647365078
chris-eiblhttps://github.com/chris-eibl
on Sep 12, 2026https://github.com/python/cpython/issues/157368#event-31027462264
https://github.com/chris-eibl
chris-eiblhttps://github.com/chris-eibl
on Sep 12, 2026https://github.com/python/cpython/issues/157368#issuecomment-5647379060
chris-eiblhttps://github.com/chris-eibl
OS-unsupportedhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22OS-unsupported%22
on Sep 12, 2026https://github.com/python/cpython/issues/157368#event-31031087228
https://github.com/chris-eibl
chris-eiblhttps://github.com/chris-eibl
on Sep 12, 2026https://github.com/python/cpython/issues/157368#issuecomment-5648243115
@encukouhttps://github.com/encukou
#154210 (comment)https://github.com/python/cpython/pull/154210#issuecomment-5044281017
chris-eiblhttps://github.com/chris-eibl
Unsupported platformshttps://github.com/orgs/python/projects/27
on Sep 12, 2026https://github.com/python/cpython/issues/157368
https://github.com/StanFromIreland
StanFromIrelandhttps://github.com/StanFromIreland
on Sep 12, 2026https://github.com/python/cpython/issues/157368#issuecomment-5648258923
zwarehttps://github.com/zware
on Sep 13, 2026https://github.com/python/cpython/issues/157368#event-31054546722
gh-157368: Fix clang-cl version in sys.version on Windows (GH-157369)https://github.com/python/cpython/commit/0ba7be9a18e8b03af1c046d676f71be9208e06d4
gh-157368https://github.com/python/cpython/issues/157368
GH-157369https://github.com/python/cpython/pull/157369
0ba7be9https://github.com/python/cpython/commit/0ba7be9a18e8b03af1c046d676f71be9208e06d4
johnslavikhttps://github.com/johnslavik
on Sep 14, 2026https://github.com/python/cpython/issues/157368#event-31099063303
pythongh-157368: Fix clang-cl version in sys.version on Windows (pyth…https://github.com/johnslavik/cpython/commit/6bb1710d8928473ece0e58c499531ffd921c4a88
pythongh-157368https://github.com/python/cpython/issues/157368
pyth…https://github.com/python/cpython/pull/157369
6bb1710https://github.com/johnslavik/cpython/commit/6bb1710d8928473ece0e58c499531ffd921c4a88
zwarehttps://github.com/zware
on Sep 15, 2026https://github.com/python/cpython/issues/157368#event-31210867031
[3.14] gh-157368: Fix clang-cl version in sys.version on Windows (GH-…https://github.com/python/cpython/commit/d6375c3d2e9d24919e438c1e17ae86add4ec2725
gh-157368https://github.com/python/cpython/issues/157368
GH-…https://github.com/python/cpython/pull/157569
d6375c3https://github.com/python/cpython/commit/d6375c3d2e9d24919e438c1e17ae86add4ec2725
https://github.com/zware
zwarehttps://github.com/zware
on Sep 15, 2026https://github.com/python/cpython/issues/157368#issuecomment-5689801812
zwarehttps://github.com/zware
completedhttps://github.com/python/cpython/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on Sep 15, 2026https://github.com/python/cpython/issues/157368#event-31210957104
github-project-automationhttps://github.com/apps/github-project-automation
Unsupported platformshttps://github.com/orgs/python/projects/27
on Sep 15, 2026https://github.com/python/cpython/issues/157368
hugovkhttps://github.com/hugovk
on Sep 17, 2026https://github.com/python/cpython/issues/157368#event-31330113768
[3.15] gh-157368: Fix clang-cl version in sys.version on Windows (GH-…https://github.com/python/cpython/commit/5a1180cdbec80f86884d0f389e99696b15b82cbd
gh-157368https://github.com/python/cpython/issues/157368
GH-…https://github.com/python/cpython/pull/157369
5a1180chttps://github.com/python/cpython/commit/5a1180cdbec80f86884d0f389e99696b15b82cbd
https://github.com/vstinner
vstinnerhttps://github.com/vstinner
on Oct 2, 2026https://github.com/python/cpython/issues/157368#issuecomment-5956889789
gh-158608https://github.com/python/cpython/pull/158608
Sign up for freehttps://github.com/signup?return_to=https://github.com/python/cpython/issues/157368
Sign in to commenthttps://github.com/login?return_to=https://github.com/python/cpython/issues/157368
chris-eiblhttps://github.com/chris-eibl
OS-unsupportedhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22OS-unsupported%22
OS-windowshttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22OS-windows%22
interpreter-core(Objects, Python, Grammar, and Parser dirs)https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22interpreter-core%22
type-bugAn unexpected behavior, bug, or errorhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22type-bug%22
Unsupported platformshttps://github.com/orgs/python/projects/27
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.