From: Andrew M. Kuchling Date: Thu, 24 Apr 2003 13:17:13 +0000 (+0000) Subject: [Patch #679505] Trigger DeprecationWarning on importing the rotor module X-Git-Tag: v2.3c1~1047 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=360088f2064380061eb3dfa39bfd3e704065be35;p=python [Patch #679505] Trigger DeprecationWarning on importing the rotor module --- diff --git a/Modules/rotormodule.c b/Modules/rotormodule.c index dcca0c6174..6759244efa 100644 --- a/Modules/rotormodule.c +++ b/Modules/rotormodule.c @@ -620,4 +620,8 @@ initrotor(void) { Rotor_Type.ob_type = &PyType_Type; (void)Py_InitModule("rotor", rotor_methods); + if (PyErr_Warn(PyExc_DeprecationWarning, + "the rotor module uses an insecure algorithm " + "and is deprecated") < 0) + return; }