Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing the charset parameter in as_encoded_word() #67337

Closed
serhiy-storchaka opened this issue Jan 2, 2015 · 7 comments
Closed

Missing the charset parameter in as_encoded_word() #67337

serhiy-storchaka opened this issue Jan 2, 2015 · 7 comments
Labels
3.7 (EOL) end of life stdlib Python modules in the Lib dir topic-email type-bug An unexpected behavior, bug, or error

Comments

@serhiy-storchaka
Copy link
Member

BPO 23148
Nosy @warsaw, @bitdancer, @serhiy-storchaka, @iritkatriel

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = <Date 2021-12-14.08:59:56.100>
created_at = <Date 2015-01-02.10:38:19.142>
labels = ['3.7', 'type-bug', 'library', 'expert-email']
title = 'Missing the charset parameter in as_encoded_word()'
updated_at = <Date 2021-12-14.08:59:56.099>
user = 'https://github.com/serhiy-storchaka'

bugs.python.org fields:

activity = <Date 2021-12-14.08:59:56.099>
actor = 'serhiy.storchaka'
assignee = 'none'
closed = True
closed_date = <Date 2021-12-14.08:59:56.100>
closer = 'serhiy.storchaka'
components = ['Library (Lib)', 'email']
creation = <Date 2015-01-02.10:38:19.142>
creator = 'serhiy.storchaka'
dependencies = []
files = []
hgrepos = []
issue_num = 23148
keywords = []
message_count = 7.0
messages = ['233310', '235892', '236369', '268854', '270628', '408502', '408517']
nosy_count = 5.0
nosy_names = ['barry', 'r.david.murray', 'python-dev', 'serhiy.storchaka', 'iritkatriel']
pr_nums = []
priority = 'normal'
resolution = 'fixed'
stage = 'resolved'
status = 'closed'
superseder = None
type = 'behavior'
url = 'https://bugs.python.org/issue23148'
versions = ['Python 3.5', 'Python 3.6', 'Python 3.7']

@serhiy-storchaka
Copy link
Member Author

In Lib/email/_header_value_parser.py:460 the as_encoded_word() method is called without mandatory argument charset.

@serhiy-storchaka serhiy-storchaka added stdlib Python modules in the Lib dir topic-email type-bug An unexpected behavior, bug, or error labels Jan 2, 2015
@serhiy-storchaka
Copy link
Member Author

Ping.

@bitdancer
Copy link
Member

Same comment as the fold bug...I need to find time to work out a test case (or for someone else to do so).

@serhiy-storchaka
Copy link
Member Author

The only tests that call cte_encode() are test_address_list_with_unicode_names and test_address_list_with_unicode_names_in_quotes. The only method that calls cte_encode() (besides recursive cte_encode) is TokenList._fold().

Methods UnstructuredTokenList.cte_encode() and Phrase._fold() are not covered by tests.

@python-dev
Copy link
Mannequin

python-dev mannequin commented Jul 17, 2016

New changeset efd4ffa88173 by Serhiy Storchaka in branch '3.5':
Issues bpo-23147, bpo-23148: Presumably fixed bugs in folding UnstructuredTokenList.
https://hg.python.org/cpython/rev/efd4ffa88173

New changeset 33593fcdf8b0 by Serhiy Storchaka in branch 'default':
Issues bpo-23147, bpo-23148: Presumably fixed bugs in folding UnstructuredTokenList.
https://hg.python.org/cpython/rev/33593fcdf8b0

@serhiy-storchaka serhiy-storchaka added the 3.7 (EOL) end of life label Sep 14, 2016
@iritkatriel
Copy link
Member

I can't find as_encoded_word anywhere. Even on 3.7 branch.

@serhiy-storchaka
Copy link
Member Author

The code was completely rewritten in bpo-27240. No tests are needed.

@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.7 (EOL) end of life stdlib Python modules in the Lib dir topic-email type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

3 participants