Ticket #10031: 10031-sqlite-docs-fixes-r10254.diff

File 10031-sqlite-docs-fixes-r10254.diff, 7.4 KB (added by Ramiro Morales, 15 years ago)

Patch with documentation fixes

  • docs/ref/databases.txt

    diff -r 6da4aff0f684 docs/ref/databases.txt
    a b  
    351351
    352352.. _documented at sqlite.org: http://www.sqlite.org/faq.html#q18
    353353
    354 Versions prior to 3.3.6
    355 ------------------------
     354Version 3.3.6 or newer of SQLite strongly recommended
     355-----------------------------------------------------
    356356
    357 Versions of SQLite 3.3.5 and older `contain a bug`_ when handling ``ORDER BY``
    358 parameters. This can cause problems when you use the ``select`` parameter for
    359 the ``extra()`` QuerySet method. The bug can be identified by the error message
    360 ``OperationalError: ORDER BY terms must not be non-integer constants``. The
    361 problem can be solved updating SQLite to version 3.3.6 or newer, possibly also
    362 updating the ``pysqlite2`` Python module in the process.
     357Versions of SQLite 3.3.5 and older contains the following bugs:
    363358
    364 .. _contain a bug: http://www.sqlite.org/cvstrac/tktview?tn=1768
     359 * A bug when `handling`_ ``ORDER BY`` parameters. This can cause problems when
     360   you use the ``select`` parameter for the ``extra()`` QuerySet method. The bug
     361   can be identified by the error message ``OperationalError: ORDER BY terms
     362   must not be non-integer constants``.
    365363
    366 This has a very low impact because 3.3.6 was released in April 2006, so most
    367 current binary distributions for different platforms include newer version of
    368 SQLite usable from Python through either the ``pysqlite2`` or the ``sqlite3``
    369 modules.
     364 * A bug when handling `aggregation`_ together with DateFields and
     365   DecimalFields.
    370366
    371 However, in the case of Windows, the official binary distribution of the stable
    372 release of Python 2.5 (2.5.2, as of this writing) includes SQLite 3.3.4, so the bug can
    373 make itself evident in that platform. There are (as of Django 1.0) even three
    374 tests in the Django test suite that will fail when run under this setup.  As
    375 described above, this can be solved by downloading and installing a newer
    376 version of ``pysqlite2`` (``pysqlite-2.x.x.win32-py2.5.exe``) that includes and
    377 uses a newer version of SQLite. Python 2.6 ships with a newer version of
    378 SQLite and is not affected by this issue.
     367.. _handling: http://www.sqlite.org/cvstrac/tktview?tn=1768
     368.. _aggregation: http://code.djangoproject.com/ticket/10031
    379369
    380 If you are on such a platform and find yourself needing to update
    381 ``pysqlite``/SQLite, you will also need to manually modify the
    382 ``django/db/backends/sqlite3/base.py`` file in the Django source tree so it
    383 attempts to import ``pysqlite2`` before ``sqlite3`` and so it can take
    384 advantage of the new ``pysqlite2``/SQLite versions.
     370SQLite 3.3.6 was released in April 2006, so most current binary distributions
     371for different platforms include newer version of SQLite usable from Python
     372through either the ``pysqlite2`` or the ``sqlite3`` modules.
     373
     374However, some platform/Python version combinations include older versions of
     375SQLite (e.g. the official binary distribution of Python 2.5 for Windows, 2.5.4
     376as of this writing, includes SQLite 3.3.4). There are (as of Django 1.1) even
     377some tests in the Django test suite that will fail when run under this setup.
     378
     379As described :ref:`below<using-newer-versions-of-pysqlite>`, this can be solved
     380by downloading and installing a newer version of ``pysqlite2``
     381(``pysqlite-2.x.x.win32-py2.5.exe`` in the described case) that includes and
     382uses a newer version of SQLite. Python 2.6 for Windows ships with a version of
     383SQLite that is not affected by these issues.
    385384
    386385Version 3.5.9
    387386-------------
    388387
    389 The Ubuntu "Intrepid Ibex" SQLite 3.5.9-3 package contains a bug that causes
    390 problems with the evaluation of query expressions. If you are using Ubuntu
    391 "Intrepid Ibex", you will need to find an alternate source for SQLite
     388The Ubuntu "Intrepid Ibex" (8.10) SQLite 3.5.9-3 package contains a bug that
     389causes problems with the evaluation of query expressions. If you are using
     390Ubuntu "Intrepid Ibex", you will need to update the package to version
     3913.5.9-3ubuntu1 or newer (recommended) or find an alternate source for SQLite
    392392packages, or install SQLite from source.
    393393
    394394At one time, Debian Lenny shipped with the same malfunctioning SQLite 3.5.9-3
     
    410410You should avoid using this version of SQLite with Django. Either upgrade to
    4114113.6.3 (released September 22, 2008) or later, or downgrade to an earlier
    412412version of SQLite.
     413
     414.. _using-newer-versions-of-pysqlite:
     415
     416Using newer versions of the SQLite DB-API 2.0 driver
     417----------------------------------------------------
     418
     419.. versionadded:: 1.1
     420
     421For versions of Python 2.5 or newer that include ``sqlite3`` in the standard
     422library Django will now use a ``pysqlite2`` interface in preference to
     423``sqlite3`` if it finds one is available.
     424
     425This provides the ability to upgrade both the DB-API 2.0 interface or SQLite 3
     426itself to versions newer than the ones included with your particular Python
     427binary distribution, if needed.
    413428
    414429.. _oracle-notes:
    415430
  • docs/topics/install.txt

    diff -r 6da4aff0f684 docs/topics/install.txt
    a b  
    8080* If you're using SQLite and either Python 2.3 or Python 2.4, you'll need
    8181  pysqlite_. Use version 2.0.3 or higher. Python 2.5 ships with an SQLite
    8282  wrapper in the standard library, so you don't need to install anything extra
    83   in that case.
     83  in that case. Please read the SQLite backend :ref:`notes<sqlite-notes>`.
    8484
    8585* If you're using Oracle, you'll need a copy of cx_Oracle_, but please
    8686  read the database-specific notes for the
     
    106106.. _compiled Windows version: http://stickpeople.com/projects/python/win-psycopg/
    107107.. _MySQLdb: http://sourceforge.net/projects/mysql-python
    108108.. _SQLite: http://www.sqlite.org/
    109 .. _pysqlite: http://initd.org/pub/software/pysqlite/
     109.. _pysqlite: http://pysqlite.org/
    110110.. _cx_Oracle: http://cx-oracle.sourceforge.net/
    111111.. _Oracle: http://www.oracle.com/
    112112
     
    132132    The location of the ``site-packages`` directory depends on the operating
    133133    system, and the location in which Python was installed. To find out your
    134134    system's ``site-packages`` location, execute the following:
    135    
     135
    136136    .. code-block:: bash
    137137
    138138        python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()"
    139139
    140140    (Note that this should be run from a shell prompt, not a Python interactive
    141141    prompt.)
    142    
     142
    143143.. _install-django-code:
    144144
    145145Install the Django code
     
    190190~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    191191
    192192.. admonition:: Tracking Django development
    193    
     193
    194194    If you decide to use the latest development version of Django,
    195195    you'll want to pay close attention to `the development timeline`_,
    196196    and you'll want to keep an eye on `the list of
     
    2192193. Next, make sure that the Python interpreter can load Django's code. There
    220220   are various ways of accomplishing this.  One of the most convenient, on
    221221   Linux, Mac OSX or other Unix-like systems, is to use a symbolic link:
    222    
     222
    223223   .. code-block:: bash
    224224
    225225       ln -s `pwd`/django-trunk/django SITE-PACKAGES-DIR/django
     
    2482484. On Unix-like systems, create a symbolic link to the file
    249249   ``django-trunk/django/bin/django-admin.py`` in a directory on your system
    250250   path, such as ``/usr/local/bin``. For example:
    251    
     251
    252252   .. code-block:: bash
    253253
    254254       ln -s `pwd`/django-trunk/django/bin/django-admin.py /usr/local/bin
Back to Top