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-134151 Fix TypeError in email.utils.decode_params() when sorting RFC 2231 continuations on Python 3#134687

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
zangjiucheng wants to merge3 commits intopython:main
base:main
Choose a base branch
Loading
fromzangjiucheng:gh-134151-main

Conversation

zangjiucheng
Copy link
Contributor

@zangjiuchengzangjiucheng commentedMay 26, 2025
edited by bedevere-appbot
Loading

…ntinuations on Python 3 and add corresponding test case
)
filename = msg.get_filename()
self.assertEqual(filename, 'foo bar.txtignored')

Copy link
Member

Choose a reason for hiding this comment

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

In the new API this case is treated as two separate occurrences of the parameter 'filename', and I chose to ignore the one that didn't have a section number if there was already a section 0. I suspect that was because it seemed like the more complex attribute was more likely to be accurate, but I don't really remember. If you are doing it the way you are to replicate 2.7 behavior, then it is fine as is. Otherwise replicating the new API logic would probably be better (treat None as 0 if there is no 0, ignore it if there is already a 0). Unless you have an RFC or standard practice (what do other email clients do?) reason for a different behavior, in which case I could consider changing the new API logic.

Also, the error messages are clearer if you do assertEqual(expected, actual) (the diff is clearer).

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

Resolved, I believe that aligning the new API behaviour makes sense. I have updated my logic and added more test cases for two different scenarios. Thanks!

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

@bitdancerbitdancerAwaiting requested review from bitdancer

Assignees
No one assigned
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@zangjiucheng@bitdancer

[8]ページ先頭

©2009-2025 Movatter.jp