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

trace CLI reads source files using the locale encoding #85310

Closed
serhiy-storchaka opened this issue Jun 27, 2020 · 4 comments
Closed

trace CLI reads source files using the locale encoding #85310

serhiy-storchaka opened this issue Jun 27, 2020 · 4 comments
Labels
3.8 only security fixes 3.9 only security fixes 3.10 only security fixes stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error

Comments

@serhiy-storchaka
Copy link
Member

BPO 41138
Nosy @abalkin, @serhiy-storchaka, @miss-islington
PRs
  • bpo-41138: Fix trace CLI for non-UTF-8 files. #21177
  • [3.9] bpo-41138: Fix trace CLI for non-UTF-8 files. (GH-21177) #21196
  • [3.8] bpo-41138: Fix trace CLI for non-UTF-8 files. (GH-21177) #21200
  • 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 = None
    created_at = <Date 2020-06-27.10:50:02.918>
    labels = ['3.8', 'type-bug', 'library', '3.9', '3.10']
    title = 'trace CLI reads source files using the locale encoding'
    updated_at = <Date 2020-06-28.14:30:12.093>
    user = 'https://github.com/serhiy-storchaka'

    bugs.python.org fields:

    activity = <Date 2020-06-28.14:30:12.093>
    actor = 'serhiy.storchaka'
    assignee = 'none'
    closed = False
    closed_date = None
    closer = None
    components = ['Library (Lib)']
    creation = <Date 2020-06-27.10:50:02.918>
    creator = 'serhiy.storchaka'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 41138
    keywords = ['patch']
    message_count = 4.0
    messages = ['372461', '372509', '372510', '372519']
    nosy_count = 3.0
    nosy_names = ['belopolsky', 'serhiy.storchaka', 'miss-islington']
    pr_nums = ['21177', '21196', '21200']
    priority = 'normal'
    resolution = None
    stage = 'patch review'
    status = 'open'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue41138'
    versions = ['Python 3.8', 'Python 3.9', 'Python 3.10']

    @serhiy-storchaka
    Copy link
    Member Author

    The command line interface of the trace module reads source files using the locale encoding.

    The following file fixes this by reading a file in binary mode (compile() detects the encoding). It fixes also a resource warning when save counts to a file.

    @serhiy-storchaka serhiy-storchaka added 3.8 only security fixes 3.9 only security fixes 3.10 only security fixes stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error labels Jun 27, 2020
    @serhiy-storchaka
    Copy link
    Member Author

    New changeset 04cdeb7 by Serhiy Storchaka in branch 'master':
    bpo-41138: Fix trace CLI for non-UTF-8 files. (GH-21177)
    04cdeb7

    @miss-islington
    Copy link
    Contributor

    New changeset d1e05e7 by Miss Islington (bot) in branch '3.9':
    bpo-41138: Fix trace CLI for non-UTF-8 files. (GH-21177)
    d1e05e7

    @serhiy-storchaka
    Copy link
    Member Author

    New changeset cb53b8c by Serhiy Storchaka in branch '3.8':
    [3.8] bpo-41138: Fix trace CLI for non-UTF-8 files. (GH-21177) (GH-21200)
    cb53b8c

    @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 only security fixes 3.9 only security fixes 3.10 only security fixes stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error
    Projects
    Status: Done
    Development

    No branches or pull requests

    3 participants