https://github.com/python/cpython/commit/a75e730075cd25be1143e6183006f3b1d61bb80f commit: a75e730075cd25be1143e6183006f3b1d61bb80f branch: master author: Jeffrey Quesnelle <jquesnelle at gmail.com> committer: GitHub <noreply at github.com> date: 2020年04月17日T04:09:45+02:00 summary: bpo-40294: Fix _asyncio when module is loaded/unloaded multiple times (GH-19542) files: M Modules/_asynciomodule.c diff --git a/Modules/_asynciomodule.c b/Modules/_asynciomodule.c index 96a99fe49ceb0..a03a63119bab3 100644 --- a/Modules/_asynciomodule.c +++ b/Modules/_asynciomodule.c @@ -3271,6 +3271,8 @@ module_free(void *m) Py_CLEAR(context_kwname); module_free_freelists(); + + module_initialized = 0; } static int