Skip to content

Commit

Permalink
Merge branch 'release/4.4.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
GrahamDumpleton committed Dec 15, 2014
2 parents e2fd98c + 1dedfee commit 8042adf
Show file tree
Hide file tree
Showing 24 changed files with 555 additions and 172 deletions.
1 change: 1 addition & 0 deletions docs/release-notes/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Release Notes
.. toctree::
:maxdepth: 2

version-4.4.1.rst
version-4.4.0.rst

version-4.3.2.rst
Expand Down
2 changes: 1 addition & 1 deletion docs/release-notes/version-4.4.0.rst
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ for this feature to work.
specified and at the same time the ``--debug-mode`` option is specified,
then coverage analysis is enabled. When the server is exited, then the
profiler data will be output to the ``pstats.dat`` file under the server
working directory, or the file specified using the ``profiler-output-file``
working directory, or the file specified using the ``--profiler-output-file``
option.

12. Added the ``--python-path`` option to ``mod_wsgi-express`` to specify
Expand Down
79 changes: 79 additions & 0 deletions docs/release-notes/version-4.4.1.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
=============
Version 4.4.1
=============

Version 4.4.1 of mod_wsgi can be obtained from:

https://codeload.github.com/GrahamDumpleton/mod_wsgi/tar.gz/4.4.1

Known Issues
------------

1. The makefiles for building mod_wsgi on Windows are currently broken and
need updating. As most new changes relate to mod_wsgi daemon mode, which is
not supported under Windows, you should keep using the last available
binary for version 3.X on Windows instead.

Bugs Fixed
----------

1. Process crashes could occur when request content had been consumed by
the WSGI application. The trigger was when the Python ``wsgi.input`` was
still in existence after the web request had finished. The destruction of
the ``wsgi.input`` object was accessing memory which had already been
released back to the Apache memory pools and potentially reused. This could
cause crashes or other unexplained behaviour. This issue was introduced in
version 4.4.0 of mod_wsgi.

Features Changed
----------------

1. When an error occurs in writing back a response to the HTTP client,
during the consumption of the iterable returned by the WSGI application,
the message will now be logged at debug level rather than error level. Note
that under Apache 2.2 it isn't possible to suppress the message generated
by Apache itself from the core_output_filter, so that may still appear.

2. The ``--profiler-output-file`` option for ``mod_wsgi-express`` was
changed to ``--profiler-directory`` and now refers to a directory, with
individual pstats files being added to the directory for each session
rather than reusing the same name all the time.

New Features
------------

1. Added the ``--server-mpm`` option to ``mod_wsgi-express``. With this
option, if you are using Apache 2.4 with dynamically loadable MPM modules
and more than one option for the MPM is available, you can specify your
preference for which is used. If not specified, then the precedence order
for MPMs is 'event', 'worker' and finally 'prefork'.

2. Added ``static`` as an option for ``--application-type`` when running
``mod_wsgi-express``. When set as ``static``, only static files will be
served. One can still set specific handler types for different extensions
which may invoke a Python handler script, but there will be no global
fallback WSGI application for any URLs that do not map to static files. In
these cases a normal HTTP 404 response will be returned instead.

3. Added ``--host-access-script`` option to ``mod_wsgi-express`` to allow
a Python script to be provided which can control host access. This uses
the ``WSGIAccessScript`` directive and the handler script should define an
``allow_access(environ, host)`` function which returns ``True`` if access is
allowed or ``False`` if blocked.

4. Added ``--debugger-startup`` option to be used in conjunction with
the ``--enable-debugger`` option of ``mod_wsgi-express`` when in debug mode.
The option will cause the debugger to be activated on server start before
any requests are handled to allow breakpoints to be set.

5. Added a ``socket-user`` option to ``WSGIDaemonProcess`` to allow the
owner of the UNIX listener socket for the daemon process group to be
overridden. This can be used when using mod_ruid2 to change the owner of
the socket from the default Apache user, to the user under which mod_ruid2
will run Apache when handling requests. This is necessary otherwise the
Apache child worker process will not be able to connect to the listener
socket for the mod_wsgi daemon process to proxy the request to the WSGI
application.

6. Added a ``--enable-recorder`` option for enabling request recording when
also using debug mode.
21 changes: 21 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,27 @@ def _version():
match = re.search(pattern, fp.read(), flags=re.MULTILINE)
return match.group('version')

# Final check to make sure a shared library for Python does actually
# exist. Warn if one doesn't as we really want a shared library.

SHARED_LIBRARY_WARNING = """
WARNING: The Python installation you are using does not appear to have
been installed with a shared library, or in the case of MacOS X, as a
framework. Where these are not present, the compilation of mod_wsgi may
fail, or if it does succeed, will result in extra memory being used by
all processes at run time as a result of the static library needing to
be loaded in its entirety to every process. It is highly recommended
that you reinstall the Python installation being used from source code,
supplying the '--enable-shared' option to the 'configure' script when
configuring the source code prior to building and installing it.
"""

if (not get_python_config('Py_ENABLE_SHARED') and
not get_python_config('PYTHONFRAMEWORK')):
print(SHARED_LIBRARY_WARNING)

# Now finally run distutils.

setup(name = 'mod_wsgi',
version = _version(),
description = 'Installer for Apache/mod_wsgi.',
Expand Down
Loading

0 comments on commit 8042adf

Please sign in to comment.