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

read_mime_types() should read the rule file using UTF-8, not the locale encoding #85220

Closed
serhiy-storchaka opened this issue Jun 20, 2020 · 5 comments
Labels
3.8 (EOL) end of life 3.9 only security fixes 3.10 only security fixes easy stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error

Comments

@serhiy-storchaka
Copy link
Member

BPO 41048
Nosy @vstinner, @ned-deily, @serhiy-storchaka, @srinivasreddy, @miss-islington
PRs
  • bpo-41048: mimetypes should read the rule file using UTF-8, not the locale encoding #20998
  • [3.9] bpo-41048: mimetypes should read the rule file using UTF-8, not the locale encoding (GH-20998) #21210
  • [3.8] bpo-41048: mimetypes should read the rule file using UTF-8, not the locale encoding (GH-20998) #21211
  • [3.7] bpo-41048: mimetypes should read the rule file using UTF-8, not the locale encoding (GH-20998). #21229
  • 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 2020-06-30.05:47:12.238>
    created_at = <Date 2020-06-20.09:11:00.162>
    labels = ['easy', 'type-bug', '3.8', '3.9', '3.10', 'library']
    title = 'read_mime_types() should read the rule file using UTF-8, not the locale encoding'
    updated_at = <Date 2020-06-30.05:47:12.237>
    user = 'https://github.com/serhiy-storchaka'

    bugs.python.org fields:

    activity = <Date 2020-06-30.05:47:12.237>
    actor = 'ned.deily'
    assignee = 'none'
    closed = True
    closed_date = <Date 2020-06-30.05:47:12.238>
    closer = 'ned.deily'
    components = ['Library (Lib)']
    creation = <Date 2020-06-20.09:11:00.162>
    creator = 'serhiy.storchaka'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 41048
    keywords = ['patch', 'easy']
    message_count = 5.0
    messages = ['371925', '372554', '372565', '372566', '372655']
    nosy_count = 5.0
    nosy_names = ['vstinner', 'ned.deily', 'serhiy.storchaka', 'thatiparthy', 'miss-islington']
    pr_nums = ['20998', '21210', '21211', '21229']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue41048'
    versions = ['Python 3.8', 'Python 3.9', 'Python 3.10']

    @serhiy-storchaka
    Copy link
    Member Author

    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 bpo-13025 for read_mime_types().

    @serhiy-storchaka serhiy-storchaka added 3.7 (EOL) end of life 3.10 only security fixes 3.8 (EOL) end of life 3.9 only security fixes stdlib Python modules in the Lib dir easy type-bug An unexpected behavior, bug, or error labels Jun 20, 2020
    @serhiy-storchaka
    Copy link
    Member Author

    New changeset 7f569c9 by Srinivas Reddy Thatiparthy (శ్రీనివాస్ రెడ్డి తాటిపర్తి) in branch 'master':
    bpo-41048: mimetypes should read the rule file using UTF-8, not the locale encoding (GH-20998)
    7f569c9

    @miss-islington
    Copy link
    Contributor

    New changeset 9e36b6e 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)
    9e36b6e

    @miss-islington
    Copy link
    Contributor

    New changeset 7731139 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)
    7731139

    @ned-deily ned-deily removed the 3.7 (EOL) end of life label Jun 30, 2020
    @ned-deily
    Copy link
    Member

    Thanks for the PR! With the backports to 3.9 and 3.8 in place, I am assuming we can now close this issue.

    @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.8 (EOL) end of life 3.9 only security fixes 3.10 only security fixes easy stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    3 participants