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: trace CLI reads source files using the locale encoding
Type: behavior Stage: patch review
Components: Library (Lib) Versions: Python 3.10, Python 3.9, Python 3.8
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: belopolsky, miss-islington, serhiy.storchaka
Priority: normal Keywords: patch

Created on 2020-06-27 10:50 by serhiy.storchaka, last changed 2022-04-11 14:59 by admin.

Pull Requests
URL Status Linked Edit
PR 21177 merged serhiy.storchaka, 2020-06-27 10:54
PR 21196 merged miss-islington, 2020-06-28 10:34
PR 21200 merged serhiy.storchaka, 2020-06-28 12:53
Messages (4)
msg372461 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2020-06-27 10:50
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.
msg372509 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2020-06-28 10:34
New changeset 04cdeb7a5617c48102f45b965e683b12cdf934f8 by Serhiy Storchaka in branch 'master':
bpo-41138: Fix trace CLI for non-UTF-8 files. (GH-21177)
https://github.com/python/cpython/commit/04cdeb7a5617c48102f45b965e683b12cdf934f8
msg372510 - (view) Author: miss-islington (miss-islington) Date: 2020-06-28 10:52
New changeset d1e05e78a3995fd7e5a79c5c6e4c8160aa48af22 by Miss Islington (bot) in branch '3.9':
bpo-41138: Fix trace CLI for non-UTF-8 files. (GH-21177)
https://github.com/python/cpython/commit/d1e05e78a3995fd7e5a79c5c6e4c8160aa48af22
msg372519 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2020-06-28 14:30
New changeset cb53b8ce9c8660465b816f4d577720305b1283fa by Serhiy Storchaka in branch '3.8':
[3.8] bpo-41138: Fix trace CLI for non-UTF-8 files. (GH-21177) (GH-21200)
https://github.com/python/cpython/commit/cb53b8ce9c8660465b816f4d577720305b1283fa
History
Date User Action Args
2022-04-11 14:59:33adminsetgithub: 85310
2020-06-28 14:30:12serhiy.storchakasetmessages: + msg372519
2020-06-28 12:53:10serhiy.storchakasetpull_requests: + pull_request20354
2020-06-28 10:52:29miss-islingtonsetmessages: + msg372510
2020-06-28 10:34:39miss-islingtonsetnosy: + miss-islington
pull_requests: + pull_request20350
2020-06-28 10:34:29serhiy.storchakasetmessages: + msg372509
2020-06-27 10:56:24serhiy.storchakalinkissue41063 dependencies
2020-06-27 10:54:57serhiy.storchakasetkeywords: + patch
stage: patch review
pull_requests: + pull_request20335
2020-06-27 10:50:02serhiy.storchakacreate