From 360088f2064380061eb3dfa39bfd3e704065be35 Mon Sep 17 00:00:00 2001 From: "Andrew M. Kuchling" Date: Thu, 24 Apr 2003 13:17:13 +0000 Subject: [Patch #679505] Trigger DeprecationWarning on importing the rotor module --- Modules/rotormodule.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Modules/rotormodule.c b/Modules/rotormodule.c index dcca0c6..6759244 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; } -- cgit v0.12