diff options
| author | Ramiro Morales <cramm0@gmail.com> | 2011-06-09 20:01:28 +0000 |
|---|---|---|
| committer | Ramiro Morales <cramm0@gmail.com> | 2011-06-09 20:01:28 +0000 |
| commit | dff31de20aac85e4f4834c2466762cbf23fc0a7b (patch) | |
| tree | 6d7d6756f53eb599b81827bf097f24cfb1ed7b54 /docs/topics | |
| parent | da0c7cd7778ee99a31587276faee30e94a8255ae (diff) | |
Fixed #16155 -- Removed Python 2.4 compatibility constructs from code and mentions from docs. Thanks Aymeric Augustin for the report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16349 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs/topics')
| -rw-r--r-- | docs/topics/db/transactions.txt | 8 | ||||
| -rw-r--r-- | docs/topics/install.txt | 7 | ||||
| -rw-r--r-- | docs/topics/logging.txt | 8 | ||||
| -rw-r--r-- | docs/topics/testing.txt | 2 |
4 files changed, 5 insertions, 20 deletions
diff --git a/docs/topics/db/transactions.txt b/docs/topics/db/transactions.txt index b2539d8f06..c316bbf143 100644 --- a/docs/topics/db/transactions.txt +++ b/docs/topics/db/transactions.txt @@ -79,9 +79,6 @@ These functions, described in detail below, can be used in two different ways: # this code executes inside a transaction # ... - This technique works with all supported version of Python (that is, with - Python 2.4 and greater). - * As a `context manager`_ around a particular block of code:: from django.db import transaction @@ -96,8 +93,9 @@ These functions, described in detail below, can be used in two different ways: # this code executes inside a transaction # ... - The ``with`` statement is new in Python 2.5, and so this syntax can only - be used with Python 2.5 and above. +Both techniques work with all supported version of Python. However, in Python +2.5, you must add ``from __future__ import with_statement`` at the beginning +of your module if you are using the ``with`` statement. .. _decorator: http://docs.python.org/glossary.html#term-decorator .. _context manager: http://docs.python.org/glossary.html#term-context-manager diff --git a/docs/topics/install.txt b/docs/topics/install.txt index ffa445f358..46d6615a82 100644 --- a/docs/topics/install.txt +++ b/docs/topics/install.txt @@ -9,7 +9,7 @@ Install Python Being a Python Web framework, Django requires Python. -It works with any Python version from 2.4 to 2.7 (due to backwards +It works with any Python version from 2.5 to 2.7 (due to backwards incompatibilities in Python 3.0, Django does not currently work with Python 3.0; see :doc:`the Django FAQ </faq/install>` for more information on supported Python versions and the 3.0 transition). @@ -102,11 +102,6 @@ database bindings are installed. will also want to read the database-specific :ref:`notes for the MySQL backend <mysql-notes>`. -* If you're using SQLite and Python 2.4, you'll need pysqlite_. Use version - 2.0.3 or higher. Python 2.5 ships with an SQLite wrapper in the standard - library, so you don't need to install anything extra in that case. Please - read the :ref:`SQLite backend notes <sqlite-notes>`. - * If you're using Oracle, you'll need a copy of cx_Oracle_, but please read the database-specific :ref:`notes for the Oracle backend <oracle-notes>` for important information regarding supported versions of both Oracle and diff --git a/docs/topics/logging.txt b/docs/topics/logging.txt index e2c9f72ea6..06050af899 100644 --- a/docs/topics/logging.txt +++ b/docs/topics/logging.txt @@ -441,10 +441,6 @@ Messages to this logger have the following extra context: * ``request``: The request object that generated the logging message. -.. note:: - Due to a limitation in the logging library, this extra - context is not available if you are using Python 2.4. - ``django.db.backends`` ~~~~~~~~~~~~~~~~~~~~~~ @@ -462,10 +458,6 @@ For performance reasons, SQL logging is only enabled when ``settings.DEBUG`` is set to ``True``, regardless of the logging level or handlers that are installed. -.. note:: - Due to a limitation in the logging library, this extra - context is not available if you are using Python 2.4. - Handlers -------- diff --git a/docs/topics/testing.txt b/docs/topics/testing.txt index 3f25dfff9f..a21ad6a77e 100644 --- a/docs/topics/testing.txt +++ b/docs/topics/testing.txt @@ -79,7 +79,7 @@ module defines tests in class-based approach. adding some extremely useful features. To ensure that every Django project can benefit from these new features, Django ships with a copy of unittest2_, a copy of the Python 2.7 unittest library, - backported for Python 2.4 compatibility. + backported for Python 2.5 compatibility. To access this library, Django provides the ``django.utils.unittest`` module alias. If you are using Python |
