This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: read_mime_types() should read the rule file using UTF-8, not the locale encoding
Type: behavior Stage: resolved
Components: Library (Lib) Versions: Python 3.10, Python 3.9, Python 3.8
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: miss-islington, ned.deily, serhiy.storchaka, thatiparthy, vstinner
Priority: normal Keywords: easy, patch

Created on 2020-06-20 09:11 by serhiy.storchaka, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 20998 merged thatiparthy, 2020-06-20 09:56
PR 21210 merged miss-islington, 2020-06-29 08:37
PR 21211 merged miss-islington, 2020-06-29 08:37
PR 21229 closed thatiparthy, 2020-06-30 05:39
Messages (5)
msg371925 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2020-06-20 09:11
MimeTypes.read() read the rule file using UTF-8, but read_mime_types() uses the locale encoding.

It is an easy issue. You need just repeat issue13025 for read_mime_types().
msg372554 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2020-06-29 08:37
New changeset 7f569c9bc0079906012b3034d30fe8abc742e7fc by Srinivas Reddy Thatiparthy (శ్రీనివాస్  రెడ్డి తాటిపర్తి) in branch 'master':
bpo-41048: mimetypes should read the rule file using UTF-8, not the locale encoding (GH-20998)
https://github.com/python/cpython/commit/7f569c9bc0079906012b3034d30fe8abc742e7fc
msg372565 - (view) Author: miss-islington (miss-islington) Date: 2020-06-29 12:07
New changeset 9e36b6e6c8fc8925c6a5e7b57aff527bc4b862a8 by Miss Islington (bot) in branch '3.9':
bpo-41048: mimetypes should read the rule file using UTF-8, not the locale encoding (GH-20998)
https://github.com/python/cpython/commit/9e36b6e6c8fc8925c6a5e7b57aff527bc4b862a8
msg372566 - (view) Author: miss-islington (miss-islington) Date: 2020-06-29 12:07
New changeset 7731139b7af655b9f5df6d1b5493f8dfdf41d569 by Miss Islington (bot) in branch '3.8':
bpo-41048: mimetypes should read the rule file using UTF-8, not the locale encoding (GH-20998)
https://github.com/python/cpython/commit/7731139b7af655b9f5df6d1b5493f8dfdf41d569
msg372655 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2020-06-30 05:47
Thanks for the PR! With the backports to 3.9 and 3.8 in place, I am assuming we can now close this issue.
History
Date User Action Args
2022-04-11 14:59:32adminsetgithub: 85220
2020-06-30 05:47:12ned.deilysetstatus: open -> closed

nosy: + ned.deily
messages: + msg372655

resolution: fixed
stage: patch review -> resolved
2020-06-30 05:40:26ned.deilysetversions: - Python 3.7
2020-06-30 05:39:38thatiparthysetpull_requests: + pull_request20383
2020-06-29 12:07:44miss-islingtonsetmessages: + msg372566
2020-06-29 12:07:35miss-islingtonsetmessages: + msg372565
2020-06-29 08:37:22miss-islingtonsetpull_requests: + pull_request20365
2020-06-29 08:37:10miss-islingtonsetnosy: + miss-islington
pull_requests: + pull_request20364
2020-06-29 08:37:07serhiy.storchakasetmessages: + msg372554
2020-06-21 11:07:17serhiy.storchakalinkissue41063 dependencies
2020-06-20 09:56:11thatiparthysetkeywords: + patch
nosy: + thatiparthy

pull_requests: + pull_request20173
stage: needs patch -> patch review
2020-06-20 09:11:00serhiy.storchakacreate