]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.15] gh-153333: Read tkinter profile scripts with the source file's encoding (GH...
authorSerhiy Storchaka <storchaka@gmail.com>
Sat, 11 Jul 2026 05:22:20 +0000 (08:22 +0300)
committerGitHub <noreply@github.com>
Sat, 11 Jul 2026 05:22:20 +0000 (05:22 +0000)
commitae42632ed4bf6d8ff912060b383915955928cb7a
treeeb049ad3429edd5e6c26c8748b21b9062e3739c0
parent3e776ee2a7ea7223d76416c972c29beca83516d4
[3.15] gh-153333: Read tkinter profile scripts with the source file's encoding (GH-153334) (GH-153541)

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.
(cherry picked from commit bac73b0f4ea475cbfb11f41579129c9d07075c34)

Co-authored-by: tonghuaroot (童话) <tonghuaroot@gmail.com>
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]