From 40fad2ece80e8bf6784e137028645fa66a3cd9c2 Mon Sep 17 00:00:00 2001 From: Thomas Waldmann Date: Sat, 18 May 2013 17:06:25 +0200 Subject: [PATCH] document python 2.6 minimum requirement, remove all stuff that refers to 2.5 --- .travis.yml | 1 - CHANGES | 2 ++ docs/extensiondev.rst | 2 +- docs/installation.rst | 2 +- docs/patterns/jquery.rst | 4 ---- docs/tutorial/dbinit.rst | 7 ++----- flask/json.py | 3 +-- flask/wrappers.py | 2 -- scripts/flask-07-upgrade.py | 4 +--- setup.py | 1 - 10 files changed, 8 insertions(+), 20 deletions(-) diff --git a/.travis.yml b/.travis.yml index fd590bea..307945bf 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,6 @@ language: python python: - - 2.5 - 2.6 - 2.7 - pypy diff --git a/CHANGES b/CHANGES index e383b56f..af3c4752 100644 --- a/CHANGES +++ b/CHANGES @@ -54,6 +54,8 @@ Release date to be decided. - Added `message_flashed` signal that simplifies flashing testing. - Added support for copying of request contexts for better working with greenlets. +- Python requirements changed: requiring Python 2.6 or 2.7 now to prepare + for Python 3.3 port. Version 0.9 ----------- diff --git a/docs/extensiondev.rst b/docs/extensiondev.rst index 0615e4db..09bf2d2c 100644 --- a/docs/extensiondev.rst +++ b/docs/extensiondev.rst @@ -390,7 +390,7 @@ extension to be approved you have to follow these guidelines: (``PackageName==dev``). 9. The ``zip_safe`` flag in the setup script must be set to ``False``, even if the extension would be safe for zipping. -10. An extension currently has to support Python 2.5, 2.6 as well as +10. An extension currently has to support Python 2.6 as well as Python 2.7 diff --git a/docs/installation.rst b/docs/installation.rst index 5e4673dd..16475383 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -13,7 +13,7 @@ So how do you get all that on your computer quickly? There are many ways you could do that, but the most kick-ass method is virtualenv, so let's have a look at that first. -You will need Python 2.5 or higher to get started, so be sure to have an +You will need Python 2.6 or higher to get started, so be sure to have an up-to-date Python 2.x installation. Python 3.x is not supported. .. _virtualenv: diff --git a/docs/patterns/jquery.rst b/docs/patterns/jquery.rst index 1bd49533..7aaa2803 100644 --- a/docs/patterns/jquery.rst +++ b/docs/patterns/jquery.rst @@ -11,11 +11,7 @@ Python primitives (numbers, strings, dicts and lists) look like which is widely supported and very easy to parse. It became popular a few years ago and quickly replaced XML as transport format in web applications. -If you have Python 2.6 JSON will work out of the box, in Python 2.5 you -will have to install the `simplejson`_ library from PyPI. - .. _jQuery: http://jquery.com/ -.. _simplejson: http://pypi.python.org/pypi/simplejson Loading jQuery -------------- diff --git a/docs/tutorial/dbinit.rst b/docs/tutorial/dbinit.rst index 6415cdaa..b32a8eda 100644 --- a/docs/tutorial/dbinit.rst +++ b/docs/tutorial/dbinit.rst @@ -21,12 +21,9 @@ errors. It's a good idea to add a function that initializes the database for you to the application. If you want to do that, you first have to import the -:func:`contextlib.closing` function from the contextlib package. If you -want to use Python 2.5 it's also necessary to enable the `with` statement -first (`__future__` imports must be the very first import). Accordingly, -add the following lines to your existing imports in `flaskr.py`:: +:func:`contextlib.closing` function from the contextlib package. +Accordingly, add the following lines to your existing imports in `flaskr.py`:: - from __future__ import with_statement from contextlib import closing Next we can create a function called `init_db` that initializes the diff --git a/flask/json.py b/flask/json.py index 717eb2ab..52e5680e 100644 --- a/flask/json.py +++ b/flask/json.py @@ -161,8 +161,7 @@ def jsonify(*args, **kwargs): "id": 42 } - This requires Python 2.6 or an installed version of simplejson. For - security reasons only objects are supported toplevel. For more + For security reasons only objects are supported toplevel. For more information about this, have a look at :ref:`json-security`. .. versionadded:: 0.2 diff --git a/flask/wrappers.py b/flask/wrappers.py index a56fe5d7..d348ee0a 100644 --- a/flask/wrappers.py +++ b/flask/wrappers.py @@ -92,8 +92,6 @@ class Request(RequestBase): def json(self): """If the mimetype is `application/json` this will contain the parsed JSON data. Otherwise this will be `None`. - - This requires Python 2.6 or an installed version of simplejson. """ if self.mimetype == 'application/json': request_charset = self.mimetype_params.get('charset') diff --git a/scripts/flask-07-upgrade.py b/scripts/flask-07-upgrade.py index 4027d8ce..e1017e69 100644 --- a/scripts/flask-07-upgrade.py +++ b/scripts/flask-07-upgrade.py @@ -287,9 +287,7 @@ def main(): args = ['.'] if ast is None: - parser.error('Python 2.6 or later is required to run the upgrade script.\n' - 'The runtime requirements for Flask 0.7 however are still ' - 'Python 2.5.') + parser.error('Python 2.6 or later is required to run the upgrade script.') for path in args: scan_path(path, teardown=not options.no_teardown) diff --git a/setup.py b/setup.py index 2f9c95ca..ba5f4a67 100644 --- a/setup.py +++ b/setup.py @@ -101,7 +101,6 @@ setup( 'License :: OSI Approved :: BSD License', 'Operating System :: OS Independent', 'Programming Language :: Python', - 'Programming Language :: Python :: 2.5', 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', 'Topic :: Internet :: WWW/HTTP :: Dynamic Content',