René's URL Explorer Experiment


Title: struct: non-ASCII bytes format raises UnicodeEncodeError instead of struct.error on 3.13/3.14 · Issue #158172 · python/cpython · GitHub

Open Graph Title: struct: non-ASCII bytes format raises UnicodeEncodeError instead of struct.error on 3.13/3.14 · Issue #158172 · python/cpython

X Title: struct: non-ASCII bytes format raises UnicodeEncodeError instead of struct.error on 3.13/3.14 · Issue #158172 · python/cpython

Description: Bug report #153835 (backport of gh-85943) introduces a regression on 3.13 and 3.14. A bytes format with a non-ASCII byte now raises UnicodeEncodeError instead of struct.error: >>> import struct >>> struct.unpack(b'\xc5', b'') UnicodeEnco...

Open Graph Description: Bug report #153835 (backport of gh-85943) introduces a regression on 3.13 and 3.14. A bytes format with a non-ASCII byte now raises UnicodeEncodeError instead of struct.error: >>> import struct >>>...

X Description: Bug report #153835 (backport of gh-85943) introduces a regression on 3.13 and 3.14. A bytes format with a non-ASCII byte now raises UnicodeEncodeError instead of struct.error: >>> import s...

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

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"struct: non-ASCII bytes format raises UnicodeEncodeError instead of struct.error on 3.13/3.14","articleBody":"# Bug report\n\nhttps://github.com/python/cpython/pull/153835 (backport of gh-85943) introduces a regression on 3.13 and 3.14. A bytes format with a non-ASCII byte now raises `UnicodeEncodeError` instead of `struct.error`:\n\n```python\n>>> import struct\n>>> struct.unpack(b'\\xc5', b'')\nUnicodeEncodeError: 'ascii' codec can't encode character '\\udcc5' in position 0: ordinal not in range(128)\n```\n\n3.14.0 raises `struct.error: bad char in struct format`. `main` is not affected since gh-145850 already rejects non-ASCII formats with `ValueError`.\n\nThis aborts `fuzz_struct_unpack`, so CIFuzz fails on any 3.14 PR that touches C files, e.g. gh-158162: https://github.com/python/cpython/actions/runs/36136424084/job/108075564322\n\n```\nUnicodeEncodeError: 'ascii' codec can't encode character '\\udcc5' in position 0: ordinal not in range(128)\n==75== ERROR: libFuzzer: deadly signal\n    #6 0x55d07f8c7884 in _run_fuzz /src/cpython3/Modules/_xxtestfuzz/fuzzer.c:575:9\n    #7 0x55d07f8c7884 in LLVMFuzzerTestOneInput /src/cpython3/Modules/_xxtestfuzz/fuzzer.c:640:11\nBase64: xQA=\n```\n\n\n\u003c!-- gh-linked-prs -->\n### Linked PRs\n* gh-158185\n\u003c!-- /gh-linked-prs -->\n","author":{"url":"https://github.com/corona10","@type":"Person","name":"corona10"},"datePublished":"2026-09-25T14:44:25Z","url":"https://github.com/python/cpython/issues/158172"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:e1f553ad-169b-8e1e-d6df-3c70b771affb
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idDBF8:155915:3598F7:494DEB:6AECCB3F
html-safe-nonce4bd8566b7cd5a47b451774489281de92a2849db6c980664b716859590329c80f
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEQkY4OjE1NTkxNTozNTk4Rjc6NDk0REVCOjZBRUNDQjNGIiwidmlzaXRvcl9pZCI6IjY5MzEwOTAzNjcxOTcyNjg3OTkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmacbf87df1f30e01d8989e08dcdcf77baa0437cf33b34e38a18e78ec706c53cabee
hovercard-subject-tagissue:5584376768
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/158172/issue_layout
twitter:imagehttps://opengraph.githubassets.com/7799fabc741efceb189190cd801250cf3b29c450cc3d4a74c9be3a8a7416d7ab/python/cpython/issues/158172
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/7799fabc741efceb189190cd801250cf3b29c450cc3d4a74c9be3a8a7416d7ab/python/cpython/issues/158172
og:image:altBug report #153835 (backport of gh-85943) introduces a regression on 3.13 and 3.14. A bytes format with a non-ASCII byte now raises UnicodeEncodeError instead of struct.error: >>> import struct >>>...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamecorona10
hostnamegithub.com
expected-hostnamegithub.com
Nonedc0b519c5798dc1150b88dc4c06a8b9634d0069218dc04e469970e76aad74016
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
releasedb139f0bf57b59bf9a8c4abb0849924d6c6ca559
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/python/cpython/issues/158172#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fissues%2F158172
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%2F158172
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/158172
Reloadhttps://github.com/python/cpython/issues/158172
Reloadhttps://github.com/python/cpython/issues/158172
pythonhttps://github.com/python
cpythonhttps://github.com/python/cpython
Codehttps://github.com/python/cpython
Issues5k+ (5k+)https://github.com/python/cpython/issues
Pull requests2.3k (2.3k)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/pulse
https://github.com/python/cpython
New issuehttps://github.com/login?return_to=https://github.com/python/cpython/issues/158172
New issuehttps://github.com/login?return_to=https://github.com/python/cpython/issues/158172
struct: non-ASCII bytes format raises UnicodeEncodeError instead of struct.error on 3.13/3.14https://github.com/python/cpython/issues/158172#top
3.13only security fixeshttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%223.13%22
3.14bugs and security fixeshttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%223.14%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/corona10
corona10https://github.com/corona10
on Sep 25, 2026https://github.com/python/cpython/issues/158172#issue-5584376768
#153835https://github.com/python/cpython/pull/153835
gh-85943https://github.com/python/cpython/issues/85943
gh-145850https://github.com/python/cpython/issues/145850
gh-158162https://github.com/python/cpython/pull/158162
https://github.com/python/cpython/actions/runs/36136424084/job/108075564322https://github.com/python/cpython/actions/runs/36136424084/job/108075564322
[3.14] gh-158172: Preserve struct.error for non-ASCII bytes formats #158185https://github.com/python/cpython/pull/158185
corona10https://github.com/corona10
3.13only security fixeshttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%223.13%22
3.14bugs and security fixeshttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%223.14%22
on Sep 25, 2026https://github.com/python/cpython/issues/158172#event-31843504897
https://github.com/corona10
corona10https://github.com/corona10
on Sep 25, 2026https://github.com/python/cpython/issues/158172#issuecomment-5834315845
@serhiy-storchakahttps://github.com/serhiy-storchaka
https://github.com/StanFromIreland
StanFromIrelandhttps://github.com/StanFromIreland
on Sep 25, 2026https://github.com/python/cpython/issues/158172#issuecomment-5834567046
#152211https://github.com/python/cpython/issues/152211
picnixzhttps://github.com/picnixz
extension-modulesC modules in the Modules dirhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22extension-modules%22
type-bugAn unexpected behavior, bug, or errorhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22type-bug%22
interpreter-core(Objects, Python, Grammar, and Parser dirs)https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22interpreter-core%22
extension-modulesC modules in the Modules dirhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22extension-modules%22
on Sep 25, 2026https://github.com/python/cpython/issues/158172#event-31847938917
Ai-Easternhttps://github.com/Ai-Eastern
on Sep 26, 2026https://github.com/python/cpython/issues/158172#event-31875215364
Merge branch '3.14' into pythongh-158172-struct-bytes-errorhttps://github.com/Ai-Eastern/cpython/commit/48fa9114ade3b6b6c468d66bdec3e9b85d48c7c2
pythongh-158172https://github.com/python/cpython/issues/158172
48fa911https://github.com/Ai-Eastern/cpython/commit/48fa9114ade3b6b6c468d66bdec3e9b85d48c7c2
kevinprimeraquecreo-stackhttps://github.com/kevinprimeraquecreo-stack
Project_VKhttps://github.com/users/kevinprimeraquecreo-stack/projects/1
on Oct 18, 2026https://github.com/python/cpython/issues/158172#event-33592133266
github-project-automationhttps://github.com/apps/github-project-automation
Project_VKhttps://github.com/users/kevinprimeraquecreo-stack/projects/1
on Oct 18, 2026https://github.com/python/cpython/issues/158172
kevinprimeraquecreo-stackhttps://github.com/kevinprimeraquecreo-stack
Project_VKhttps://github.com/users/kevinprimeraquecreo-stack/projects/1
on Oct 18, 2026https://github.com/python/cpython/issues/158172#event-33592171385
Sign up for freehttps://github.com/signup?return_to=https://github.com/python/cpython/issues/158172
Sign in to commenthttps://github.com/login?return_to=https://github.com/python/cpython/issues/158172
3.13only security fixeshttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%223.13%22
3.14bugs and security fixeshttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%223.14%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
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.