### Eclipse Workspace Patch 1.0
#P django-trunk
Index: docs/howto/apache-auth.txt
===================================================================
--- docs/howto/apache-auth.txt	(revision 13402)
+++ docs/howto/apache-auth.txt	(working copy)
@@ -4,6 +4,13 @@
 Authenticating against Django's user database from Apache
 =========================================================
 
+.. warning::
+
+    Support for mod_python will be deprecated in a future release of Django.
+    At that time, this method of authentication will no longer be provided by
+    Django. The community is welcome to offer its own alternate solutions
+    using WSGI middleware or other approaches.
+
 Since keeping multiple authentication databases in sync is a common problem when
 dealing with Apache, you can configuring Apache to authenticate against Django's
 :ref:`authentication system <topics-auth>` directly. For example, you
Index: docs/howto/static-files.txt
===================================================================
--- docs/howto/static-files.txt	(revision 13402)
+++ docs/howto/static-files.txt	(working copy)
@@ -33,7 +33,7 @@
 production setting. Use this only for development.
 
 For information on serving static files in an Apache production environment,
-see the :ref:`Django mod_python documentation <serving-media-files>`.
+see the :ref:`Django mod_wsgi documentation <serving-media-files>`.
 
 How to do it
 ============
Index: docs/howto/deployment/fastcgi.txt
===================================================================
--- docs/howto/deployment/fastcgi.txt	(revision 13402)
+++ docs/howto/deployment/fastcgi.txt	(working copy)
@@ -22,14 +22,14 @@
 (via a socket) to FastCGI, which executes the code and passes the response back
 to the Web server, which, in turn, passes it back to the client's Web browser.
 
-Like mod_python, FastCGI allows code to stay in memory, allowing requests to be
-served with no startup time. Unlike mod_python_ (or `mod_perl`_), a FastCGI
-process doesn't run inside the Web server process, but in a separate,
+Like mod_wsgi, FastCGI allows code to stay in memory, allowing requests to be
+served with no startup time. While mod_wsgi can either be configured embedded
+in the Apache webserver process or as a separate daemon process, a FastCGI
+process never runs inside the Web server process, always in a separate,
 persistent process.
 
 .. _mod_wsgi: http://code.google.com/p/modwsgi/
 .. _mod_perl: http://perl.apache.org/
-.. _mod_python: http://www.modpython.org/
 
 .. admonition:: Why run code in a separate process?
 
@@ -37,8 +37,7 @@
     languages (most notably PHP, Python and Perl) inside the process space of
     your Web server. Although this lowers startup time -- because code doesn't
     have to be read off disk for every request -- it comes at the cost of
-    memory use. For mod_python, for example, every Apache process gets its own
-    Python interpreter, which uses up a considerable amount of RAM.
+    memory use.
 
     Due to the nature of FastCGI, it's even possible to have processes that run
     under a different user account than the Web server process. That's a nice
@@ -363,7 +362,7 @@
 
 Regardless of the server and configuration you eventually decide to use, you
 will also need to give some thought to how to serve the admin media files. The
-advice given in the :ref:`modpython <serving-the-admin-files>` documentation
+advice given in the :ref:`mod_wsgi <serving-the-admin-files>` documentation
 is also applicable in the setups detailed above.
 
 Forcing the URL prefix to a particular value
Index: docs/ref/signals.txt
===================================================================
--- docs/ref/signals.txt	(revision 13402)
+++ docs/ref/signals.txt	(working copy)
@@ -376,8 +376,7 @@
 Arguments sent with this signal:
 
     ``sender``
-        The handler class -- i.e.
-        :class:`django.core.handlers.modpython.ModPythonHandler` or
+        The handler class -- e.g.
         :class:`django.core.handlers.wsgi.WsgiHandler` -- that handled
         the request.
 
Index: docs/topics/settings.txt
===================================================================
--- docs/topics/settings.txt	(revision 13402)
+++ docs/topics/settings.txt	(working copy)
@@ -66,20 +66,18 @@
 
 .. _django-admin.py: ../django-admin/
 
-On the server (mod_python)
+On the server (mod_wsgi)
 --------------------------
 
