From 7fda2634eae5aebbc0b32206bdd13dfc4a8bfd62 Mon Sep 17 00:00:00 2001 From: Gregory Szorc Date: Wed, 2 Jan 2019 09:50:38 -0800 Subject: [PATCH] bpo-35642: Remove asynciomodule.c from pythoncore.vcxproj 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. --- .../NEWS.d/next/Build/2019-01-02-11-23-33.bpo-35642.pjkhJe.rst | 1 + PCbuild/pythoncore.vcxproj | 1 - PCbuild/pythoncore.vcxproj.filters | 3 --- 3 files changed, 1 insertion(+), 4 deletions(-) create mode 100644 Misc/NEWS.d/next/Build/2019-01-02-11-23-33.bpo-35642.pjkhJe.rst diff --git a/Misc/NEWS.d/next/Build/2019-01-02-11-23-33.bpo-35642.pjkhJe.rst b/Misc/NEWS.d/next/Build/2019-01-02-11-23-33.bpo-35642.pjkhJe.rst new file mode 100644 index 00000000000000..9f6da315e2d581 --- /dev/null +++ b/Misc/NEWS.d/next/Build/2019-01-02-11-23-33.bpo-35642.pjkhJe.rst @@ -0,0 +1 @@ +Remove asynciomodule.c from pythoncore.vcxproj diff --git a/PCbuild/pythoncore.vcxproj b/PCbuild/pythoncore.vcxproj index ddf7f49d7a8eb2..f33cdb5030383d 100644 --- a/PCbuild/pythoncore.vcxproj +++ b/PCbuild/pythoncore.vcxproj @@ -247,7 +247,6 @@ - diff --git a/PCbuild/pythoncore.vcxproj.filters b/PCbuild/pythoncore.vcxproj.filters index 77b018ffb4e943..9dbd0669f76d9b 100644 --- a/PCbuild/pythoncore.vcxproj.filters +++ b/PCbuild/pythoncore.vcxproj.filters @@ -1073,9 +1073,6 @@ PC - - Modules - Modules