[Python-checkins] bpo-44753: Don't use logfile extension when determining old files to be deleted (GH-27475) (GH-27486)