(cherry picked from commit 994a3b88dc) Co-authored-by: Steve Dower <steve.dower@python.org>
994a3b88dc
Includes backported fixes from GH-14091