-In your live server environment, you'll need to tell Apache/mod_python which
-settings file to use. Do that with ``SetEnv``::
+In your live server environment, you'll need to tell your WSGI application what
+settings file to use. Do that with ``os.environ``::
 
-    <Location "/mysite/">
-        SetHandler python-program
-        PythonHandler django.core.handlers.modpython
-        SetEnv DJANGO_SETTINGS_MODULE mysite.settings
-    </Location>
+    import os
+    
+    os.environ['DJANGO_SETTINGS_MODULE'] = 'mysite.settings'
 
-Read the :ref:`Django mod_python documentation <howto-deployment-modpython>` for
-more information.
+Read the :ref:`Django mod_wsgi documentation <howto-deployment-modwsgi>` for
+more information and other common elements to a Django WSGI application.
 
 Default settings
 ================
Index: docs/howto/deployment/modpython.txt
===================================================================
--- docs/howto/deployment/modpython.txt	(revision 13402)
+++ docs/howto/deployment/modpython.txt	(working copy)
@@ -4,6 +4,13 @@
 How to use Django with Apache and mod_python
 ============================================
 
+.. warning::
+
+    Support for mod_python will be deprecated in a future release of Django. If
+    you are configuring a new deployment, you are strongly encouraged to
+    consider using :ref:`mod_wsgi <howto-deployment-modwsgi>` or any of the
+    other :ref:`supported backends <howto-deployment-index>`.
+
 .. highlight:: apache
 
 The `mod_python`_ module for Apache_ can be used to deploy Django to a
@@ -216,8 +223,6 @@
 
 .. _mod_python documentation: http://modpython.org/live/current/doc-html/directives.html
 
-.. _serving-media-files:
-
 Serving media files
 ===================
 
@@ -269,10 +274,6 @@
 .. _Apache: http://httpd.apache.org/
 .. _Cherokee: http://www.cherokee-project.com/
 
-.. _howto-deployment-modpython-serving-the-admin-files:
-
-.. _serving-the-admin-files:
-
 Serving the admin files
 =======================
 
Index: docs/howto/deployment/modwsgi.txt
===================================================================
--- docs/howto/deployment/modwsgi.txt	(revision 13402)
+++ docs/howto/deployment/modwsgi.txt	(working copy)
@@ -55,6 +55,8 @@
 replace 'mysite.settings' with your correct settings file, and '/usr/local/django'
 with your own project's location.
 
+.. _serving-media-files:
+
 Serving media files
 ===================
 
@@ -108,6 +110,29 @@
 
 .. _hosting static files: http://code.google.com/p/modwsgi/wiki/ConfigurationGuidelines#Hosting_Of_Static_Files
 
+.. _serving-the-admin-files:
+
+Serving the admin files
+=======================
+
+Note that the Django development server automagically serves admin media files,
+but this is not the case when you use any other server arrangement. You're
+responsible for setting up Apache, or whichever media server you're using, to
+serve the admin files.
+
+The admin files live in (:file:`django/contrib/admin/media`) of the Django
+distribution.
+
+Here are two recommended approaches:
+
+    1. Create a symbolic link to the admin media files from within your
+       document root. This way, all of your Django-related files -- code **and**
+       templates -- stay in one place, and you'll still be able to ``svn
+       update`` your code to get the latest admin templates, if they change.
+
+    2. Or, copy the admin media files so that they live within your Apache
+       document root.
+
 Details
 =======
 
Index: django/core/handlers/modpython.py
===================================================================
--- django/core/handlers/modpython.py	(revision 13402)
+++ django/core/handlers/modpython.py	(working copy)
@@ -1,5 +1,6 @@
 import os
 from pprint import pformat
+from warnings import warn
 
 from django import http
 from django.core import signals
@@ -179,6 +180,11 @@
     request_class = ModPythonRequest
 
     def __call__(self, req):
+        warn(('Support for serving Django requests with mod_python will be '
+              'deprecated in a future release in favor of the mod_wsgi '
+              'backend.'),
+             PendingDeprecationWarning)
+        
         # mod_python fakes the environ, and thus doesn't process SetEnv.  This fixes that
         os.environ.update(req.subprocess_env)
 
