Skip to content

Add yet one assertion in test_set_text_charset_cp949#151224

Merged
serhiy-storchaka merged 1 commit into
python:mainfrom
serhiy-storchaka:test_set_text_charset_cp949
Jun 10, 2026
Merged

Add yet one assertion in test_set_text_charset_cp949#151224
serhiy-storchaka merged 1 commit into
python:mainfrom
serhiy-storchaka:test_set_text_charset_cp949

Conversation

@serhiy-storchaka

Copy link
Copy Markdown
Member

Check bytes(m), not only str(m).

@serhiy-storchaka serhiy-storchaka requested a review from a team as a code owner June 10, 2026 08:09
@serhiy-storchaka serhiy-storchaka added tests Tests in the Lib/test dir skip news needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes needs backport to 3.15 pre-release feature fixes, bugs and security fixes labels Jun 10, 2026
self.assertEqual(m.get_payload(decode=True).decode('ks_c_5601-1987'), content)
self.assertEqual(bytes(m), textwrap.dedent("""\
Content-Type: text/plain; charset="ks_c_5601-1987"
Content-Transfer-Encoding: 8bit

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I am a bit surprised that Content-Transfer-Encoding is 8bit instead of base64, like above. This I why I add this test.

@serhiy-storchaka serhiy-storchaka merged commit 3ca93ab into python:main Jun 10, 2026
62 checks passed
@miss-islington-app

Copy link
Copy Markdown

Thanks @serhiy-storchaka for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14, 3.15.
🐍🍒⛏🤖 I'm not a witch! I'm not a witch!

@serhiy-storchaka serhiy-storchaka deleted the test_set_text_charset_cp949 branch June 10, 2026 11:36
@miss-islington-app

Copy link
Copy Markdown

Sorry, @serhiy-storchaka, I could not cleanly backport this to 3.14 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker 3ca93ab198497da9451101019b67c52e7873377d 3.14

@bedevere-app

bedevere-app Bot commented Jun 10, 2026

Copy link
Copy Markdown

GH-151237 is a backport of this pull request to the 3.15 branch.

@miss-islington-app

Copy link
Copy Markdown

Sorry, @serhiy-storchaka, I could not cleanly backport this to 3.13 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker 3ca93ab198497da9451101019b67c52e7873377d 3.13

@bedevere-app bedevere-app Bot removed the needs backport to 3.15 pre-release feature fixes, bugs and security fixes label Jun 10, 2026
@serhiy-storchaka serhiy-storchaka removed needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes labels Jun 10, 2026
@serhiy-storchaka serhiy-storchaka removed their assignment Jun 10, 2026
serhiy-storchaka added a commit that referenced this pull request Jun 10, 2026
… (GH-151237)

Add yet one assertion in test_set_text_charset_cp949 (GH-151224)

Check bytes(m), not only str(m).
(cherry picked from commit 3ca93ab)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip issue skip news tests Tests in the Lib/test dir

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant