bpo-1596321: Fix threading._shutdown() for the main thread (GH-28549)


Fix the threading._shutdown() function when the threading module was
imported first from a thread different than the main thread: no
longer log an error at Python exit.
(cherry picked from commit 95d31370829b7d729667588e0a9943217401ea5b)

Co-authored-by: Victor Stinner <vstinner@python.org>
3 files changed