Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-146093: Fix csv _set_str(): check if PyUnicode_DecodeASCII() failed#146113

Merged
vstinner merged 1 commit intopython:mainfrom
vstinner:fix_csv
Mar 18, 2026
Merged

gh-146093: Fix csv _set_str(): check if PyUnicode_DecodeASCII() failed#146113
vstinner merged 1 commit intopython:mainfrom
vstinner:fix_csv

Conversation

@vstinner
Copy link
Member

@vstinnervstinner commentedMar 18, 2026
edited by bedevere-appbot
Loading

The function can fail on a memory allocation failure.

Bug reported by devdanzin.

… failedThe function can fail on a memory allocation failure.Bug reported by devdanzin.
@vstinner
Copy link
MemberAuthor

Writing a test requires using_testcapi.set_nomemory() with a precise number of allocations. It's hard to write a reliable test for that. So I skipped the test instead.

@serhiy-storchakaserhiy-storchaka added the needs backport to 3.14bugs and security fixes labelMar 18, 2026
@serhiy-storchaka
Copy link
Member

It can also fail for non-ASCII data, isn't?

Copy link
Member

@serhiy-storchakaserhiy-storchaka left a comment

Choose a reason for hiding this comment

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

Ah, the default is hardcoded ASCII string. LGTM. 👍

@vstinnervstinner merged commit724c7c8 intopython:mainMar 18, 2026
59 checks passed
@vstinnervstinner deleted the fix_csv branchMarch 18, 2026 17:20
@miss-islington-app
Copy link

Thanks@vstinner for the PR 🌮🎉.. I'm working now to backport this PR to: 3.14.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull requestMar 18, 2026
… failed (pythonGH-146113)The function can fail on a memory allocation failure.Bug reported by devdanzin.(cherry picked from commit724c7c8)Co-authored-by: Victor Stinner <vstinner@python.org>
@bedevere-app
Copy link

GH-146130 is a backport of this pull request to the3.14 branch.

@bedevere-appbedevere-appbot removed the needs backport to 3.14bugs and security fixes labelMar 18, 2026
@vstinnervstinner added the needs backport to 3.13bugs and security fixes labelMar 18, 2026
@miss-islington-app
Copy link

Thanks@vstinner for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull requestMar 18, 2026
… failed (pythonGH-146113)The function can fail on a memory allocation failure.Bug reported by devdanzin.(cherry picked from commit724c7c8)Co-authored-by: Victor Stinner <vstinner@python.org>
@bedevere-app
Copy link

GH-146131 is a backport of this pull request to the3.13 branch.

@bedevere-appbedevere-appbot removed the needs backport to 3.13bugs and security fixes labelMar 18, 2026
@vstinner
Copy link
MemberAuthor

Merged. Thanks for your review@serhiy-storchaka.

vstinner added a commit that referenced this pull requestMar 18, 2026
…) failed (GH-146113) (#146131)gh-146093: Fix csv _set_str(): check if PyUnicode_DecodeASCII() failed (GH-146113)The function can fail on a memory allocation failure.Bug reported by devdanzin.(cherry picked from commit724c7c8)Co-authored-by: Victor Stinner <vstinner@python.org>
vstinner added a commit that referenced this pull requestMar 18, 2026
…) failed (GH-146113) (#146130)gh-146093: Fix csv _set_str(): check if PyUnicode_DecodeASCII() failed (GH-146113)The function can fail on a memory allocation failure.Bug reported by devdanzin.(cherry picked from commit724c7c8)Co-authored-by: Victor Stinner <vstinner@python.org>
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@serhiy-storchakaserhiy-storchakaserhiy-storchaka approved these changes

Assignees

No one assigned

Labels

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@vstinner@serhiy-storchaka

[8]ページ先頭

©2009-2026 Movatter.jp