From 86af079ed9253a3f7823adb80bcfb0e9ba776cad Mon Sep 17 00:00:00 2001 From: Reedy Date: Mon, 19 Feb 2024 19:03:49 +0000 Subject: [PATCH] Deprecate use of captcha-old.py Bug: T357930 Change-Id: I69a2e68d430d7a5769fb8b4391f1163ee99ad8fb --- captcha-old.py | 2 ++ maintenance/GenerateFancyCaptchas.php | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/captcha-old.py b/captcha-old.py index b3fcd081..8ef0b727 100644 --- a/captcha-old.py +++ b/captcha-old.py @@ -352,6 +352,8 @@ if __name__ == "__main__": else: sys.exit("Need to specify the location of a font") + print("captcha-old.py is deprecated and will be removed in the future!") + badwordlist = read_wordlist(opts.badwordlist) count = opts.count fill = opts.fill diff --git a/maintenance/GenerateFancyCaptchas.php b/maintenance/GenerateFancyCaptchas.php index a64b75f1..4149d274 100644 --- a/maintenance/GenerateFancyCaptchas.php +++ b/maintenance/GenerateFancyCaptchas.php @@ -55,7 +55,7 @@ class GenerateFancyCaptchas extends Maintenance { ); $this->addOption( "oldcaptcha", - "Whether to use captcha-old.py which doesn't have OCR fighting improvements" + "DEPRECATED: Whether to use captcha-old.py which doesn't have OCR fighting improvements" ); $this->addOption( "delete", "Deletes all the old captchas" ); $this->addOption( "threads", "The number of threads to use to generate the images", @@ -111,6 +111,7 @@ class GenerateFancyCaptchas extends Maintenance { $captchaScript = 'captcha.py'; if ( $this->hasOption( 'oldcaptcha' ) ) { + $this->output( "Using --oldcaptcha is deprecated, and captcha-old.py will be removed in the future!" ); $captchaScript = 'captcha-old.py'; }