]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-153333: Read tkinter profile scripts with the source file's encoding (GH-153334)
authortonghuaroot (童话) <tonghuaroot@gmail.com>
Sat, 11 Jul 2026 04:42:35 +0000 (12:42 +0800)
committerGitHub <noreply@github.com>
Sat, 11 Jul 2026 04:42:35 +0000 (04:42 +0000)
commitbac73b0f4ea475cbfb11f41579129c9d07075c34
tree87a9d510e078dcdb7eefd1eb521e7ed184335885
parentc22e9c9daef4d97a3fdf1d41a119947ed46ad937
gh-153333: Read tkinter profile scripts with the source file's encoding (GH-153334)

Tk.readprofile ran the user's ~/.CLASS.py and ~/.BASE.py scripts with
exec(open(path).read()), decoding them with the locale encoding.  Read
them in binary mode so exec() honors each script's own coding cookie.
Lib/test/test_tkinter/test_misc.py
Lib/tkinter/__init__.py
Misc/NEWS.d/next/Library/2026-07-08-21-15-00.gh-issue-153333.Kp3mZq.rst [new file with mode: 0644]