bpo-33978: Close existing handlers before logging (re-)configuration. (GH-8008) (GH-8044)

(cherry picked from commit 087570af6d5d39b51bdd5e660a53903960e58678)

Co-authored-by: Xtreak <tirkarthi@users.noreply.github.com>
3 files changed