From 83931a9fa7be1612c99c24771481250a18d4a3bf Mon Sep 17 00:00:00 2001 From: Hai Shi Date: Fri, 7 Feb 2020 20:52:03 +0800 Subject: [PATCH 1/4] Port _crypt extension module to multiphase initialization(PEP 489) --- Modules/_cryptmodule.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Modules/_cryptmodule.c b/Modules/_cryptmodule.c index 00c1f4f69841b2..a95f55a63c306e 100644 --- a/Modules/_cryptmodule.c +++ b/Modules/_cryptmodule.c @@ -54,14 +54,17 @@ static PyMethodDef crypt_methods[] = { {NULL, NULL} /* sentinel */ }; +static PyModuleDef_Slot _crypt_slots[] = { + {0, NULL} +}; static struct PyModuleDef cryptmodule = { PyModuleDef_HEAD_INIT, "_crypt", NULL, - -1, + 0, crypt_methods, - NULL, + _crypt_slots, NULL, NULL, NULL @@ -70,5 +73,5 @@ static struct PyModuleDef cryptmodule = { PyMODINIT_FUNC PyInit__crypt(void) { - return PyModule_Create(&cryptmodule); + return PyModuleDef_Init(&cryptmodule); } From ca1141f86771fb0b956823ab6160202e3f2ffcf7 Mon Sep 17 00:00:00 2001 From: "blurb-it[bot]" <43283697+blurb-it[bot]@users.noreply.github.com> Date: Fri, 7 Feb 2020 12:57:43 +0000 Subject: [PATCH 2/4] =?UTF-8?q?=F0=9F=93=9C=F0=9F=A4=96=20Added=20by=20blu?= =?UTF-8?q?rb=5Fit.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Core and Builtins/2020-02-07-12-57-40.bpo-1635741.ySW6gq.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 Misc/NEWS.d/next/Core and Builtins/2020-02-07-12-57-40.bpo-1635741.ySW6gq.rst diff --git a/Misc/NEWS.d/next/Core and Builtins/2020-02-07-12-57-40.bpo-1635741.ySW6gq.rst b/Misc/NEWS.d/next/Core and Builtins/2020-02-07-12-57-40.bpo-1635741.ySW6gq.rst new file mode 100644 index 00000000000000..6b35bdc474fbe9 --- /dev/null +++ b/Misc/NEWS.d/next/Core and Builtins/2020-02-07-12-57-40.bpo-1635741.ySW6gq.rst @@ -0,0 +1 @@ +Port _crypt extension module to multiphase initialization (:pep:`489`). \ No newline at end of file From c0c21c5e8ef9dd988cd432e7dfb6d9e5e6832a9d Mon Sep 17 00:00:00 2001 From: "blurb-it[bot]" <43283697+blurb-it[bot]@users.noreply.github.com> Date: Fri, 7 Feb 2020 12:58:21 +0000 Subject: [PATCH 3/4] =?UTF-8?q?=F0=9F=93=9C=F0=9F=A4=96=20Added=20by=20blu?= =?UTF-8?q?rb=5Fit.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Core and Builtins/2020-02-07-12-58-18.bpo-1635741.ySW6gq.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 Misc/NEWS.d/next/Core and Builtins/2020-02-07-12-58-18.bpo-1635741.ySW6gq.rst diff --git a/Misc/NEWS.d/next/Core and Builtins/2020-02-07-12-58-18.bpo-1635741.ySW6gq.rst b/Misc/NEWS.d/next/Core and Builtins/2020-02-07-12-58-18.bpo-1635741.ySW6gq.rst new file mode 100644 index 00000000000000..6b35bdc474fbe9 --- /dev/null +++ b/Misc/NEWS.d/next/Core and Builtins/2020-02-07-12-58-18.bpo-1635741.ySW6gq.rst @@ -0,0 +1 @@ +Port _crypt extension module to multiphase initialization (:pep:`489`). \ No newline at end of file From 257243259923bde22b8fbc79e60568dab460ac72 Mon Sep 17 00:00:00 2001 From: Hai Shi Date: Fri, 7 Feb 2020 20:59:02 +0800 Subject: [PATCH 4/4] Delete 2020-02-07-12-58-18.bpo-1635741.ySW6gq.rst --- .../Core and Builtins/2020-02-07-12-58-18.bpo-1635741.ySW6gq.rst | 1 - 1 file changed, 1 deletion(-) delete mode 100644 Misc/NEWS.d/next/Core and Builtins/2020-02-07-12-58-18.bpo-1635741.ySW6gq.rst diff --git a/Misc/NEWS.d/next/Core and Builtins/2020-02-07-12-58-18.bpo-1635741.ySW6gq.rst b/Misc/NEWS.d/next/Core and Builtins/2020-02-07-12-58-18.bpo-1635741.ySW6gq.rst deleted file mode 100644 index 6b35bdc474fbe9..00000000000000 --- a/Misc/NEWS.d/next/Core and Builtins/2020-02-07-12-58-18.bpo-1635741.ySW6gq.rst +++ /dev/null @@ -1 +0,0 @@ -Port _crypt extension module to multiphase initialization (:pep:`489`). \ No newline at end of file