Fix tkinter regression introduced by the security fix in #16248.
Null merge of 3.1 into 3.2

Changeset c39f42f46a05 left a dangling head on 3.1.