From 342ab23af840c612ae36a5d1ed9cc04e8c94384a Mon Sep 17 00:00:00 2001 From: James Vega Date: Fri, 23 Oct 2009 19:35:24 -0400 Subject: [PATCH] Bump the minimum supported Python version to 2.4. Signed-off-by: James Vega --- INSTALL | 2 +- RELNOTES | 2 ++ docs/PLUGIN_TUTORIAL | 6 ++++-- scripts/supybot | 4 ++-- scripts/supybot-plugin-create | 4 ++-- scripts/supybot-wizard | 4 ++-- setup.py | 4 ++-- 7 files changed, 15 insertions(+), 11 deletions(-) diff --git a/INSTALL b/INSTALL index 3a85c7beb..f9ef61299 100644 --- a/INSTALL +++ b/INSTALL @@ -1,6 +1,6 @@ Common - First things first: Supybot *requires* at least Python 2.3. There + First things first: Supybot *requires* at least Python 2.4. There ain't no getting around it. You can get it from http://www.python.org/. Recommended Software diff --git a/RELNOTES b/RELNOTES index 7004f3003..faa63730a 100644 --- a/RELNOTES +++ b/RELNOTES @@ -1,5 +1,7 @@ Version 0.83.5 +The minimum supported Python version has been bumped to 2.4. + utils.str.perlVariableSubstitute is deprecated in favor of using Python's string.Template directly. perlVariableSubstitute will be removed in a future release. diff --git a/docs/PLUGIN_TUTORIAL b/docs/PLUGIN_TUTORIAL index 8cf8af186..a6634bb28 100644 --- a/docs/PLUGIN_TUTORIAL +++ b/docs/PLUGIN_TUTORIAL @@ -331,8 +331,10 @@ handle argument parsing for plugin commands in a very nice and very powerful way. With no arguments, we simply need to just wrap it. For more in-depth information on using wrap check out the wrap tutorial (The astute Python programmer may note that this is very much like a decorator, and that's -precisely what it is. However rather than use the @decorator syntax from Python -2.4 we elect to stick with this syntax to remain compatible with Python 2.3.) +precisely what it is. However, we developed this before decorators existed and +haven't changed the syntax due to our earlier requirement to stay compatible +with Python 2.3. As we now require Python 2.4 or greater, this may eventually +change to support work via decorators.) Now let's create a command with some arguments and see how we use those in our plugin commands. Let's allow the user to seed our RNG with their own seed diff --git a/scripts/supybot b/scripts/supybot index 6533f72b8..ce06f0ec0 100644 --- a/scripts/supybot +++ b/scripts/supybot @@ -44,8 +44,8 @@ import shutil import signal import cStringIO as StringIO -if sys.version_info < (2, 3, 0): - sys.stderr.write('This program requires Python >= 2.3.0') +if sys.version_info < (2, 4, 0): + sys.stderr.write('This program requires Python >= 2.4.0') sys.stderr.write(os.linesep) sys.exit(-1) diff --git a/scripts/supybot-plugin-create b/scripts/supybot-plugin-create index 6fcab9256..92aa431ae 100644 --- a/scripts/supybot-plugin-create +++ b/scripts/supybot-plugin-create @@ -43,8 +43,8 @@ def error(s): sys.stderr.write(os.linesep) sys.exit(-1) -if sys.version_info < (2, 3, 0): - error('This script requires Python 2.3 or newer.') +if sys.version_info < (2, 4, 0): + error('This script requires Python 2.4 or newer.') import supybot.conf as conf from supybot.questions import * diff --git a/scripts/supybot-wizard b/scripts/supybot-wizard index 184c5d50c..9fe515d5c 100644 --- a/scripts/supybot-wizard +++ b/scripts/supybot-wizard @@ -39,8 +39,8 @@ def error(s): sys.stderr.write(os.linesep) sys.exit(-1) -if sys.version_info < (2, 3, 0): - error('This program requires Python >= 2.3.0') +if sys.version_info < (2, 4, 0): + error('This program requires Python >= 2.4.0') import supybot diff --git a/setup.py b/setup.py index e19de1248..f3af1624d 100644 --- a/setup.py +++ b/setup.py @@ -32,8 +32,8 @@ import sys -if sys.version_info < (2, 3, 0): - sys.stderr.write("Supybot requires Python 2.3 or newer.\n") +if sys.version_info < (2, 4, 0): + sys.stderr.write("Supybot requires Python 2.4 or newer.\n") sys.exit(-1) import textwrap