From 366b8e0f1fd3d5e704a446926932b944a576781f Mon Sep 17 00:00:00 2001 From: Oskar Hahn Date: Fri, 14 Dec 2012 14:21:53 +0100 Subject: [PATCH] Droped support for python 2.5 --- .travis.yml | 1 - INSTALL.txt | 6 +++--- openslides/main.py | 3 --- openslides/motion/views.py | 8 +------- openslides/participant/api.py | 3 --- openslides/participant/views.py | 9 +-------- openslides/utils/pdf.py | 3 +-- openslides/utils/utils.py | 6 +----- openslides/utils/views.py | 6 +----- 9 files changed, 8 insertions(+), 37 deletions(-) diff --git a/.travis.yml b/.travis.yml index f91d92918..6839308e9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,5 @@ language: python python: - - "2.5" - "2.6" - "2.7" install: diff --git a/INSTALL.txt b/INSTALL.txt index f57e7f00e..739431350 100644 --- a/INSTALL.txt +++ b/INSTALL.txt @@ -18,7 +18,7 @@ I. Installation on GNU/Linux and MacOSX using the Python Package Index (PyPI) 1. Check requirements: Make sure that you have installed Python Programming Language 2 - (>= 2.5) on your system. + (>= 2.6) on your system. 2. Setup a virtual environment with virtualenv (optional): @@ -65,7 +65,7 @@ II. Installation on GNU/Linux and MacOSX using the sources OpenSlides requires following programs, which should be installed first: - + Python Programming Language 2 (>= 2.5) + + Python Programming Language 2 (>= 2.6) + virtualenv (>= 1.4.1) + ReportLab Toolkit + Python Imaging Library (PIL) @@ -141,7 +141,7 @@ portable version you should run the following install steps. The OpenSlides install requires following programs, which should be installed first: - + Python Programming Language 2 (>= 2.5) + + Python Programming Language 2 (>= 2.6) + Setuptools a) Download and run 32bit MSI installer from http://www.python.org/: diff --git a/openslides/main.py b/openslides/main.py index bc23fb3bd..d25305a4d 100755 --- a/openslides/main.py +++ b/openslides/main.py @@ -10,9 +10,6 @@ :license: GNU GPL, see LICENSE for more details. """ -# for python 2.5 support -from __future__ import with_statement - import base64 import ctypes import optparse diff --git a/openslides/motion/views.py b/openslides/motion/views.py index 76b2ba4c3..deff7eaef 100644 --- a/openslides/motion/views.py +++ b/openslides/motion/views.py @@ -10,16 +10,10 @@ :license: GNU GPL, see LICENSE for more details. """ -# for python 2.5 support -from __future__ import with_statement - import csv import os -try: - from urlparse import parse_qs -except ImportError: # python <= 2.5 - from cgi import parse_qs +from urlparse import parse_qs from reportlab.lib import colors from reportlab.lib.units import cm diff --git a/openslides/participant/api.py b/openslides/participant/api.py index fb5325628..f7b5a80a2 100644 --- a/openslides/participant/api.py +++ b/openslides/participant/api.py @@ -10,9 +10,6 @@ :license: GNU GPL, see LICENSE for more details. """ -# for python 2.5 support -from __future__ import with_statement - from random import choice import csv diff --git a/openslides/participant/views.py b/openslides/participant/views.py index 34cb032a0..9081ec87b 100644 --- a/openslides/participant/views.py +++ b/openslides/participant/views.py @@ -10,15 +10,8 @@ :license: GNU GPL, see LICENSE for more details. """ -# for python 2.5 support -from __future__ import with_statement - from urllib import urlencode - -try: - from urlparse import parse_qs -except ImportError: # python <= 2.5 grab it from cgi - from cgi import parse_qs +from urlparse import parse_qs from reportlab.lib import colors from reportlab.lib.units import cm diff --git a/openslides/utils/pdf.py b/openslides/utils/pdf.py index 4064f109e..cf6db3c44 100755 --- a/openslides/utils/pdf.py +++ b/openslides/utils/pdf.py @@ -21,8 +21,7 @@ from reportlab.rl_config import defaultPageSize from django.conf import settings from django.utils import formats -# Import gettext for python 2.5 support -from django.utils.translation import ugettext as _, gettext +from django.utils.translation import ugettext as _ from openslides.config.models import config diff --git a/openslides/utils/utils.py b/openslides/utils/utils.py index fa5f96d5e..3225318fc 100644 --- a/openslides/utils/utils.py +++ b/openslides/utils/utils.py @@ -11,11 +11,7 @@ """ import sys - -try: - import json -except ImportError: # For python 2.5 support - import simplejson as json +import json from django.contrib import messages from django.contrib.auth.models import Permission diff --git a/openslides/utils/views.py b/openslides/utils/views.py index b9d1fc4b9..fbc742bf4 100644 --- a/openslides/utils/views.py +++ b/openslides/utils/views.py @@ -10,11 +10,7 @@ :license: GNU GPL, see LICENSE for more details. """ -try: - import json -except ImportError: - # for python 2.5 support - import simplejson as json +import json try: from cStringIO import StringIO