util (line 27): root.tk_scaling method is new in 3.16.
This should have been included in PR-#152788.
def fix_scaling(root): # Called in filelist _test, pyshell, and run.
"""Scale fonts on HiDPI displays, once per process."""
import tkinter.font
- scaling = root.tk_scaling()
+ scaling = root.tk_scaling() # tkinter method new in 3.16
if scaling > 1.4:
for name in tkinter.font.names(root):
font = tkinter.font.Font(root=root, name=name, exists=True)