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.