bpo-35642: Remove asynciomodule.c from pythoncore.vcxproj by indygreg · Pull Request #11410 · python/cpython
Before this patch, asynciomodule.c was compiled by both the pythoncore and _asyncio projects. asynciomodule.c defines the _asyncio extension module. The PC\config.c does not reference the _asyncio module. And the official CPython distributions today are shipping _asyncio as a standalone extension module (_asyncio.pyd) - not a built-in as part of libpythonXY.dll. I think the presence of asynciomodule.c in the pythoncore project is incorrect. Using dumpbin.exe, the distributed python37.dll does contain some symbols from asynciomodule.c. I'm not an expert on Windows loader semantics, so I'm not sure whether the symbols from pythonXY.dll or _asyncio.pyd will be used when _asyncio.pyd is loaded. Whatever the case, having symbols provided by 2 binaries is probably not a good idea. This commit removes asynciomodule.c from the pythoncore project and reinforces that _asyncio is a standalone extension module and not a built-in. Because public symbols (at least PyInit__asyncio) are being dropped from pythonXY.dll, this change is backwards incompatible at the API layer. There is a possibility someone, somewhere is relying on PyInit__asyncio being exported from pythonXY.dll. So caution may be warranted before backporting.