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-87720 Fix additional header refolding-quoting edge case#134271

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
bitdancer wants to merge1 commit intopython:main
base:main
Choose a base branch
Loading
frombitdancer:another_refolding_edge_case

Conversation

bitdancer
Copy link
Member

@bitdancerbitdancer commentedMay 19, 2025
edited by bedevere-appbot
Loading

In this case, the higher level syntactic unit fit on the remainder of the line in un-encoded format, so the encoding check never happened. To fix this, we look inside the current unit to see if has anything that was originally encoded.

I'm not really happy with the method name 'has_token_type', but I haven't thought of anything I like better. Ideas welcome.

In this case, the higher level syntactic unit fit on the remainder ofthe line in un-encoded format, so the encoding check never happened.  Tofix this, we look inside the current unit to see if has anything thatwas originally encoded.
@bitdancer
Copy link
MemberAuthor

@medmunds Do you feel like reviewing this? :)

medmunds reacted with eyes emoji

@medmunds
Copy link
Contributor

I'm not really happy with the method name 'has_token_type', but I haven't thought of anything I like better. Ideas welcome.

contains_token_type? (Though I'm not convinced that's any better;has_token_type makes sense to me too.)

Copy link
Contributor

@medmundsmedmunds left a comment

Choose a reason for hiding this comment

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

This fix LGTM. But I found another corner case while looking at it. Here's the failing test:

--- a/Lib/test/test_email/test__header_value_parser.py(revision ebde4e897750963b82bcae785949ac11b3877640)+++ b/Lib/test/test_email/test__header_value_parser.py(date 1748289921461)@@ -3101,6 +3101,8 @@              '=?utf-8?q?a=2C?=\n'              ' 123456789012345678901234567890123456\n'              ' <abc@example.com>\n'),+            ('abc@example.com (, but definitely not also sent to def@example.net)',+             'abc@example.com (, but definitely not\n also sent to def@example.net)\n'),         ]         for (to, folded) in cases:             with self.subTest(to=to):

(This case belongs in a new test covering comment folding, but you'll get the point. Guessing I should open a new issue—it's more like the earlier quoted-string problem. I bring it up here in case it might help you spot other xtext variations needing attention.)

(Also, is this on Seth's radar yet?)

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@medmundsmedmundsmedmunds approved these changes

Assignees
No one assigned
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@bitdancer@medmunds

[8]ページ先頭

©2009-2025 Movatter.jp