Skip to content

Commit 8042adf

Browse files
Merge branch 'release/4.4.1'
2 parents e2fd98c + 1dedfee commit 8042adf

24 files changed

+555
-172
lines changed

docs/release-notes/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ Release Notes
55
.. toctree::
66
:maxdepth: 2
77

8+
version-4.4.1.rst
89
version-4.4.0.rst
910

1011
version-4.3.2.rst

docs/release-notes/version-4.4.0.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ for this feature to work.
269269
specified and at the same time the ``--debug-mode`` option is specified,
270270
then coverage analysis is enabled. When the server is exited, then the
271271
profiler data will be output to the ``pstats.dat`` file under the server
272-
working directory, or the file specified using the ``profiler-output-file``
272+
working directory, or the file specified using the ``--profiler-output-file``
273273
option.
274274

275275
12. Added the ``--python-path`` option to ``mod_wsgi-express`` to specify

docs/release-notes/version-4.4.1.rst

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
=============
2+
Version 4.4.1
3+
=============
4+
5+
Version 4.4.1 of mod_wsgi can be obtained from:
6+
7+
https://codeload.github.com/GrahamDumpleton/mod_wsgi/tar.gz/4.4.1
8+
9+
Known Issues
10+
------------
11+
12+
1. The makefiles for building mod_wsgi on Windows are currently broken and
13+
need updating. As most new changes relate to mod_wsgi daemon mode, which is
14+
not supported under Windows, you should keep using the last available
15+
binary for version 3.X on Windows instead.
16+
17+
Bugs Fixed
18+
----------
19+
20+
1. Process crashes could occur when request content had been consumed by
21+
the WSGI application. The trigger was when the Python ``wsgi.input`` was
22+
still in existence after the web request had finished. The destruction of
23+
the ``wsgi.input`` object was accessing memory which had already been
24+
released back to the Apache memory pools and potentially reused. This could
25+
cause crashes or other unexplained behaviour. This issue was introduced in
26+
version 4.4.0 of mod_wsgi.
27+
28+
Features Changed
29+
----------------
30+
31+
1. When an error occurs in writing back a response to the HTTP client,
32+
during the consumption of the iterable returned by the WSGI application,
33+
the message will now be logged at debug level rather than error level. Note
34+
that under Apache 2.2 it isn't possible to suppress the message generated
35+
by Apache itself from the core_output_filter, so that may still appear.
36+
37+
2. The ``--profiler-output-file`` option for ``mod_wsgi-express`` was
38+
changed to ``--profiler-directory`` and now refers to a directory, with
39+
individual pstats files being added to the directory for each session
40+
rather than reusing the same name all the time.
41+
42+
New Features
43+
------------
44+
45+
1. Added the ``--server-mpm`` option to ``mod_wsgi-express``. With this
46+
option, if you are using Apache 2.4 with dynamically loadable MPM modules
47+
and more than one option for the MPM is available, you can specify your
48+
preference for which is used. If not specified, then the precedence order
49+
for MPMs is 'event', 'worker' and finally 'prefork'.
50+
51+
2. Added ``static`` as an option for ``--application-type`` when running
52+
``mod_wsgi-express``. When set as ``static``, only static files will be
53+
served. One can still set specific handler types for different extensions
54+
which may invoke a Python handler script, but there will be no global
55+
fallback WSGI application for any URLs that do not map to static files. In
56+
these cases a normal HTTP 404 response will be returned instead.
57+
58+
3. Added ``--host-access-script`` option to ``mod_wsgi-express`` to allow
59+
a Python script to be provided which can control host access. This uses
60+
the ``WSGIAccessScript`` directive and the handler script should define an
61+
``allow_access(environ, host)`` function which returns ``True`` if access is
62+
allowed or ``False`` if blocked.
63+
64+
4. Added ``--debugger-startup`` option to be used in conjunction with
65+
the ``--enable-debugger`` option of ``mod_wsgi-express`` when in debug mode.
66+
The option will cause the debugger to be activated on server start before
67+
any requests are handled to allow breakpoints to be set.
68+
69+
5. Added a ``socket-user`` option to ``WSGIDaemonProcess`` to allow the
70+
owner of the UNIX listener socket for the daemon process group to be
71+
overridden. This can be used when using mod_ruid2 to change the owner of
72+
the socket from the default Apache user, to the user under which mod_ruid2
73+
will run Apache when handling requests. This is necessary otherwise the
74+
Apache child worker process will not be able to connect to the listener
75+
socket for the mod_wsgi daemon process to proxy the request to the WSGI
76+
application.
77+
78+
6. Added a ``--enable-recorder`` option for enabling request recording when
79+
also using debug mode.

setup.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,27 @@ def _version():
175175
match = re.search(pattern, fp.read(), flags=re.MULTILINE)
176176
return match.group('version')
177177

178+
# Final check to make sure a shared library for Python does actually
179+
# exist. Warn if one doesn't as we really want a shared library.
180+
181+
SHARED_LIBRARY_WARNING = """
182+
WARNING: The Python installation you are using does not appear to have
183+
been installed with a shared library, or in the case of MacOS X, as a
184+
framework. Where these are not present, the compilation of mod_wsgi may
185+
fail, or if it does succeed, will result in extra memory being used by
186+
all processes at run time as a result of the static library needing to
187+
be loaded in its entirety to every process. It is highly recommended
188+
that you reinstall the Python installation being used from source code,
189+
supplying the '--enable-shared' option to the 'configure' script when
190+
configuring the source code prior to building and installing it.
191+
"""
192+
193+
if (not get_python_config('Py_ENABLE_SHARED') and
194+
not get_python_config('PYTHONFRAMEWORK')):
195+
print(SHARED_LIBRARY_WARNING)
196+
197+
# Now finally run distutils.
198+
178199
setup(name = 'mod_wsgi',
179200
version = _version(),
180201
description = 'Installer for Apache/mod_wsgi.',

0 commit comments

Comments
 (0)