From 81eda28382168bfea48bb1a352954ea90aadd4ca Mon Sep 17 00:00:00 2001 From: "Miss Islington (bot)" <31488909+miss-islington@users.noreply.github.com> Date: Sat, 2 Feb 2019 14:54:42 -0800 Subject: [PATCH] bpo-34691: Compile _contextvars module into main Python library (GH-11741) (cherry picked from commit 4c70d9f79c9b371990c8e054ccde53f7ff15946b) Co-authored-by: Steve Dower --- .../2019-02-02-13-34-05.bpo-34691.B-Lsj4.rst | 2 + PC/config.c | 4 + PCbuild/_contextvars.vcxproj | 77 ------------------- PCbuild/_contextvars.vcxproj.filters | 16 ---- PCbuild/pcbuild.proj | 2 +- Tools/msi/lib/lib_files.wxs | 2 +- 6 files changed, 8 insertions(+), 95 deletions(-) create mode 100644 Misc/NEWS.d/next/Build/2019-02-02-13-34-05.bpo-34691.B-Lsj4.rst delete mode 100644 PCbuild/_contextvars.vcxproj delete mode 100644 PCbuild/_contextvars.vcxproj.filters diff --git a/Misc/NEWS.d/next/Build/2019-02-02-13-34-05.bpo-34691.B-Lsj4.rst b/Misc/NEWS.d/next/Build/2019-02-02-13-34-05.bpo-34691.B-Lsj4.rst new file mode 100644 index 00000000000..3b5aca75103 --- /dev/null +++ b/Misc/NEWS.d/next/Build/2019-02-02-13-34-05.bpo-34691.B-Lsj4.rst @@ -0,0 +1,2 @@ +The _contextvars module is now built into the core Python library on +Windows. diff --git a/PC/config.c b/PC/config.c index 2037b3db64b..c4922ccd623 100644 --- a/PC/config.c +++ b/PC/config.c @@ -72,6 +72,8 @@ extern PyObject* PyInit__string(void); extern PyObject* PyInit__stat(void); extern PyObject* PyInit__opcode(void); +extern PyObject* PyInit__contextvars(void); + /* tools/freeze/makeconfig.py marker for additional "extern" */ /* -- ADDMODULE MARKER 1 -- */ @@ -164,6 +166,8 @@ struct _inittab _PyImport_Inittab[] = { {"_stat", PyInit__stat}, {"_opcode", PyInit__opcode}, + {"_contextvars", PyInit__contextvars}, + /* Sentinel */ {0, 0} }; diff --git a/PCbuild/_contextvars.vcxproj b/PCbuild/_contextvars.vcxproj deleted file mode 100644 index 7418e86570a..00000000000 --- a/PCbuild/_contextvars.vcxproj +++ /dev/null @@ -1,77 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - PGInstrument - Win32 - - - PGInstrument - x64 - - - PGUpdate - Win32 - - - PGUpdate - x64 - - - Release - Win32 - - - Release - x64 - - - - {B8BF1D81-09DC-42D4-B406-4F868B33A89E} - _contextvars - Win32Proj - - - - - DynamicLibrary - NotSet - - - - .pyd - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - - - - - - - - - - {cf7ac3d1-e2df-41d2-bea6-1e2556cdea26} - false - - - - - - diff --git a/PCbuild/_contextvars.vcxproj.filters b/PCbuild/_contextvars.vcxproj.filters deleted file mode 100644 index b3002b7ff67..00000000000 --- a/PCbuild/_contextvars.vcxproj.filters +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - {7CBD8910-233D-4E9A-9164-9BA66C1F0E6D} - - - - - Source Files - - - diff --git a/PCbuild/pcbuild.proj b/PCbuild/pcbuild.proj index befaa1fed76..dbe30dd6a8a 100644 --- a/PCbuild/pcbuild.proj +++ b/PCbuild/pcbuild.proj @@ -50,7 +50,7 @@ - + diff --git a/Tools/msi/lib/lib_files.wxs b/Tools/msi/lib/lib_files.wxs index 4bd0c57e322..a9952bdac4d 100644 --- a/Tools/msi/lib/lib_files.wxs +++ b/Tools/msi/lib/lib_files.wxs @@ -1,6 +1,6 @@  - +