[New-bugs-announce] [issue33975] IDLE: only adjust DPI before Tk()

Terry J. Reedy report at bugs.python.org
Tue Jun 26 22:22:16 EDT 2018


New submission from Terry J. Reedy <tjreedy at udel.edu>:

#33656 patched PyShell to call SetProcessDpiAwareness on Windows nearly first thing, *at module level*, well before calling tkinter.Tk().  The Microsoft docs warn that making the Windows API call after starting the graphics system may not work as expected.  With tk 8.6,8, the result is sharp, but small type -- perhaps 7 points instead of 10.  This issue is about avoiding type shrinkage, both when running the htest suite as a whole and when running the test for an individual file after running the unittests.

To do that in any process, pyshell must be imported before Tk() is called.  The patch adds the following to htest.py.
import idlelib.pyshell  # Set Windows DPI awareness before Tk().

I will add the same where needed to the top of if __name__ == '__main__': clauses in idlelib modules, before running unittests.

----------
assignee: terry.reedy
components: IDLE
messages: 320531
nosy: terry.reedy
priority: normal
severity: normal
stage: patch review
status: open
title: IDLE: only adjust DPI before Tk()
type: behavior
versions: Python 3.6, Python 3.7, Python 3.8

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue33975>
_______________________________________


More information about the New-bugs-announce mailing list