Index: docs/ref/contrib/gis/deployment.txt
===================================================================
--- docs/ref/contrib/gis/deployment.txt	(revision 13402)
+++ docs/ref/contrib/gis/deployment.txt	(working copy)
@@ -59,6 +59,12 @@
 ``mod_python``
 --------------
 
+.. warning::
+    Support for mod_python will be deprecated in a future release of Django. If
+    you are configuring a new deployment, you are strongly encouraged to
+    consider using :ref:`mod_wsgi <howto-deployment-modwsgi>` or any of the
+    other :ref:`supported backends <howto-deployment-index>`.
+
 Example::
 
     <VirtualHost *:80>
Index: docs/releases/1.3.txt
===================================================================
--- docs/releases/1.3.txt	(revision 13402)
+++ docs/releases/1.3.txt	(working copy)
@@ -19,13 +19,45 @@
 =====================================
 
 
+.. _deprecated-features-1.3:
 
 Features deprecated in 1.3
 ==========================
 
+Django 1.3 deprecates some features from earlier releases.
+These features are still supported, but will be gradually phased out
+over the next few release cycles.
 
+Code taking advantage of any of the features below will raise a
+``PendingDeprecationWarning`` in Django 1.3. This warning will be
+silent by default, but may be turned on using Python's `warnings
+module`_, or by running Python with a ``-Wd`` or `-Wall` flag.
 
+.. _warnings module: http://docs.python.org/library/warnings.html
+
+In Django 1.4, these warnings will become a ``DeprecationWarning``,
+which is *not* silent. In Django 1.5 support for these features will
+be removed entirely.
+
+.. seealso::
+
+    For more details, see the documentation :ref:`Django's release process
+    <internals-release-process>` and our :ref:`deprecation timeline
+    <internals-deprecation>`.`
+
+``mod_python`` support
+----------------------
+
+The ``mod_python`` library has not had a release since 2007 or a commit since
+2008. The Apache Foundation board voted to remove ``mod_python`` from the set
+of active projects in its version control repositories, and its lead developer
+has shifted all of his efforts toward the lighter, slimmer, more stable, and
+more flexible ``mod_wsgi`` backend.
+
+If you are currently using the ``mod_python`` request handler, it is strongly
+encouraged you redeploy your Django instances using :ref:`mod_wsgi
+<howto-deployment-modwsgi>`.
+
 What's new in Django 1.3
 ========================
 
-
Index: docs/internals/deprecation.txt
===================================================================
--- docs/internals/deprecation.txt	(revision 13402)
+++ docs/internals/deprecation.txt	(working copy)
@@ -99,6 +99,10 @@
 
         * The ``no`` language code has been deprecated in favor of the ``nb``
           language code.
+    
+    * 1.5
+        * The ``mod_python`` request handler has been deprecated since the 1.3
+          release. The ``mod_wsgi`` handler should be used instead.
 
     * 2.0
         * ``django.views.defaults.shortcut()``. This function has been moved
Index: docs/index.txt
===================================================================
--- docs/index.txt	(revision 13402)
+++ docs/index.txt	(working copy)
@@ -152,7 +152,6 @@
     * **Deployment:**
       :ref:`Overview <howto-deployment-index>` |
       :ref:`Apache/mod_wsgi <howto-deployment-modwsgi>` |
-      :ref:`Apache/mod_python <howto-deployment-modpython>` |
       :ref:`FastCGI/SCGI/AJP <howto-deployment-fastcgi>` |
       :ref:`Apache authentication <howto-apache-auth>` |
       :ref:`Serving static files <howto-static-files>` |
Index: docs/topics/install.txt
===================================================================
--- docs/topics/install.txt	(revision 13402)
+++ docs/topics/install.txt	(working copy)
@@ -34,22 +34,29 @@
 need to set up Apache until you're ready to deploy Django in production.
 
 If you want to use Django on a production site, use Apache with `mod_wsgi`_.
-mod_wsgi is similar to mod_perl -- it embeds Python within Apache and loads
-Python code into memory when the server starts. Code stays in memory throughout
-the life of an Apache process, which leads to significant performance gains over
-other server arrangements. Make sure you have Apache installed, with the
-mod_wsgi module activated. Django will work with any version of Apache that
+mod_wsgi can operate in one of two modes: an embedded mode and a daemon
+mode. With the embedded mode, mod_wsgi is similar to mod_perl -- it embeds 
+Python within Apache and loads Python code into memory when the server starts. 
+Code stays in memory throughout the life of an Apache process, which leads to 
+significant performance gains over other server arrangements. With the daemon
+mode, mod_wsgi spawns an independent daemon process that handles requests. The
+daemon process can run as a different user than the webserver, possibly leading
+to improved security, and the daemon process can be restarted without restarting
+the entire Apache webserver, possibly making refreshing your codebase more
+seamless. Consult the mod_wsgi documentation to determine which mode is right
+for your setup. Make sure you have Apache installed, with the mod_wsgi module 
+activated. Django will work with any version of Apache that
 supports mod_wsgi.
 
 See :ref:`How to use Django with mod_wsgi <howto-deployment-modwsgi>` for
 information on how to configure mod_wsgi once you have it installed.
 
 If you can't use mod_wsgi for some reason, fear not: Django supports many other
-deployment options. A great second choice is :ref:`mod_python
-<howto-deployment-modpython>`, the predecessor to mod_wsgi. Additionally, Django
-follows the WSGI_ spec, which allows it to run on a variety of server platforms.
-See the `server-arrangements wiki page`_ for specific installation instructions
-for each platform.
+deployment options. A great second choice is :ref:`FastCGI
+<howto-deployment-fastcgi>`, perfect for using Django with servers other than
+Apache. Additionally, Django follows the WSGI_ spec, which allows it to run on a
+variety of server platforms. See the `server-arrangements wiki page`_ for 
+specific installation instructions for each platform.
 
 .. _Apache: http://httpd.apache.org/
 .. _mod_wsgi: http://code.google.com/p/modwsgi/
@@ -257,15 +264,15 @@
    links. (Environment variables can be defined on Windows systems `from the
    Control Panel`_.)
 
-   .. admonition:: What about Apache and mod_python?
+   .. admonition:: What about Apache and mod_wsgi?
 
       If you take the approach of setting ``PYTHONPATH``, you'll need to
-      remember to do the same thing in your Apache configuration once you
-      deploy your production site. Do this by setting ``PythonPath`` in your
-      Apache configuration file.
+      remember to do the same thing in your WSGI application once you
+      deploy your production site. Do this by appending to ``sys.path`` in your
+      WSGI application.
 
       More information about deployment is available, of course, in our
-      :ref:`How to use Django with mod_python <howto-deployment-modpython>`
+      :ref:`How to use Django with mod_wsgi <howto-deployment-modwsgi>`
       documentation.
 
 4. On Unix-like systems, create a symbolic link to the file
Index: docs/faq/admin.txt
===================================================================
--- docs/faq/admin.txt	(revision 13402)
+++ docs/faq/admin.txt	(working copy)
@@ -51,11 +51,11 @@
 user from the request, the :meth:`ModelAdmin.queryset` and :meth:`ModelAdmin.has_change_permission`
 can be used to control the visibility and editability of objects in the admin.
 
-My admin-site CSS and images showed up fine using the development server, but they're not displaying when using mod_python.
+My admin-site CSS and images showed up fine using the development server, but they're not displaying when using mod_wsgi.
 ---------------------------------------------------------------------------------------------------------------------------
 
-See :ref:`serving the admin files <howto-deployment-modpython-serving-the-admin-files>`
-in the "How to use Django with mod_python" documentation.
+See :ref:`serving the admin files <serving-the-admin-files>`
+in the "How to use Django with mod_wsgi" documentation.
 
 My "list_filter" contains a ManyToManyField, but the filter doesn't display.
 ----------------------------------------------------------------------------
Index: docs/howto/deployment/index.txt
===================================================================
--- docs/howto/deployment/index.txt	(revision 13402)
+++ docs/howto/deployment/index.txt	(working copy)
@@ -12,8 +12,8 @@
    :maxdepth: 1
    
    modwsgi
-   modpython
    fastcgi
+   How to use Django with Apache and mod_python (To be deprecated) <modpython>
    
 If you're new to deploying Django and/or Python, we'd recommend you try
 :ref:`mod_wsgi <howto-deployment-modwsgi>` first. In most cases it'll be the easiest,
